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.

248 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_AUDIO_SUPPORT \
  17. CONFIG_BUILD_PATENTED \
  18. CONFIG_IPV6 \
  19. PKG_INSTALL:=1
  20. PKG_USE_MIPS16:=0
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. include $(INCLUDE_DIR)/meson.mk
  24. define Package/mpd/Default
  25. SECTION:=sound
  26. CATEGORY:=Sound
  27. TITLE:=Music Player Daemon
  28. URL:=https://www.musicpd.org/
  29. DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +boost $(ICONV_DEPENDS) +libfmt \
  30. +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
  31. USERID:=mpd:mpd
  32. endef
  33. define Package/mpd/Default/description
  34. Music Player Daemon (MPD) is a flexible, powerful, server-side
  35. application for playing music. It is typically controlled over a
  36. network using one of it's many clients including mpc (console),
  37. gmpc (gnome), phpmp (php), etc...
  38. endef
  39. define Package/mpd-full
  40. $(call Package/mpd/Default)
  41. TITLE+= (full)
  42. DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libnpupnp +libshout +yajl \
  43. +libffmpeg +lame-lib +libsoxr +!BUILD_PATENTED:libmad
  44. PROVIDES:=mpd
  45. VARIANT:=full
  46. endef
  47. define Package/mpd-full/description
  48. $(call Package/mpd/Default/description)
  49. .
  50. This package contains a full-blown Music Player Daemon.
  51. endef
  52. define Package/mpd-full/conffiles
  53. /etc/mpd.conf
  54. endef
  55. define Package/mpd-mini
  56. $(call Package/mpd/Default)
  57. TITLE+= (mini)
  58. DEPENDS+= +libmad +libvorbisidec
  59. PROVIDES:=mpd
  60. VARIANT:=mini
  61. endef
  62. define Package/mpd-mini/description
  63. $(call Package/mpd/Default/description)
  64. .
  65. This package contains a minimal Music Player Daemon, with support for
  66. only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
  67. endef
  68. define Package/mpd-mini/conffiles
  69. /etc/mpd.conf
  70. endef
  71. define Package/mpd-avahi-service
  72. $(call Package/mpd/Default)
  73. TITLE+= (Avahi service)
  74. DEPENDS+=+avahi-dbus-daemon
  75. endef
  76. define Package/mpd-avahi-service/description
  77. $(call Package/mpd/Default/description)
  78. .
  79. This package contains the service definition for announcing the
  80. Music Player Daemon service via mDNS/DNS-SD.
  81. endef
  82. define Package/mpd-avahi-service/conffiles
  83. /etc/avahi/services/mpd.service
  84. endef
  85. MESON_ARGS += \
  86. -Ddocumentation=disabled \
  87. -Dhtml_manual=false \
  88. -Dmanpages=false \
  89. -Dsyslog=enabled \
  90. -Dinotify=true \
  91. -Dio_uring=disabled \
  92. -Ddaemon=false \
  93. -Dsystemd=disabled \
  94. -Dtest=false \
  95. -Dfuzzer=false \
  96. -Depoll=true \
  97. -Deventfd=true \
  98. -Dsignalfd=true \
  99. -Dtcp=true \
  100. -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
  101. -Dlocal_socket=true \
  102. -Ddsd=false \
  103. -Ddatabase=true \
  104. -Dlibmpdclient=enabled \
  105. -Dneighbor=false \
  106. -Dudisks=disabled \
  107. -Dwebdav=enabled \
  108. -Dcue=true \
  109. -Dcdio_paranoia=disabled \
  110. -Dcurl=enabled \
  111. -Dnfs=disabled \
  112. -Dsmbclient=disabled \
  113. -Dqobuz=disabled \
  114. -Dbzip2=disabled \
  115. -Diso9660=disabled \
  116. -Dzzip=disabled \
  117. -Did3tag=enabled \
  118. -Dchromaprint=disabled \
  119. -Dadplug=disabled \
  120. -Daudiofile=disabled \
  121. -Dfaad=enabled \
  122. -Dflac=enabled \
  123. -Dfluidsynth=disabled \
  124. -Dgme=disabled \
  125. -Dmikmod=disabled \
  126. -Dmodplug=disabled \
  127. -Dmpcdec=disabled \
  128. -Dmpg123=disabled \
  129. -Dopenmpt=disabled \
  130. -Dopus=enabled \
  131. -Dsidplay=disabled \
  132. -Dsndfile=disabled \
  133. -Dwavpack=disabled \
  134. -Dwildmidi=disabled \
  135. -Dvorbisenc=disabled \
  136. -Dlame=disabled \
  137. -Dtwolame=disabled \
  138. -Dshine=disabled \
  139. -Dwave_encoder=true \
  140. -Dlibsamplerate=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=enabled \
  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. -Dsoxr=enabled
  177. ifeq ($(CONFIG_AUDIO_SUPPORT),y)
  178. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  179. endif
  180. endif
  181. ifeq ($(BUILD_VARIANT),mini)
  182. # oggflac is not compatible with tremor
  183. MESON_ARGS += \
  184. -Dupnp=disabled \
  185. -Dmms=disabled \
  186. -Dsoundcloud=disabled \
  187. -Dffmpeg=disabled \
  188. -Dmad=enabled \
  189. -Dtremor=enabled \
  190. -Dvorbis=disabled \
  191. -Dfifo=false \
  192. -Dpipe=false \
  193. -Dpulse=disabled \
  194. -Drecorder=false \
  195. -Dshout=disabled \
  196. -Dyajl=disabled \
  197. -Dsoxr=disabled
  198. endif
  199. define Package/mpd/install
  200. $(INSTALL_DIR) $(1)/usr/bin
  201. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  202. $(INSTALL_DIR) $(1)/etc
  203. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  204. $(INSTALL_DIR) $(1)/etc/init.d
  205. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  206. endef
  207. define Package/mpd-full/install
  208. $(call Package/mpd/install,$1)
  209. endef
  210. define Package/mpd-mini/install
  211. $(call Package/mpd/install,$1)
  212. endef
  213. define Package/mpd-avahi-service/install
  214. $(INSTALL_DIR) $(1)/etc/avahi/services
  215. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  216. endef
  217. $(eval $(call BuildPackage,mpd-full))
  218. $(eval $(call BuildPackage,mpd-mini))
  219. $(eval $(call BuildPackage,mpd-avahi-service))