[packages] mpd: add missing dependencies
[openwrt/svn-archive/archive.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 \
24 +libmms +libcurl +libsqlite3 +libstdcpp +libvorbis +libshout
25 TITLE:=Music Player Daemon
26 URL:=http://www.musicpd.org/
27 endef
28
29 define Package/mpd/description
30 MPD is a music player supporting flac, mp3 and ogg files.
31 It is typically controlled over a network using one of it's many
32 clients including mpc(console), gmpc(gnome), phpmp(php) etc.
33 endef
34
35 define Package/mpd/conffiles
36 /etc/mpd.conf
37 endef
38
39 CONFIGURE_ARGS+= \
40 --disable-audiofile \
41 --disable-mpc \
42 --disable-aac \
43 --disable-lsr \
44 --disable-ao \
45 --disable-mvp \
46 --disable-lametest \
47 --disable-lame-encoder \
48 --enable-flac \
49 --enable-lastfm \
50 --enable-mms \
51 --with-tremor="$(STAGING_DIR)/usr/lib" \
52
53 ifeq ($(CONFIG_PACKAGE_kmod-sound-core),)
54 CONFIGURE_ARGS+= --disable-alsa
55 endif
56
57 CONFIGURE_VARS += \
58 CURL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lcurl" \
59 CURL_CFLAGS="-I$(STAGING_DIR)/usr/include" \
60 ID3TAG_LIBS="$(TARGET_LDFLAGS) -lz -lid3tag" \
61 ID3TAG_CFLAGS="$(TARGET_CPPFLAGS)" \
62 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
63 FLAC_CFLAGS="-I$(STAGING_DIR)/usr/include/FLAC" \
64 MAD_LIBS="$(TARGET_LDFLAGS) -lmad" \
65 MAD_CFLAGS="$(TARGET_CPPFLAGS)" \
66 OGGVORBIS_LIBS="$(TARGET_LDLFAGS) -lvorbisidec" \
67 OGGVORBIS_CFLAGS="$(TARGET_CPPFLAGS)" \
68 GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \
69 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"
70
71 define Build/Compile
72 $(MAKE) -C $(PKG_BUILD_DIR) \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
74 all install
75 endef
76
77 define Package/mpd/install
78 $(INSTALL_DIR) $(1)/etc
79 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
80 $(INSTALL_DIR) $(1)/usr/bin
81 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
82 $(INSTALL_DIR) $(1)/etc/init.d
83 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
84 endef
85
86 $(eval $(call BuildPackage,mpd))