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 # libvorbis and therewith libogg are needed for shout support
26 DEPENDS
:=+libflac
+BUILD_PATENTED
:libfaad2
+BUILD_PATENTED
:libmad
+libvorbisidec
+libpthread
+glib2
+libmms
+libcurl
+libshout
+alsa-lib
+libvorbis
27 TITLE
:=Music Player Daemon
28 URL
:=http
://www.musicpd.org
/
31 define Package
/mpd
/description
32 MPD is a music player supporting flac
, mp3 and ogg files.
33 It is typically controlled over a network using one of it
's many
34 clients including mpc(console), gmpc(gnome), phpmp(php) etc.
37 define Package/mpd/conffiles
42 -I$(STAGING_DIR)/usr/lib/libintl/include/ \
43 -I$(STAGING_DIR)/usr/lib/libiconv/include/
46 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
47 -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
48 -L$(STAGING_DIR)/usr/lib/libiconv/lib/
50 # oggflac is not compatible with tremor
52 --$(if $(CONFIG_BUILD_PATENTED),enable-mad,disable-mad) \
56 --$(if $(CONFIG_BUILD_PATENTED),enable-aac,disable-aac) \
60 --disable-lame-encoder \
74 --disable-libOggFLACtest \
77 --with-faad="$(STAGING_DIR)/usr" \
79 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
80 TARGET_CXX=$(TARGET_CC)
82 TARGET_CFLAGS+=-std=gnu99
86 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
87 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
88 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
89 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
91 define Package/mpd/install
92 $(INSTALL_DIR) $(1)/etc
93 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
94 $(INSTALL_DIR) $(1)/usr/bin
95 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
96 $(INSTALL_DIR) $(1)/etc/init.d
97 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
100 $(eval $(call BuildPackage,mpd))