51b28bee1b3adc364976298a2362d053467982f0
[openwrt/svn-archive/archive.git] / sound / mpd / Makefile
1 #
2 # Copyright (C) 2007 - 2008 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.1
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.musicpd.org/uploads/files/
17 PKG_MD5SUM:=3079a76b7ce048d89e2f644b578cd4fe
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/mpd
25 SECTION:=sound
26 CATEGORY:=Sound
27 DEPENDS:=+libflac +libid3tag +libmad +libvorbisidec +libpthread +libiconv
28 TITLE:=Music Player Daemon
29 URL:=http://www.musicpd.org/
30 endef
31
32 define Package/mpd/description
33 MPD is a music player supporting flac, mp3 and ogg files.
34 It is typically controlled over a network using one of it's many
35 clients including mpc(console), gmpc(gnome), phpmp(php) etc.
36 endef
37
38 define Package/mpd/conffiles
39 /etc/mpd.conf
40 endef
41
42 ifndef CONFIG_PACKAGE_kmod-sound-core
43 EXTRA_CONFIG_PARAM:=--disable-alsa
44 endif
45
46 define Build/Configure
47 $(call Build/Configure/Default, \
48 $(EXTRA_CONFIG_PARAM) \
49 --disable-mod \
50 --disable-audiofile \
51 --disable-mpc \
52 --disable-aac \
53 --with-tremor \
54 --with-id3tag-includes="$(STAGING_DIR)/usr/include" \
55 --with-id3tag-libraries="$(STAGING_DIR)/usr/lib" \
56 --with-libFLAC-includes="$(STAGING_DIR)/usr/include" \
57 --with-libFLAC-libraries="$(STAGING_DIR)/usr/lib" \
58 --with-mad-includes="$(STAGING_DIR)/usr/include" \
59 --with-mad-libraries="$(STAGING_DIR)/usr/lib" \
60 --with-iconv-includes="$(STAGING_DIR)/usr/lib/libiconv/include" \
61 --with-iconv-libraries="$(STAGING_DIR)/usr/lib/libiconv/lib" \
62 )
63 endef
64
65 define Build/Compile
66 $(MAKE) -C $(PKG_BUILD_DIR) \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 all install
69 endef
70
71 define Package/mpd/install
72 $(INSTALL_DIR) $(1)/etc
73 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
74 $(INSTALL_DIR) $(1)/usr/bin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
76 $(INSTALL_DIR) $(1)/etc/init.d
77 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
78 endef
79
80 $(eval $(call BuildPackage,mpd))