Merge pull request #4853 from StevenHessing/noddos
[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.9
10 PKG_RELEASE:=2
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:=cd77a2869e32354b004cc6b34fcb0bee56114caa2d9ed862aaa8071441e34eb7
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:= +zlib +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
38 +AUDIO_SUPPORT:alsa-lib +boost +boost-container +libexpat
39 endef
40
41 define Package/mpd/Default/description
42 Music Player Daemon (MPD) is a flexible, powerful, server-side
43 application for playing music. It is typically controlled over a
44 network using one of it's many clients including mpc (console),
45 gmpc (gnome), phpmp (php), etc...
46 endef
47
48 define Package/mpd-full
49 $(call Package/mpd/Default)
50 TITLE+= (full)
51 DEPENDS+= +libffmpeg +libid3tag +libmms +libupnp +libshout
52 PROVIDES:=mpd
53 VARIANT:=full
54 endef
55
56 define Package/mpd-full/description
57 $(call Package/mpd/Default/description)
58 .
59 This package contains a full-blown Music Player Daemon.
60 endef
61
62 define Package/mpd-full/conffiles
63 /etc/mpd.conf
64 endef
65
66 define Package/mpd-mini
67 $(call Package/mpd/Default)
68 TITLE+= (mini)
69 DEPENDS+= +libflac +libmpg123 +libvorbisidec
70 PROVIDES:=mpd
71 VARIANT:=mini
72 endef
73
74 define Package/mpd-mini/description
75 $(call Package/mpd/Default/description)
76 .
77 This package contains a minimal Music Player Daemon, with support for
78 only Flac, MP3 & OGG media types & only file: & http: protocols.
79 endef
80
81 define Package/mpd-mini/conffiles
82 /etc/mpd.conf
83 endef
84
85 define Package/mpd-avahi-service
86 $(call Package/mpd/Default)
87 TITLE+= (Avahi service)
88 DEPENDS+=+avahi-daemon
89 endef
90
91 define Package/mpd-avahi-service/description
92 $(call Package/mpd/Default/description)
93 .
94 This package contains the service definition for announcing the
95 Music Player Daemon service via mDNS/DNS-SD.
96 endef
97
98 define Package/mpd-avahi-service/conffiles
99 /etc/avahi/services/mpd.service
100 endef
101
102 EXTRA_LDFLAGS += $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive)
103 EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
104
105 CONFIGURE_ARGS += \
106 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
107 --disable-debug \
108 --disable-documentation \
109 --disable-test \
110 --disable-aac \
111 --disable-adplug \
112 --disable-ao \
113 --disable-audiofile \
114 --disable-bzip2 \
115 --disable-cdio-paranoia \
116 --disable-fluidsynth \
117 --disable-wildmidi \
118 --disable-gme \
119 --enable-inotify \
120 --disable-icu \
121 --enable-iconv \
122 --disable-iso9660 \
123 --disable-jack \
124 --disable-roar \
125 --disable-libwrap \
126 --disable-lsr \
127 --disable-mad \
128 --disable-mikmod \
129 --disable-modplug \
130 --disable-mpc \
131 --disable-nfs \
132 --disable-openal \
133 --disable-opus \
134 --disable-pulse \
135 --disable-sidplay \
136 --disable-smbclient \
137 --disable-sndfile \
138 --disable-solaris-output \
139 --disable-sqlite \
140 --disable-systemd-daemon \
141 --disable-lame-encoder \
142 --disable-twolame-encoder \
143 --disable-shine-encoder \
144 --disable-vorbis-encoder \
145 --enable-wave-encoder \
146 --disable-wavpack \
147 --disable-webdav \
148 --disable-wildmidi \
149 --disable-zzip \
150 --with-zeroconf=no \
151 --disable-soxr \
152 --enable-curl \
153 --enable-httpd-output \
154 $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
155 --enable-tcp \
156 --disable-sndio \
157 --disable-haiku
158
159
160 ifeq ($(BUILD_VARIANT),full)
161
162 CONFIGURE_ARGS += \
163 --enable-upnp \
164 --enable-ffmpeg \
165 --disable-flac \
166 --enable-id3 \
167 --enable-mms \
168 --disable-mpg123 \
169 --enable-pipe-output \
170 --enable-recorder-output \
171 --enable-shout \
172 --disable-vorbis
173 endif
174
175 ifeq ($(BUILD_VARIANT),mini)
176
177 # oggflac is not compatible with tremor
178 CONFIGURE_ARGS += \
179 --disable-upnp \
180 --disable-fifo \
181 --disable-ffmpeg \
182 --disable-id3 \
183 --disable-mms \
184 --disable-shout \
185 --enable-vorbis \
186 --with-tremor=yes \
187 --disable-recorder-output
188 endif
189
190 define Package/mpd/install
191 $(INSTALL_DIR) $(1)/usr/bin
192 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
193 $(INSTALL_DIR) $(1)/etc
194 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
195 $(INSTALL_DIR) $(1)/etc/init.d
196 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
197 endef
198
199 define Package/mpd-full/install
200 $(call Package/mpd/install,$1)
201 endef
202
203 define Package/mpd-mini/install
204 $(call Package/mpd/install,$1)
205 endef
206
207 define Package/mpd-avahi-service/install
208 $(INSTALL_DIR) $(1)/etc/avahi/services
209 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
210 endef
211
212 $(eval $(call BuildPackage,mpd-full))
213 $(eval $(call BuildPackage,mpd-mini))
214 $(eval $(call BuildPackage,mpd-avahi-service))