80ef37df2d3ff91a5e02dc1b511da8cd83c4c2ea
[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.23.5
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.23
14 PKG_HASH:=f22c2c25093a05f4566f9cd7207cfbcd8405af67ed29a989bcf8905f80b7a299
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) +libfmt \
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 +libnpupnp +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 -Dbzip2=disabled \
133 -Diso9660=disabled \
134 -Dzzip=disabled \
135 -Did3tag=enabled \
136 -Dchromaprint=disabled \
137 -Dadplug=disabled \
138 -Daudiofile=disabled \
139 -Dfaad=enabled \
140 -Dflac=enabled \
141 -Dfluidsynth=disabled \
142 -Dgme=disabled \
143 -Dmikmod=disabled \
144 -Dmodplug=disabled \
145 -Dmpcdec=disabled \
146 -Dmpg123=disabled \
147 -Dopenmpt=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 -Dpipewire=disabled \
167 -Dsnapcast=false \
168 -Dsndio=disabled \
169 -Dsolaris_output=disabled \
170 -Ddbus=disabled \
171 -Dexpat=enabled \
172 -Dicu=disabled \
173 -Diconv=enabled \
174 -Dpcre=disabled \
175 -Dsqlite=disabled \
176 -Dzlib=enabled \
177 -Dzeroconf=disabled
178
179 ifeq ($(BUILD_VARIANT),full)
180
181 MESON_ARGS += \
182 -Dupnp=npupnp \
183 -Dmms=enabled \
184 -Dsoundcloud=enabled \
185 -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
186 -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
187 -Dtremor=disabled \
188 -Dvorbis=enabled \
189 -Dfifo=true \
190 -Dpipe=true \
191 -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
192 -Drecorder=true \
193 -Dshout=enabled \
194 -Dyajl=enabled \
195 -Dvorbisenc=enabled \
196 -Dlame=enabled
197
198 ifeq ($(CONFIG_AUDIO_SUPPORT),y)
199 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
200 endif
201 endif
202
203 ifeq ($(BUILD_VARIANT),mini)
204
205 # oggflac is not compatible with tremor
206 MESON_ARGS += \
207 -Dupnp=disabled \
208 -Dmms=disabled \
209 -Dsoundcloud=disabled \
210 -Dffmpeg=disabled \
211 -Dmad=enabled \
212 -Dtremor=enabled \
213 -Dvorbis=disabled \
214 -Dfifo=false \
215 -Dpipe=false \
216 -Dpulse=disabled \
217 -Drecorder=false \
218 -Dshout=disabled \
219 -Dyajl=disabled
220 endif
221
222 define Package/mpd/install
223 $(INSTALL_DIR) $(1)/usr/bin
224 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
225 $(INSTALL_DIR) $(1)/etc
226 $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
227 $(INSTALL_DIR) $(1)/etc/init.d
228 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
229 endef
230
231 define Package/mpd-full/install
232 $(call Package/mpd/install,$1)
233 endef
234
235 define Package/mpd-mini/install
236 $(call Package/mpd/install,$1)
237 endef
238
239 define Package/mpd-avahi-service/install
240 $(INSTALL_DIR) $(1)/etc/avahi/services
241 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
242 endef
243
244 $(eval $(call BuildPackage,mpd-full))
245 $(eval $(call BuildPackage,mpd-mini))
246 $(eval $(call BuildPackage,mpd-avahi-service))