2 # Copyright (C) 2007-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/musicpd
16 PKG_MD5SUM:=4d07459125ab0154c5b4fe364331498a
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/nls.mk
27 TITLE:=Music Player Daemon
28 URL:=http://www.musicpd.org/
29 # libvorbis and therewith libogg are needed for shout support
31 +AUDIO_SUPPORT:alsa-lib \
33 +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \
34 +glib2 +libcurl +libflac +libmms +libpthread +libshout \
35 +libvorbis +libvorbisidec +libid3tag
38 define Package/mpd/description
39 MPD is a music player supporting flac, mp3 and ogg files. It is
40 typically controlled over a network using one of it's many clients
41 including mpc(console), gmpc(gnome), phpmp(php), etc...
44 define Package/mpd/conffiles
45 /etc/avahi/services/mpd.service
49 # oggflac is not compatible with tremor
51 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
52 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
55 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
59 --disable-lame-encoder \
79 --with-faad="$(STAGING_DIR)/usr" \
82 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
83 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
84 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
85 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
87 TARGET_CFLAGS += -std=gnu99
88 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
90 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
91 TARGET_CXX:=$(TARGET_CC)
93 define Package/mpd/install
94 $(INSTALL_DIR) $(1)/etc
95 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
96 $(INSTALL_DIR) $(1)/usr/bin
97 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
98 $(INSTALL_DIR) $(1)/etc/init.d
99 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
100 $(INSTALL_DIR) $(1)/etc/avahi/services
101 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
104 $(eval $(call BuildPackage,mpd))