Merge pull request #4495 from dibdot/travelmate
[feed/packages.git] / sound / mpd / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=mpd
9 PKG_VERSION:=0.20.8
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
13 PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.20/
14 PKG_HASH:=7d177f29663c4a0997413401e52bbf11d2bb472773bbcf9294f839c4b8751e35
15 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
16
17 PKG_LICENSE:=GPL-2.0
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_BUILD_PARALLEL:=1
22
23 PKG_CONFIG_DEPENDS:= \
24 CONFIG_IPV6 \
25
26 PKG_INSTALL:=1
27 PKG_USE_MIPS16:=0
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31
32 define Package/mpd/Default
33 SECTION:=sound
34 CATEGORY:=Sound
35 TITLE:=Music Player Daemon
36 URL:=http://www.musicpd.org/
37 DEPENDS:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
38 +libflac +BUILD_PATENTED:libmad +libvorbisidec +AUDIO_SUPPORT:alsa-lib \
39 +boost +boost-container +libexpat
40 endef
41
42 define Package/mpd/Default/description
43 Music Player Daemon (MPD) is a flexible, powerful, server-side
44 application for playing music. It is typically controlled over a
45 network using one of it's many clients including mpc (console),
46 gmpc (gnome), phpmp (php), etc...
47 endef
48
49 define Package/mpd-full
50 $(call Package/mpd/Default)
51 TITLE+= (full)
52 DEPENDS+= \
53 +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
54 +libmms +libogg +libsndfile +libvorbis +libupnp
55 PROVIDES:=mpd
56 VARIANT:=full
57 endef
58
59 define Package/mpd-full/description
60 $(call Package/mpd/Default/description)
61 .
62 This package contains a full-blown Music Player Daemon.
63 endef
64
65 define Package/mpd-full/conffiles
66 /etc/mpd.conf
67 endef
68
69 define Package/mpd-mini
70 $(call Package/mpd/Default)
71 TITLE+= (mini)
72 PROVIDES:=mpd
73 VARIANT:=mini
74 endef
75
76 define Package/mpd-mini/description
77 $(call Package/mpd/Default/description)
78 .
79 This package contains a minimal Music Player Daemon, with support for
80 only Flac, MP3 & OGG media types & only file: & http: protocols.
81 endef
82
83 define Package/mpd-mini/conffiles
84 /etc/mpd.conf
85 endef
86
87 define Package/mpd-avahi-service
88 $(call Package/mpd/Default)
89 TITLE+= (Avahi service)
90 DEPENDS+=+avahi-daemon
91 endef
92
93 define Package/mpd-avahi-service/description
94 $(call Package/mpd/Default/description)
95 .
96 This package contains the service definition for announcing the
97 Music Player Daemon service via mDNS/DNS-SD.
98 endef
99
100 define Package/mpd-avahi-service/conffiles
101 /etc/avahi/services/mpd.service
102 endef
103
104 TARGET_CFLAGS += -ggdb3
105 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
106 EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
107
108 CONFIGURE_ARGS += \
109 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
110 --disable-debug \
111 --disable-documentation \
112 --disable-test \
113 --disable-werror \
114 \
115 --disable-ao \
116 --disable-bzip2 \
117 --disable-fluidsynth \
118 --disable-wildmidi \
119 --disable-gme \
120 --enable-inotify \
121 --disable-icu \
122 --disable-eventfd \
123 --disable-iso9660 \
124 --disable-jack \
125 --disable-roar \
126 --disable-libwrap \
127 --disable-lsr \
128 --disable-mikmod \
129 --disable-modplug \
130 --disable-mpc \
131 --disable-mpg123 \
132 --disable-openal \
133 --disable-opus \
134 --disable-pulse \
135 --disable-sidplay \
136 --disable-solaris-output \
137 --disable-sqlite \
138 --disable-lame-encoder \
139 --disable-twolame-encoder \
140 --disable-shine-encoder \
141 --enable-wave-encoder \
142 --disable-wavpack \
143 --disable-wildmidi \
144 --disable-zzip \
145 --with-zeroconf=no \
146 --disable-soxr \
147 \
148 --enable-curl \
149 --enable-flac \
150 --enable-httpd-output \
151 $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
152 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
153 --enable-tcp \
154 --enable-un \
155
156 CONFIGURE_VARS += \
157 FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
158 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
159 $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
160 $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
161
162 ifeq ($(BUILD_VARIANT),full)
163
164 CONFIGURE_ARGS += \
165 --enable-upnp \
166 $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
167 --enable-audiofile \
168 --enable-fifo \
169 --enable-ffmpeg \
170 --enable-id3 \
171 --enable-mms \
172 --enable-flac \
173 --enable-pipe-output \
174 --enable-recorder-output \
175 --disable-shout \
176 --enable-sndfile \
177 --enable-vorbis \
178 --disable-vorbis-encoder \
179 --with-tremor=yes \
180
181 endif
182
183 ifeq ($(BUILD_VARIANT),mini)
184
185 # oggflac is not compatible with tremor
186 CONFIGURE_ARGS += \
187 --disable-upnp \
188 --disable-aac \
189 --disable-audiofile \
190 --disable-fifo \
191 --disable-ffmpeg \
192 --disable-id3 \
193 --disable-mms \
194 --disable-pipe-output \
195 --disable-recorder-output \
196 --disable-shout \
197 --disable-sndfile \
198 --disable-vorbis \
199 --disable-vorbis-encoder \
200 --with-tremor=yes \
201
202 endif
203
204 define Package/mpd/install
205 $(INSTALL_DIR) $(1)/usr/bin
206 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
207 $(INSTALL_DIR) $(1)/etc
208 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
209 $(INSTALL_DIR) $(1)/etc/init.d
210 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
211 endef
212
213 define Package/mpd-full/install
214 $(call Package/mpd/install,$1)
215 endef
216
217 define Package/mpd-mini/install
218 $(call Package/mpd/install,$1)
219 endef
220
221 define Package/mpd-avahi-service/install
222 $(INSTALL_DIR) $(1)/etc/avahi/services
223 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
224 endef
225
226 $(eval $(call BuildPackage,mpd-full))
227 $(eval $(call BuildPackage,mpd-mini))
228 $(eval $(call BuildPackage,mpd-avahi-service))