update mpd to v0.14.2, patch by Jan Willies
[openwrt/svn-archive/archive.git] / sound / mpd / Makefile
1 #
2 # Copyright (C) 2007 - 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=mpd
12 PKG_VERSION:=0.14.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/musicpd
17 PKG_MD5SUM:=66817a4b4c05454e6488f6b821f2a6a3
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/mpd
22 SECTION:=sound
23 CATEGORY:=Sound
24 DEPENDS:=+libflac +libid3tag +libmad +libvorbisidec +libpthread +libiconv +glib2
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 ifndef CONFIG_PACKAGE_kmod-sound-core
40 EXTRA_CONFIG_PARAM:=--disable-alsa
41 endif
42
43 CONFIGURE_VARS += \
44 ID3TAG_LIBS="-L$(STAGING_DIR)/usr/lib -lz -lid3tag" \
45 ID3TAG_CFLAGS="-I$(STAGING_DIR)/usr/include" \
46 MAD_LIBS="-L$(STAGING_DIR)/usr/lib -lmad" \
47 MAD_CFLAGS="-I$(STAGING_DIR)/usr/include" \
48 OGGVORBIS_LIBS="-L$(STAGING_DIR)/usr/lib -lvorbisidec" \
49 OGGVORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include" \
50 GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \
51 GLIB_LIBS="-L$(STAGING_DIR)/usr/lib/libintl/lib -lintl -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv -L$(STAGING_DIR)/usr/lib -lglib-2.0 -lgthread-2.0 -pthread"
52
53 define Build/Configure
54 $(call Build/Configure/Default, \
55 $(EXTRA_CONFIG_PARAM) \
56 --disable-mod \
57 --disable-audiofile \
58 --disable-mpc \
59 --disable-aac \
60 --disable-lsr \
61 --disable-ipv6 \
62 --disable-ao \
63 --disable-mvp \
64 --disable-lametest \
65 --disable-lame \
66 --disable-flac \
67 --with-tremor=$(STAGING_DIR)/usr/lib \
68 )
69 endef
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))