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.

247 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.5
  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:=f22c2c25093a05f4566f9cd7207cfbcd8405af67ed29a989bcf8905f80b7a299
  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 +libsoxr +!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. -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  141. -Dao=disabled \
  142. -Dhttpd=true \
  143. -Djack=disabled \
  144. -Dopenal=disabled \
  145. -Doss=disabled \
  146. -Dpipewire=disabled \
  147. -Dsnapcast=false \
  148. -Dsndio=disabled \
  149. -Dsolaris_output=disabled \
  150. -Ddbus=disabled \
  151. -Dexpat=enabled \
  152. -Dicu=disabled \
  153. -Diconv=enabled \
  154. -Dpcre=disabled \
  155. -Dsqlite=disabled \
  156. -Dzlib=enabled \
  157. -Dzeroconf=disabled
  158. ifeq ($(BUILD_VARIANT),full)
  159. MESON_ARGS += \
  160. -Dupnp=npupnp \
  161. -Dmms=enabled \
  162. -Dsoundcloud=enabled \
  163. -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
  164. -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
  165. -Dtremor=disabled \
  166. -Dvorbis=enabled \
  167. -Dfifo=true \
  168. -Dpipe=true \
  169. -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  170. -Drecorder=true \
  171. -Dshout=enabled \
  172. -Dyajl=enabled \
  173. -Dvorbisenc=enabled \
  174. -Dlame=enabled \
  175. -Dsoxr=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. -Dsoxr=disabled
  197. endif
  198. define Package/mpd/install
  199. $(INSTALL_DIR) $(1)/usr/bin
  200. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  201. $(INSTALL_DIR) $(1)/etc
  202. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  203. $(INSTALL_DIR) $(1)/etc/init.d
  204. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  205. endef
  206. define Package/mpd-full/install
  207. $(call Package/mpd/install,$1)
  208. endef
  209. define Package/mpd-mini/install
  210. $(call Package/mpd/install,$1)
  211. endef
  212. define Package/mpd-avahi-service/install
  213. $(INSTALL_DIR) $(1)/etc/avahi/services
  214. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  215. endef
  216. $(eval $(call BuildPackage,mpd-full))
  217. $(eval $(call BuildPackage,mpd-mini))
  218. $(eval $(call BuildPackage,mpd-avahi-service))