d6b645615eb8b4083454f7cbc3460a44d5cb62d1
[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.8
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:=86bb569bf3b519821f36f6bb5564e484e85d2564411b34b200fe2cd3a04e78cf
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_USE_MIPS16:=0
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/nls.mk
28 include $(INCLUDE_DIR)/meson.mk
29
30 define Package/mpd/Default
31 SECTION:=sound
32 CATEGORY:=Sound
33 TITLE:=Music Player Daemon
34 URL:=https://www.musicpd.org/
35 DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +boost $(ICONV_DEPENDS) +libfmt \
36 +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
37 USERID:=mpd:mpd
38 endef
39
40 define Package/mpd/Default/description
41 Music Player Daemon (MPD) is a flexible, powerful, server-side
42 application for playing music. It is typically controlled over a
43 network using one of it's many clients including mpc (console),
44 gmpc (gnome), phpmp (php), etc...
45 endef
46
47 define Package/mpd-full
48 $(call Package/mpd/Default)
49 TITLE+= (full)
50 DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libnpupnp +libshout +yajl \
51 +libffmpeg +lame-lib +libsoxr +!BUILD_PATENTED:libmad
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+= +libmad +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, AAC, 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-dbus-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 MESON_ARGS += \
103 -Ddocumentation=disabled \
104 -Dhtml_manual=false \
105 -Dmanpages=false \
106 -Dsyslog=enabled \
107 -Dinotify=true \
108 -Dio_uring=disabled \
109 -Ddaemon=false \
110 -Dsystemd=disabled \
111 -Dtest=false \
112 -Dfuzzer=false \
113 -Depoll=true \
114 -Deventfd=true \
115 -Dsignalfd=true \
116 -Dtcp=true \
117 -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
118 -Dlocal_socket=true \
119 -Ddsd=false \
120 -Ddatabase=true \
121 -Dlibmpdclient=enabled \
122 -Dneighbor=false \
123 -Dudisks=disabled \
124 -Dwebdav=enabled \
125 -Dcue=true \
126 -Dcdio_paranoia=disabled \
127 -Dcurl=enabled \
128 -Dnfs=disabled \
129 -Dsmbclient=disabled \
130 -Dqobuz=disabled \
131 -Dbzip2=disabled \
132 -Diso9660=disabled \
133 -Dzzip=disabled \
134 -Did3tag=enabled \
135 -Dchromaprint=disabled \
136 -Dadplug=disabled \
137 -Daudiofile=disabled \
138 -Dfaad=enabled \
139 -Dflac=enabled \
140 -Dfluidsynth=disabled \
141 -Dgme=disabled \
142 -Dmikmod=disabled \
143 -Dmodplug=disabled \
144 -Dmpcdec=disabled \
145 -Dmpg123=disabled \
146 -Dopenmpt=disabled \
147 -Dopus=enabled \
148 -Dsidplay=disabled \
149 -Dsndfile=disabled \
150 -Dwavpack=disabled \
151 -Dwildmidi=disabled \
152 -Dvorbisenc=disabled \
153 -Dlame=disabled \
154 -Dtwolame=disabled \
155 -Dshine=disabled \
156 -Dwave_encoder=true \
157 -Dlibsamplerate=disabled \
158 -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
159 -Dao=disabled \
160 -Dhttpd=true \
161 -Djack=disabled \
162 -Dopenal=disabled \
163 -Doss=disabled \
164 -Dpipewire=disabled \
165 -Dsnapcast=false \
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=npupnp \
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 -Dsoxr=enabled
196
197 ifeq ($(CONFIG_AUDIO_SUPPORT),y)
198 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
199 endif
200 endif
201
202 ifeq ($(BUILD_VARIANT),mini)
203
204 # oggflac is not compatible with tremor
205 MESON_ARGS += \
206 -Dupnp=disabled \
207 -Dmms=disabled \
208 -Dsoundcloud=disabled \
209 -Dffmpeg=disabled \
210 -Dmad=enabled \
211 -Dtremor=enabled \
212 -Dvorbis=disabled \
213 -Dfifo=false \
214 -Dpipe=false \
215 -Dpulse=disabled \
216 -Drecorder=false \
217 -Dshout=disabled \
218 -Dyajl=disabled \
219 -Dsoxr=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))