10b0ebf7cb01a276ce21d6f417232f5c80ac80fe
[openwrt/svn-archive/archive.git] / sound / mpd / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=mpd
12 PKG_VERSION:=0.13.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.musicpd.org/uploads/files/
17 PKG_MD5SUM:=0b33bdb9d706439949344073e90f812a
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/mpd
26 SECTION:=sound
27 CATEGORY:=Sound
28 DEPENDS:=+libflac +libid3tag +libmad +libvorbisidec +libpthread +alsa-lib
29 TITLE:=Music Player Daemon
30 URL:=http://www.musicpd.org/
31 endef
32
33 define Package/mpd/description
34 MPD is a music player supporting flac, mp3 and ogg files.
35 It is typically controlled over a network using one of it's many
36 clients including mpc(console), gmpc(gnome), phpmp(php) etc.
37 endef
38
39 define Package/mpd/conffiles
40 /etc/mpd.conf
41 endef
42
43 ifndef CONFIG_PACKAGE_kmod-soundcore
44 EXTRA_CONFIG_PARAM:=--disable-alsa
45 endif
46
47 define Build/Configure
48 $(call Build/Configure/Default, \
49 $(EXTRA_CONFIG_PARAM) \
50 --disable-shout \
51 --disable-mod \
52 --disable-audiofile \
53 --disable-iconv \
54 --disable-mpc \
55 --disable-aac \
56 --disable-oggvorbis \
57 --disable-oggflac \
58 --with-id3tag-includes="$(STAGING_DIR)/usr/include" \
59 --with-id3tag-libraries="$(STAGING_DIR)/usr/lib" \
60 --with-libFLAC-includes="$(STAGING_DIR)/usr/include" \
61 --with-libFLAC-libraries="$(STAGING_DIR)/usr/lib" \
62 --with-mad-includes="$(STAGING_DIR)/usr/include" \
63 --with-mad-libraries="$(STAGING_DIR)/usr/lib" \
64 )
65 endef
66
67 define Build/Compile
68 $(MAKE) -C $(PKG_BUILD_DIR) \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
70 all install
71 endef
72
73 define Package/mpd/install
74 $(INSTALL_DIR) $(1)/etc
75 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
76 $(INSTALL_DIR) $(1)/usr/bin
77 $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
78 endef
79
80 $(eval $(call BuildPackage,mpd))