2 # Copyright (C) 2007-2009 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:=addbbcbbf8a24a2ce80db1ba5a1f91ca
18 include $(INCLUDE_DIR)/package.mk
23 DEPENDS:=+libflac +libid3tag +libmad +libvorbisidec +libpthread +glib2 +libmms +libcurl +libstdcpp
24 TITLE:=Music Player Daemon
25 URL:=http://www.musicpd.org/
28 define Package/mpd/description
29 MPD is a music player supporting flac, mp3 and ogg files.
30 It is typically controlled over a network using one of it's many
31 clients including mpc(console), gmpc(gnome), phpmp(php) etc.
34 define Package/mpd/conffiles
46 --disable-lame-encoder \
50 --with-tremor="$(STAGING_DIR)/usr/lib" \
52 ifeq ($(CONFIG_PACKAGE_kmod-sound-core),)
53 CONFIGURE_ARGS+= --disable-alsa
57 CURL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lcurl" \
58 CURL_CFLAGS="-I$(STAGING_DIR)/usr/include" \
59 ID3TAG_LIBS="$(TARGET_LDFLAGS) -lz -lid3tag" \
60 ID3TAG_CFLAGS="$(TARGET_CPPFLAGS)" \
61 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
62 FLAC_CFLAGS="-I$(STAGING_DIR)/usr/include/FLAC" \
63 MAD_LIBS="$(TARGET_LDFLAGS) -lmad" \
64 MAD_CFLAGS="$(TARGET_CPPFLAGS)" \
65 OGGVORBIS_LIBS="$(TARGET_LDLFAGS) -lvorbisidec" \
66 OGGVORBIS_CFLAGS="$(TARGET_CPPFLAGS)" \
67 GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \
68 GLIB_LIBS="$(TARGET_LDLFAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib -lintl -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv -lglib-2.0 -lgthread-2.0 -pthread"
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 DESTDIR="$(PKG_INSTALL_DIR)" \
76 define Package/mpd/install
77 $(INSTALL_DIR) $(1)/etc
78 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
79 $(INSTALL_DIR) $(1)/usr/bin
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
81 $(INSTALL_DIR) $(1)/etc/init.d
82 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
85 $(eval $(call BuildPackage,mpd))