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 \
31 +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \
32 +glib2 +libcurl +libflac +libmms +libpthread +libshout \
33 +libvorbis +libvorbisidec +libid3tag
36 define Package/mpd/description
37 MPD is a music player supporting flac, mp3 and ogg files. It is
38 typically controlled over a network using one of it's many clients
39 including mpc(console), gmpc(gnome), phpmp(php), etc...
42 define Package/mpd/conffiles
43 /etc/avahi/services/mpd.service
47 # oggflac is not compatible with tremor
49 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
50 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
53 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
57 --disable-lame-encoder \
76 --disable-libOggFLACtest \
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") \
89 -I$(STAGING_DIR)/usr/lib/libintl/include/ \
90 -I$(STAGING_DIR)/usr/lib/libiconv/include/ \
93 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
94 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
95 -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
97 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
98 TARGET_CXX:=$(TARGET_CC)
100 define Package/mpd/install
101 $(INSTALL_DIR) $(1)/etc
102 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
103 $(INSTALL_DIR) $(1)/usr/bin
104 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
105 $(INSTALL_DIR) $(1)/etc/init.d
106 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
107 $(INSTALL_DIR) $(1)/etc/avahi/services
108 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
111 $(eval $(call BuildPackage,mpd))