You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

246 lines
5.6 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=mpd
  7. PKG_VERSION:=0.23.2
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.23
  11. PKG_HASH:=74ec75689746baaeab7c65d70019f96f70b31b658cb25cfd2ebcca03f65acddf
  12. PKG_MAINTAINER:=
  13. PKG_LICENSE:=GPL-2.0-or-later
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_CONFIG_DEPENDS:= \
  16. CONFIG_BUILD_PATENTED \
  17. CONFIG_IPV6 \
  18. PKG_INSTALL:=1
  19. PKG_USE_MIPS16:=0
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. include $(INCLUDE_DIR)/meson.mk
  23. define Package/mpd/Default
  24. SECTION:=sound
  25. CATEGORY:=Sound
  26. TITLE:=Music Player Daemon
  27. URL:=https://www.musicpd.org/
  28. DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +boost $(ICONV_DEPENDS) +libfmt \
  29. +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
  30. USERID:=mpd:mpd
  31. endef
  32. define Package/mpd/Default/description
  33. Music Player Daemon (MPD) is a flexible, powerful, server-side
  34. application for playing music. It is typically controlled over a
  35. network using one of it's many clients including mpc (console),
  36. gmpc (gnome), phpmp (php), etc...
  37. endef
  38. define Package/mpd-full
  39. $(call Package/mpd/Default)
  40. TITLE+= (full)
  41. DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libnpupnp +libshout +yajl \
  42. +libffmpeg +lame-lib +!BUILD_PATENTED:libmad
  43. PROVIDES:=mpd
  44. VARIANT:=full
  45. endef
  46. define Package/mpd-full/description
  47. $(call Package/mpd/Default/description)
  48. .
  49. This package contains a full-blown Music Player Daemon.
  50. endef
  51. define Package/mpd-full/conffiles
  52. /etc/mpd.conf
  53. endef
  54. define Package/mpd-mini
  55. $(call Package/mpd/Default)
  56. TITLE+= (mini)
  57. DEPENDS+= +libmad +libvorbisidec
  58. PROVIDES:=mpd
  59. VARIANT:=mini
  60. endef
  61. define Package/mpd-mini/description
  62. $(call Package/mpd/Default/description)
  63. .
  64. This package contains a minimal Music Player Daemon, with support for
  65. only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
  66. endef
  67. define Package/mpd-mini/conffiles
  68. /etc/mpd.conf
  69. endef
  70. define Package/mpd-avahi-service
  71. $(call Package/mpd/Default)
  72. TITLE+= (Avahi service)
  73. DEPENDS+=+avahi-dbus-daemon
  74. endef
  75. define Package/mpd-avahi-service/description
  76. $(call Package/mpd/Default/description)
  77. .
  78. This package contains the service definition for announcing the
  79. Music Player Daemon service via mDNS/DNS-SD.
  80. endef
  81. define Package/mpd-avahi-service/conffiles
  82. /etc/avahi/services/mpd.service
  83. endef
  84. MESON_ARGS += \
  85. -Ddocumentation=disabled \
  86. -Dhtml_manual=false \
  87. -Dmanpages=false \
  88. -Dsyslog=enabled \
  89. -Dinotify=true \
  90. -Dio_uring=disabled \
  91. -Ddaemon=false \
  92. -Dsystemd=disabled \
  93. -Dtest=false \
  94. -Dfuzzer=false \
  95. -Depoll=true \
  96. -Deventfd=true \
  97. -Dsignalfd=true \
  98. -Dtcp=true \
  99. -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
  100. -Dlocal_socket=true \
  101. -Ddsd=false \
  102. -Ddatabase=true \
  103. -Dlibmpdclient=enabled \
  104. -Dneighbor=false \
  105. -Dudisks=disabled \
  106. -Dwebdav=enabled \
  107. -Dcue=true \
  108. -Dcdio_paranoia=disabled \
  109. -Dcurl=enabled \
  110. -Dnfs=disabled \
  111. -Dsmbclient=disabled \
  112. -Dqobuz=disabled \
  113. -Dbzip2=disabled \
  114. -Diso9660=disabled \
  115. -Dzzip=disabled \
  116. -Did3tag=enabled \
  117. -Dchromaprint=disabled \
  118. -Dadplug=disabled \
  119. -Daudiofile=disabled \
  120. -Dfaad=enabled \
  121. -Dflac=enabled \
  122. -Dfluidsynth=disabled \
  123. -Dgme=disabled \
  124. -Dmikmod=disabled \
  125. -Dmodplug=disabled \
  126. -Dmpcdec=disabled \
  127. -Dmpg123=disabled \
  128. -Dopenmpt=disabled \
  129. -Dopus=enabled \
  130. -Dsidplay=disabled \
  131. -Dsndfile=disabled \
  132. -Dwavpack=disabled \
  133. -Dwildmidi=disabled \
  134. -Dvorbisenc=disabled \
  135. -Dlame=disabled \
  136. -Dtwolame=disabled \
  137. -Dshine=disabled \
  138. -Dwave_encoder=true \
  139. -Dlibsamplerate=disabled \
  140. -Dsoxr=disabled \
  141. -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  142. -Dao=disabled \
  143. -Dhttpd=true \
  144. -Djack=disabled \
  145. -Dopenal=disabled \
  146. -Doss=disabled \
  147. -Dpipewire=disabled \
  148. -Dsnapcast=false \
  149. -Dsndio=disabled \
  150. -Dsolaris_output=disabled \
  151. -Ddbus=disabled \
  152. -Dexpat=enabled \
  153. -Dicu=disabled \
  154. -Diconv=enabled \
  155. -Dpcre=disabled \
  156. -Dsqlite=disabled \
  157. -Dzlib=enabled \
  158. -Dzeroconf=disabled
  159. ifeq ($(BUILD_VARIANT),full)
  160. MESON_ARGS += \
  161. -Dupnp=npupnp \
  162. -Dmms=enabled \
  163. -Dsoundcloud=enabled \
  164. -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
  165. -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
  166. -Dtremor=disabled \
  167. -Dvorbis=enabled \
  168. -Dfifo=true \
  169. -Dpipe=true \
  170. -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  171. -Drecorder=true \
  172. -Dshout=enabled \
  173. -Dyajl=enabled \
  174. -Dvorbisenc=enabled \
  175. -Dlame=enabled
  176. ifeq ($(CONFIG_AUDIO_SUPPORT),y)
  177. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  178. endif
  179. endif
  180. ifeq ($(BUILD_VARIANT),mini)
  181. # oggflac is not compatible with tremor
  182. MESON_ARGS += \
  183. -Dupnp=disabled \
  184. -Dmms=disabled \
  185. -Dsoundcloud=disabled \
  186. -Dffmpeg=disabled \
  187. -Dmad=enabled \
  188. -Dtremor=enabled \
  189. -Dvorbis=disabled \
  190. -Dfifo=false \
  191. -Dpipe=false \
  192. -Dpulse=disabled \
  193. -Drecorder=false \
  194. -Dshout=disabled \
  195. -Dyajl=disabled
  196. endif
  197. define Package/mpd/install
  198. $(INSTALL_DIR) $(1)/usr/bin
  199. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  200. $(INSTALL_DIR) $(1)/etc
  201. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  202. $(INSTALL_DIR) $(1)/etc/init.d
  203. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  204. endef
  205. define Package/mpd-full/install
  206. $(call Package/mpd/install,$1)
  207. endef
  208. define Package/mpd-mini/install
  209. $(call Package/mpd/install,$1)
  210. endef
  211. define Package/mpd-avahi-service/install
  212. $(INSTALL_DIR) $(1)/etc/avahi/services
  213. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  214. endef
  215. $(eval $(call BuildPackage,mpd-full))
  216. $(eval $(call BuildPackage,mpd-mini))
  217. $(eval $(call BuildPackage,mpd-avahi-service))