mpd: Enable parallel build
[packages.git] / sound / mpd / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=5
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
23 define Package/mpd
24   SECTION:=sound
25   CATEGORY:=Sound
26   TITLE:=Music Player Daemon
27   URL:=http://www.musicpd.org/
28 # libvorbis and therewith libogg are needed for shout support
29   DEPENDS:= \
30         +AUDIO_SUPPORT:alsa-lib \
31         +libaudiofile \
32         +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \
33         +glib2 +libcurl +libflac +libmms +libpthread +libshout \
34         +libvorbis +libvorbisidec +libid3tag
35 endef
36
37 define Package/mpd/description
38  MPD is a music player supporting flac, mp3 and ogg files. It is
39  typically controlled over a network using one of it's many clients
40  including mpc(console), gmpc(gnome), phpmp(php), etc...
41 endef
42
43 define Package/mpd/conffiles
44 /etc/avahi/services/mpd.service
45 /etc/mpd.conf
46 endef
47
48 # oggflac is not compatible with tremor
49 CONFIGURE_ARGS += \
50         $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
51         $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
52         --enable-audiofile \
53         --disable-mpc \
54         $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
55         --disable-lsr \
56         --disable-ao \
57         --disable-mvp \
58         --disable-lame-encoder \
59         --disable-ffmpeg \
60         --enable-flac \
61         --enable-vorbis \
62         --disable-oggflac \
63         --disable-cue \
64         --disable-jack \
65         --disable-modplug \
66         --disable-pulse \
67         --disable-sidplay \
68         --disable-sqlite \
69         --enable-shout \
70         --enable-id3 \
71         --enable-lastfm \
72         --enable-mms \
73         --enable-curl \
74         --disable-oss \
75         --enable-aac \
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 += \
89         -std=gnu99 \
90         -I$(STAGING_DIR)/usr/lib/libintl/include/ \
91         -I$(STAGING_DIR)/usr/lib/libiconv/include/ \
92
93 TARGET_LDFLAGS += \
94         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
95         -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
96         -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
97
98 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
99 TARGET_CXX:=$(TARGET_CC)
100
101 define Package/mpd/install
102         $(INSTALL_DIR) $(1)/etc
103         $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
104         $(INSTALL_DIR) $(1)/usr/bin
105         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
106         $(INSTALL_DIR) $(1)/etc/init.d
107         $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
108         $(INSTALL_DIR) $(1)/etc/avahi/services
109         $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
110 endef
111
112 $(eval $(call BuildPackage,mpd))