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