Merge pull request #16644 from neheb/1m
[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.22.9
10 PKG_RELEASE:=$(AUTORELEASE)
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
13 PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.22/
14 PKG_HASH:=f937403297c2240bd4a569f4b937ee7ab17398a5284ba9df4d6d4c3a0512bc64
15
16 PKG_MAINTAINER:=
17 PKG_LICENSE:=GPL-2.0-or-later
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_CONFIG_DEPENDS:= \
21 CONFIG_BUILD_PATENTED \
22 CONFIG_IPV6 \
23
24 PKG_INSTALL:=1
25 PKG_USE_MIPS16:=0
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/nls.mk
29 include $(INCLUDE_DIR)/meson.mk
30
31 define Package/mpd/Default
32 SECTION:=sound
33 CATEGORY:=Sound
34 TITLE:=Music Player Daemon
35 URL:=https://www.musicpd.org/
36 DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +boost $(ICONV_DEPENDS) \
37 +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
38 USERID:=mpd:mpd
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+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libupnp +libshout +yajl \
52 +libffmpeg +lame-lib +!BUILD_PATENTED:libmad
53 PROVIDES:=mpd
54 VARIANT:=full
55 endef
56
57 define Package/mpd-full/description
58 $(call Package/mpd/Default/description)
59 .
60 This package contains a full-blown Music Player Daemon.
61 endef
62
63 define Package/mpd-full/conffiles
64 /etc/mpd.conf
65 endef
66
67 define Package/mpd-mini
68 $(call Package/mpd/Default)
69 TITLE+= (mini)
70 DEPENDS+= +libmad +libvorbisidec
71 PROVIDES:=mpd
72 VARIANT:=mini
73 endef
74
75 define Package/mpd-mini/description
76 $(call Package/mpd/Default/description)
77 .
78 This package contains a minimal Music Player Daemon, with support for
79 only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
80 endef
81
82 define Package/mpd-mini/conffiles
83 /etc/mpd.conf
84 endef
85
86 define Package/mpd-avahi-service
87 $(call Package/mpd/Default)
88 TITLE+= (Avahi service)
89 DEPENDS+=+avahi-dbus-daemon
90 endef
91
92 define Package/mpd-avahi-service/description
93 $(call Package/mpd/Default/description)
94 .
95 This package contains the service definition for announcing the
96 Music Player Daemon service via mDNS/DNS-SD.
97 endef
98
99 define Package/mpd-avahi-service/conffiles
100 /etc/avahi/services/mpd.service
101 endef
102
103 MESON_ARGS += \
104 -Ddocumentation=disabled \
105 -Dhtml_manual=false \
106 -Dmanpages=false \
107 -Dsyslog=enabled \
108 -Dinotify=true \
109 -Dio_uring=disabled \
110 -Ddaemon=false \
111 -Dsystemd=disabled \
112 -Dtest=false \
113 -Dfuzzer=false \
114 -Depoll=true \
115 -Deventfd=true \
116 -Dsignalfd=true \
117 -Dtcp=true \
118 -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
119 -Dlocal_socket=true \
120 -Ddsd=false \
121 -Ddatabase=true \
122 -Dlibmpdclient=enabled \
123 -Dneighbor=false \
124 -Dudisks=disabled \
125 -Dwebdav=enabled \
126 -Dcue=true \
127 -Dcdio_paranoia=disabled \
128 -Dcurl=enabled \
129 -Dnfs=disabled \
130 -Dsmbclient=disabled \
131 -Dqobuz=disabled \
132 -Dtidal=disabled \
133 -Dbzip2=disabled \
134 -Diso9660=disabled \
135 -Dzzip=disabled \
136 -Did3tag=enabled \
137 -Dchromaprint=disabled \
138 -Dadplug=disabled \
139 -Daudiofile=disabled \
140 -Dfaad=enabled \
141 -Dflac=enabled \
142 -Dfluidsynth=disabled \
143 -Dgme=disabled \
144 -Dmpg123=disabled \
145 -Dmikmod=disabled \
146 -Dmodplug=disabled \
147 -Dmpcdec=disabled \
148 -Dopus=enabled \
149 -Dsidplay=disabled \
150 -Dsndfile=disabled \
151 -Dwavpack=disabled \
152 -Dwildmidi=disabled \
153 -Dvorbisenc=disabled \
154 -Dlame=disabled \
155 -Dtwolame=disabled \
156 -Dshine=disabled \
157 -Dwave_encoder=true \
158 -Dlibsamplerate=disabled \
159 -Dsoxr=disabled \
160 -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
161 -Dao=disabled \
162 -Dhttpd=true \
163 -Djack=disabled \
164 -Dopenal=disabled \
165 -Doss=disabled \
166 -Dsndio=disabled \
167 -Dsolaris_output=disabled \
168 -Ddbus=disabled \
169 -Dexpat=enabled \
170 -Dicu=disabled \
171 -Diconv=enabled \
172 -Dpcre=disabled \
173 -Dsqlite=disabled \
174 -Dzlib=enabled \
175 -Dzeroconf=disabled
176
177 ifeq ($(BUILD_VARIANT),full)
178
179 MESON_ARGS += \
180 -Dupnp=enabled \
181 -Dmms=enabled \
182 -Dsoundcloud=enabled \
183 -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
184 -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
185 -Dtremor=disabled \
186 -Dvorbis=enabled \
187 -Dfifo=true \
188 -Dpipe=true \
189 -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
190 -Drecorder=true \
191 -Dshout=enabled \
192 -Dyajl=enabled \
193 -Dvorbisenc=enabled \
194 -Dlame=enabled
195
196 ifeq ($(CONFIG_AUDIO_SUPPORT),y)
197 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
198 endif
199 endif
200
201 ifeq ($(BUILD_VARIANT),mini)
202
203 # oggflac is not compatible with tremor
204 MESON_ARGS += \
205 -Dupnp=disabled \
206 -Dmms=disabled \
207 -Dsoundcloud=disabled \
208 -Dffmpeg=disabled \
209 -Dmad=enabled \
210 -Dtremor=enabled \
211 -Dvorbis=disabled \
212 -Dfifo=false \
213 -Dpipe=false \
214 -Dpulse=disabled \
215 -Drecorder=false \
216 -Dshout=disabled \
217 -Dyajl=disabled
218 endif
219
220 define Package/mpd/install
221 $(INSTALL_DIR) $(1)/usr/bin
222 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
223 $(INSTALL_DIR) $(1)/etc
224 $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
225 $(INSTALL_DIR) $(1)/etc/init.d
226 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
227 endef
228
229 define Package/mpd-full/install
230 $(call Package/mpd/install,$1)
231 endef
232
233 define Package/mpd-mini/install
234 $(call Package/mpd/install,$1)
235 endef
236
237 define Package/mpd-avahi-service/install
238 $(INSTALL_DIR) $(1)/etc/avahi/services
239 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
240 endef
241
242 $(eval $(call BuildPackage,mpd-full))
243 $(eval $(call BuildPackage,mpd-mini))
244 $(eval $(call BuildPackage,mpd-avahi-service))