Merge pull request #12342 from PolynomialDivision/feature/add_dawn_node_exporter
[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.21.24
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
13 PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.21/
14 PKG_HASH:=84632a7e82e672b3a6d71651a75d05fb7acd62645c33e3f3af5a1067cfa64cd6
15
16 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
17 PKG_LICENSE:=GPL-2.0-or-later
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_CONFIG_DEPENDS:= \
21 CONFIG_IPV6 \
22
23 PKG_INSTALL:=1
24 PKG_USE_MIPS16:=0
25
26 include $(INCLUDE_DIR)/package.mk
27 include $(INCLUDE_DIR)/nls.mk
28 include ../../devel/meson/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 +libstdcpp $(ICONV_DEPENDS) \
36 +AUDIO_SUPPORT:alsa-lib +boost +libexpat +libflac +libid3tag +libfaad2 +USE_UCLIBC:icu
37 endef
38
39 define Package/mpd/Default/description
40 Music Player Daemon (MPD) is a flexible, powerful, server-side
41 application for playing music. It is typically controlled over a
42 network using one of it's many clients including mpc (console),
43 gmpc (gnome), phpmp (php), etc...
44 endef
45
46 define Package/mpd-full
47 $(call Package/mpd/Default)
48 TITLE+= (full)
49 DEPENDS+= +libffmpeg +libvorbis +libmms +libupnp +libshout +pulseaudio-daemon +yajl
50 PROVIDES:=mpd
51 VARIANT:=full
52 endef
53
54 define Package/mpd-full/description
55 $(call Package/mpd/Default/description)
56 .
57 This package contains a full-blown Music Player Daemon.
58 endef
59
60 define Package/mpd-full/conffiles
61 /etc/mpd.conf
62 endef
63
64 define Package/mpd-mini
65 $(call Package/mpd/Default)
66 TITLE+= (mini)
67 DEPENDS+= +libmad +libvorbisidec
68 PROVIDES:=mpd
69 VARIANT:=mini
70 endef
71
72 define Package/mpd-mini/description
73 $(call Package/mpd/Default/description)
74 .
75 This package contains a minimal Music Player Daemon, with support for
76 only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
77 endef
78
79 define Package/mpd-mini/conffiles
80 /etc/mpd.conf
81 endef
82
83 define Package/mpd-avahi-service
84 $(call Package/mpd/Default)
85 TITLE+= (Avahi service)
86 DEPENDS+=+avahi-daemon
87 endef
88
89 define Package/mpd-avahi-service/description
90 $(call Package/mpd/Default/description)
91 .
92 This package contains the service definition for announcing the
93 Music Player Daemon service via mDNS/DNS-SD.
94 endef
95
96 define Package/mpd-avahi-service/conffiles
97 /etc/avahi/services/mpd.service
98 endef
99
100 TARGET_LDFLAGS += \
101 $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive) \
102 $(if $(CONFIG_USE_GLIBC),-lpthread) \
103 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
104
105 MESON_ARGS += \
106 -Ddocumentation=false \
107 -Dtest=false \
108 -Dsyslog=enabled \
109 -Dinotify=true \
110 -Ddaemon=false \
111 -Dsystemd=disabled \
112 -Dtcp=true \
113 -Dipv6=$(if $(CONFIG_IPV6),enabled,disabled) \
114 -Dlocal_socket=true \
115 -Ddsd=false \
116 -Ddatabase=true \
117 -Dlibmpdclient=enabled \
118 -Dneighbor=false \
119 -Dudisks=disabled \
120 -Dwebdav=enabled \
121 -Dcue=true \
122 -Dcdio_paranoia=disabled \
123 -Dcurl=enabled \
124 -Dnfs=disabled \
125 -Dsmbclient=disabled \
126 -Dqobuz=disabled \
127 -Dtidal=disabled \
128 -Dbzip2=disabled \
129 -Diso9660=disabled \
130 -Dzzip=disabled \
131 -Did3tag=enabled \
132 -Dchromaprint=disabled \
133 -Dadplug=disabled \
134 -Daudiofile=disabled \
135 -Dfaad=enabled \
136 -Dflac=enabled \
137 -Dfluidsynth=disabled \
138 -Dgme=disabled \
139 -Dmpg123=disabled \
140 -Dmikmod=disabled \
141 -Dmodplug=disabled \
142 -Dmpcdec=disabled \
143 -Dopus=disabled \
144 -Dsidplay=disabled \
145 -Dsndfile=disabled \
146 -Dwavpack=disabled \
147 -Dwildmidi=disabled \
148 -Dvorbisenc=disabled \
149 -Dlame=disabled \
150 -Dtwolame=disabled \
151 -Dshine=disabled \
152 -Dwave_encoder=true \
153 -Dlibsamplerate=disabled \
154 -Dsoxr=disabled \
155 -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),enabled,disabled) \
156 -Dao=disabled \
157 -Dhttpd=true \
158 -Djack=disabled \
159 -Dopenal=disabled \
160 -Doss=disabled \
161 -Dsndio=disabled \
162 -Dsolaris_output=disabled \
163 -Ddbus=disabled \
164 -Dexpat=enabled \
165 -Dicu=$(if $(CONFIG_USE_UCLIBC),enabled,disabled) \
166 -Diconv=$(if $(CONFIG_USE_UCLIBC),disabled,enabled) \
167 -Dpcre=disabled \
168 -Dsqlite=disabled \
169 -Dzlib=enabled \
170 -Dzeroconf=disabled
171
172
173 ifeq ($(BUILD_VARIANT),full)
174
175 MESON_ARGS += \
176 -Dupnp=enabled \
177 -Dmms=enabled \
178 -Dsoundcloud=enabled \
179 -Dffmpeg=enabled \
180 -Dmad=disabled \
181 -Dtremor=disabled \
182 -Dvorbis=enabled \
183 -Dfifo=true \
184 -Dpipe=true \
185 -Dpulse=enabled \
186 -Drecorder=true \
187 -Dshout=enabled \
188 -Dyajl=enabled
189 endif
190
191 ifeq ($(BUILD_VARIANT),mini)
192
193 # oggflac is not compatible with tremor
194 MESON_ARGS += \
195 -Dupnp=disabled \
196 -Dmms=disabled \
197 -Dsoundcloud=disabled \
198 -Dffmpeg=disabled \
199 -Dmad=enabled \
200 -Dtremor=enabled \
201 -Dvorbis=disabled \
202 -Dfifo=false \
203 -Dpipe=false \
204 -Dpulse=disabled \
205 -Drecorder=false \
206 -Dshout=disabled \
207 -Dyajl=disabled
208 endif
209
210 define Package/mpd/install
211 $(INSTALL_DIR) $(1)/usr/bin
212 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
213 $(INSTALL_DIR) $(1)/etc
214 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
215 $(INSTALL_DIR) $(1)/etc/init.d
216 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
217 endef
218
219 define Package/mpd-full/install
220 $(call Package/mpd/install,$1)
221 endef
222
223 define Package/mpd-mini/install
224 $(call Package/mpd/install,$1)
225 endef
226
227 define Package/mpd-avahi-service/install
228 $(INSTALL_DIR) $(1)/etc/avahi/services
229 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
230 endef
231
232 $(eval $(call BuildPackage,mpd-full))
233 $(eval $(call BuildPackage,mpd-mini))
234 $(eval $(call BuildPackage,mpd-avahi-service))