2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
13 PKG_SOURCE_URL
:=https
://www.musicpd.org
/download
/mpd
/0.23
14 PKG_HASH
:=550132239ad1acf82ccf8905b56cc13dc2c81a4489b96fba7731b3049907661a
17 PKG_LICENSE
:=GPL-2.0
-or-later
18 PKG_LICENSE_FILES
:=COPYING
20 PKG_CONFIG_DEPENDS
:= \
21 CONFIG_AUDIO_SUPPORT \
22 CONFIG_BUILD_PATENTED \
25 PKG_BUILD_FLAGS
:=no-mips16 no-lto
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/nls.mk
29 include $(INCLUDE_DIR
)/meson.mk
31 define Package
/mpd
/Default
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
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...
48 define Package/mpd-full
49 $(call Package/mpd/Default)
51 DEPENDS+= +AUDIO_SUPPORT:pulseaudio +libvorbis +libmms +libnpupnp +libshout +yajl \
52 +libffmpeg +lame-lib +libsoxr +!BUILD_PATENTED:libmad
57 define Package/mpd-full/description
58 $(call Package/mpd/Default/description)
60 This package contains a full-blown Music Player Daemon.
63 define Package/mpd-full/conffiles
67 define Package/mpd-mini
68 $(call Package/mpd/Default)
70 DEPENDS+= +libmad +libvorbisidec
75 define Package/mpd-mini/description
76 $(call Package/mpd/Default/description)
78 This package contains a minimal Music Player Daemon, with support for
79 only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
82 define Package/mpd-mini/conffiles
86 define Package/mpd-avahi-service
87 $(call Package/mpd/Default)
88 TITLE+= (Avahi service)
89 DEPENDS+=+avahi-dbus-daemon
92 define Package/mpd-avahi-service/description
93 $(call Package/mpd/Default/description)
95 This package contains the service definition for announcing the
96 Music Player Daemon service via mDNS/DNS-SD.
99 define Package/mpd-avahi-service/conffiles
100 /etc/avahi/services/mpd.service
104 -Ddocumentation=disabled \
105 -Dhtml_manual=false \
109 -Dio_uring=disabled \
118 -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
119 -Dlocal_socket=true \
122 -Dlibmpdclient=enabled \
127 -Dcdio_paranoia=disabled \
130 -Dsmbclient=disabled \
136 -Dchromaprint=disabled \
138 -Daudiofile=disabled \
141 -Dfluidsynth=disabled \
152 -Dwildmidi=disabled \
153 -Dvorbisenc=disabled \
157 -Dwave_encoder=true \
158 -Dlibsamplerate=disabled \
159 -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
165 -Dpipewire=disabled \
168 -Dsolaris_output=disabled \
178 ifeq ($(BUILD_VARIANT),full)
183 -Dsoundcloud=enabled \
185 -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
190 -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
194 -Dvorbisenc=enabled \
198 ifeq ($(CONFIG_AUDIO_SUPPORT),y)
199 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
203 ifeq ($(BUILD_VARIANT),mini)
205 # oggflac is not compatible with tremor
209 -Dsoundcloud=disabled \
223 define Package/mpd/install
224 $(INSTALL_DIR) $(1)/usr/bin
225 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
226 $(INSTALL_DIR) $(1)/etc
227 $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
228 $(INSTALL_DIR) $(1)/etc/init.d
229 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
232 define Package/mpd-full/install
233 $(call Package/mpd/install,$1)
236 define Package/mpd-mini/install
237 $(call Package/mpd/install,$1)
240 define Package/mpd-avahi-service/install
241 $(INSTALL_DIR) $(1)/etc/avahi/services
242 $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
245 $(eval $(call BuildPackage,mpd-full))
246 $(eval $(call BuildPackage,mpd-mini))
247 $(eval $(call BuildPackage,mpd-avahi-service))