[packages] make libintl and libiconv stub/full implementations switchable, use the...
[openwrt/svn-archive/archive.git] / sound / mpd / Makefile
1 #
2 # Copyright (C) 2007-2011 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.8
12 PKG_RELEASE:=6
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/musicpd
16 PKG_MD5SUM:=824e1ce46c0f468865d9e5e403cdaf5d
17
18 PKG_INSTALL:=1
19 PKG_BUILD_PARALLEL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/nls.mk
23
24 define Package/mpd
25 SECTION:=sound
26 CATEGORY:=Sound
27 TITLE:=Music Player Daemon
28 URL:=http://www.musicpd.org/
29 # libvorbis and therewith libogg are needed for shout support
30 DEPENDS:= \
31 +AUDIO_SUPPORT:alsa-lib \
32 +libaudiofile \
33 +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \
34 +glib2 +libcurl +libflac +libmms +libpthread +libshout \
35 +libvorbis +libvorbisidec +libid3tag
36 endef
37
38 define Package/mpd/description
39 MPD is a music player supporting flac, mp3 and ogg files. It is
40 typically controlled over a network using one of it's many clients
41 including mpc(console), gmpc(gnome), phpmp(php), etc...
42 endef
43
44 define Package/mpd/conffiles
45 /etc/avahi/services/mpd.service
46 /etc/mpd.conf
47 endef
48
49 # oggflac is not compatible with tremor
50 CONFIGURE_ARGS += \
51 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
52 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
53 --enable-audiofile \
54 --disable-mpc \
55 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
56 --disable-lsr \
57 --disable-ao \
58 --disable-mvp \
59 --disable-lame-encoder \
60 --disable-ffmpeg \
61 --enable-flac \
62 --enable-vorbis \
63 --disable-oggflac \
64 --disable-cue \
65 --disable-jack \
66 --disable-modplug \
67 --disable-pulse \
68 --disable-sidplay \
69 --disable-sqlite \
70 --enable-shout \
71 --enable-id3 \
72 --enable-lastfm \
73 --enable-mms \
74 --enable-curl \
75 --disable-oss \
76 --with-zeroconf=no \
77 --disable-libOggFLACtest \
78 --disable-test \
79 --with-tremor=yes \
80 --with-faad="$(STAGING_DIR)/usr" \
81
82 CONFIGURE_VARS += \
83 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
84 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
85 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
86 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
87
88 TARGET_CFLAGS += -std=gnu99
89 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
90
91 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
92 TARGET_CXX:=$(TARGET_CC)
93
94 define Package/mpd/install
95 $(INSTALL_DIR) $(1)/etc
96 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
97 $(INSTALL_DIR) $(1)/usr/bin
98 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
99 $(INSTALL_DIR) $(1)/etc/init.d
100 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
101 $(INSTALL_DIR) $(1)/etc/avahi/services
102 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
103 endef
104
105 $(eval $(call BuildPackage,mpd))