[packages] add ices, a small audio source for icecast
[packages.git] / sound / mpd / Makefile
1
2 # Copyright (C) 2007-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mpd
11 PKG_VERSION:=0.15.5
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/musicpd
16 PKG_MD5SUM:=078bd45c8266ac577e4a96fa38d1e534
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/mpd
21   SECTION:=sound
22   CATEGORY:=Sound
23   DEPENDS:=+libflac +libid3tag +libmad +libvorbisidec +libpthread +glib2 +libmms +libcurl +libstdcpp
24   TITLE:=Music Player Daemon
25   URL:=http://www.musicpd.org/
26 endef
27
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.
32 endef
33
34 define Package/mpd/conffiles
35 /etc/mpd.conf
36 endef
37
38 CONFIGURE_ARGS+= \
39         --disable-audiofile \
40         --disable-mpc \
41         --disable-aac \
42         --disable-lsr \
43         --disable-ao \
44         --disable-mvp \
45         --disable-lametest \
46         --disable-lame-encoder \
47         --enable-flac \
48         --enable-lastfm \
49         --enable-mms \
50         --with-tremor="$(STAGING_DIR)/usr/lib" \
51
52 ifeq ($(CONFIG_PACKAGE_kmod-sound-core),)
53         CONFIGURE_ARGS+= --disable-alsa
54 endif
55
56 CONFIGURE_VARS += \
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"
69
70 define Build/Compile
71         $(MAKE) -C $(PKG_BUILD_DIR) \
72                 DESTDIR="$(PKG_INSTALL_DIR)" \
73                 all install
74 endef
75
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
83 endef
84
85 $(eval $(call BuildPackage,mpd))