2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
10 PKG_RELEASE
:=$(AUTORELEASE
)
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
17 PKG_LICENSE
:=GPL-2.0
-or-later
18 PKG_LICENSE_FILES
:=COPYING
20 PKG_CONFIG_DEPENDS
:= \
21 CONFIG_BUILD_PATENTED \
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/nls.mk
28 include $(INCLUDE_DIR
)/meson.mk
30 define Package
/mpd
/Default
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
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...
47 define Package/mpd-full
48 $(call Package/mpd/Default)
50 DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libnpupnp +libshout +yajl \
51 +libffmpeg +lame-lib +libsoxr +!BUILD_PATENTED:libmad
56 define Package/mpd-full/description
57 $(call Package/mpd/Default/description)
59 This package contains a full-blown Music Player Daemon.
62 define Package/mpd-full/conffiles
66 define Package/mpd-mini
67 $(call Package/mpd/Default)
69 DEPENDS+= +libmad +libvorbisidec
74 define Package/mpd-mini/description
75 $(call Package/mpd/Default/description)
77 This package contains a minimal Music Player Daemon, with support for
78 only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
81 define Package/mpd-mini/conffiles
85 define Package/mpd-avahi-service
86 $(call Package/mpd/Default)
87 TITLE+= (Avahi service)
88 DEPENDS+=+avahi-dbus-daemon
91 define Package/mpd-avahi-service/description
92 $(call Package/mpd/Default/description)
94 This package contains the service definition for announcing the
95 Music Player Daemon service via mDNS/DNS-SD.
98 define Package/mpd-avahi-service/conffiles
99 /etc/avahi/services/mpd.service
103 -Ddocumentation=disabled \
104 -Dhtml_manual=false \
108 -Dio_uring=disabled \
117 -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
118 -Dlocal_socket=true \
121 -Dlibmpdclient=enabled \
126 -Dcdio_paranoia=disabled \
129 -Dsmbclient=disabled \
135 -Dchromaprint=disabled \
137 -Daudiofile=disabled \
140 -Dfluidsynth=disabled \
151 -Dwildmidi=disabled \
152 -Dvorbisenc=disabled \
156 -Dwave_encoder=true \
157 -Dlibsamplerate=disabled \
158 -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
164 -Dpipewire=disabled \
167 -Dsolaris_output=disabled \
177 ifeq ($(BUILD_VARIANT),full)
182 -Dsoundcloud=enabled \
183 -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
184 -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
189 -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
193 -Dvorbisenc=enabled \
197 ifeq ($(CONFIG_AUDIO_SUPPORT),y)
198 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
202 ifeq ($(BUILD_VARIANT),mini)
204 # oggflac is not compatible with tremor
208 -Dsoundcloud=disabled \
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
231 define Package/mpd-full/install
232 $(call Package/mpd/install,$1)
235 define Package/mpd-mini/install
236 $(call Package/mpd/install,$1)
239 define Package/mpd-avahi-service/install
240 $(INSTALL_DIR) $(1)/etc/avahi/services
241 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
244 $(eval $(call BuildPackage,mpd-full))
245 $(eval $(call BuildPackage,mpd-mini))
246 $(eval $(call BuildPackage,mpd-avahi-service))