2 # Copyright (C) 2007-2010 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:=824e1ce46c0f468865d9e5e403cdaf5d
20 include $(INCLUDE_DIR)/package.mk
25 TITLE:=Music Player Daemon
26 URL:=http://www.musicpd.org/
27 # libvorbis and therewith libogg are needed for shout support
29 +AUDIO_SUPPORT:alsa-lib \
30 +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \
31 +glib2 +libcurl +libflac +libmms +libpthread +libshout \
32 +libvorbis +libvorbisidec
35 define Package/mpd/description
36 MPD is a music player supporting flac, mp3 and ogg files. It is
37 typically controlled over a network using one of it's many clients
38 including mpc(console), gmpc(gnome), phpmp(php), etc...
41 define Package/mpd/conffiles
42 /etc/avahi/services/mpd.service
46 # oggflac is not compatible with tremor
48 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
49 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
52 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
56 --disable-lame-encoder \
75 --disable-libOggFLACtest \
78 --with-faad="$(STAGING_DIR)/usr" \
81 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
82 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
83 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
84 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
88 -I$(STAGING_DIR)/usr/lib/libintl/include/ \
89 -I$(STAGING_DIR)/usr/lib/libiconv/include/ \
92 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
93 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
94 -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
96 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
97 TARGET_CXX:=$(TARGET_CC)
99 define Package/mpd/install
100 $(INSTALL_DIR) $(1)/etc
101 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
102 $(INSTALL_DIR) $(1)/usr/bin
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
104 $(INSTALL_DIR) $(1)/etc/init.d
105 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
106 $(INSTALL_DIR) $(1)/etc/avahi/services
107 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
110 $(eval $(call BuildPackage,mpd))