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.

241 lines
5.5 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.22.6
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.22/
  11. PKG_HASH:=2be149a4895c3cb613477f8cf1193593e3d8a1d38a75ffa7d32da8c8316a4d5e
  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 ../../devel/meson/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) \
  29. +AUDIO_SUPPORT:alsa-lib +libexpat +libflac +libid3tag +libfaad2 +libopus
  30. endef
  31. define Package/mpd/Default/description
  32. Music Player Daemon (MPD) is a flexible, powerful, server-side
  33. application for playing music. It is typically controlled over a
  34. network using one of it's many clients including mpc (console),
  35. gmpc (gnome), phpmp (php), etc...
  36. endef
  37. define Package/mpd-full
  38. $(call Package/mpd/Default)
  39. TITLE+= (full)
  40. DEPENDS+= +AUDIO_SUPPORT:pulseaudio-daemon +libvorbis +libmms +libupnp +libshout +yajl \
  41. +BUILD_PATENTED:libffmpeg +!BUILD_PATENTED:libmad
  42. PROVIDES:=mpd
  43. VARIANT:=full
  44. endef
  45. define Package/mpd-full/description
  46. $(call Package/mpd/Default/description)
  47. .
  48. This package contains a full-blown Music Player Daemon.
  49. endef
  50. define Package/mpd-full/conffiles
  51. /etc/mpd.conf
  52. endef
  53. define Package/mpd-mini
  54. $(call Package/mpd/Default)
  55. TITLE+= (mini)
  56. DEPENDS+= +libmad +libvorbisidec
  57. PROVIDES:=mpd
  58. VARIANT:=mini
  59. endef
  60. define Package/mpd-mini/description
  61. $(call Package/mpd/Default/description)
  62. .
  63. This package contains a minimal Music Player Daemon, with support for
  64. only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
  65. endef
  66. define Package/mpd-mini/conffiles
  67. /etc/mpd.conf
  68. endef
  69. define Package/mpd-avahi-service
  70. $(call Package/mpd/Default)
  71. TITLE+= (Avahi service)
  72. DEPENDS+=+avahi-dbus-daemon
  73. endef
  74. define Package/mpd-avahi-service/description
  75. $(call Package/mpd/Default/description)
  76. .
  77. This package contains the service definition for announcing the
  78. Music Player Daemon service via mDNS/DNS-SD.
  79. endef
  80. define Package/mpd-avahi-service/conffiles
  81. /etc/avahi/services/mpd.service
  82. endef
  83. MESON_ARGS += \
  84. -Ddocumentation=disabled \
  85. -Dhtml_manual=false \
  86. -Dmanpages=false \
  87. -Dsyslog=enabled \
  88. -Dinotify=true \
  89. -Dio_uring=disabled \
  90. -Ddaemon=false \
  91. -Dsystemd=disabled \
  92. -Dtest=false \
  93. -Dfuzzer=false \
  94. -Depoll=true \
  95. -Deventfd=true \
  96. -Dsignalfd=true \
  97. -Dtcp=true \
  98. -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
  99. -Dlocal_socket=true \
  100. -Ddsd=false \
  101. -Ddatabase=true \
  102. -Dlibmpdclient=enabled \
  103. -Dneighbor=false \
  104. -Dudisks=disabled \
  105. -Dwebdav=enabled \
  106. -Dcue=true \
  107. -Dcdio_paranoia=disabled \
  108. -Dcurl=enabled \
  109. -Dnfs=disabled \
  110. -Dsmbclient=disabled \
  111. -Dqobuz=disabled \
  112. -Dtidal=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. -Dmpg123=disabled \
  125. -Dmikmod=disabled \
  126. -Dmodplug=disabled \
  127. -Dmpcdec=disabled \
  128. -Dopus=enabled \
  129. -Dsidplay=disabled \
  130. -Dsndfile=disabled \
  131. -Dwavpack=disabled \
  132. -Dwildmidi=disabled \
  133. -Dvorbisenc=disabled \
  134. -Dlame=disabled \
  135. -Dtwolame=disabled \
  136. -Dshine=disabled \
  137. -Dwave_encoder=true \
  138. -Dlibsamplerate=disabled \
  139. -Dsoxr=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. -Dsndio=disabled \
  147. -Dsolaris_output=disabled \
  148. -Ddbus=disabled \
  149. -Dexpat=enabled \
  150. -Dicu=disabled \
  151. -Diconv=enabled \
  152. -Dpcre=disabled \
  153. -Dsqlite=disabled \
  154. -Dzlib=enabled \
  155. -Dzeroconf=disabled
  156. ifeq ($(BUILD_VARIANT),full)
  157. MESON_ARGS += \
  158. -Dupnp=enabled \
  159. -Dmms=enabled \
  160. -Dsoundcloud=enabled \
  161. -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
  162. -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
  163. -Dtremor=disabled \
  164. -Dvorbis=enabled \
  165. -Dfifo=true \
  166. -Dpipe=true \
  167. -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  168. -Drecorder=true \
  169. -Dshout=enabled \
  170. -Dyajl=enabled
  171. ifeq ($(CONFIG_AUDIO_SUPPORT),y)
  172. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  173. endif
  174. endif
  175. ifeq ($(BUILD_VARIANT),mini)
  176. # oggflac is not compatible with tremor
  177. MESON_ARGS += \
  178. -Dupnp=disabled \
  179. -Dmms=disabled \
  180. -Dsoundcloud=disabled \
  181. -Dffmpeg=disabled \
  182. -Dmad=enabled \
  183. -Dtremor=enabled \
  184. -Dvorbis=disabled \
  185. -Dfifo=false \
  186. -Dpipe=false \
  187. -Dpulse=disabled \
  188. -Drecorder=false \
  189. -Dshout=disabled \
  190. -Dyajl=disabled
  191. endif
  192. define Package/mpd/install
  193. $(INSTALL_DIR) $(1)/usr/bin
  194. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  195. $(INSTALL_DIR) $(1)/etc
  196. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  197. $(INSTALL_DIR) $(1)/etc/init.d
  198. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  199. endef
  200. define Package/mpd-full/install
  201. $(call Package/mpd/install,$1)
  202. endef
  203. define Package/mpd-mini/install
  204. $(call Package/mpd/install,$1)
  205. endef
  206. define Package/mpd-avahi-service/install
  207. $(INSTALL_DIR) $(1)/etc/avahi/services
  208. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  209. endef
  210. $(eval $(call BuildPackage,mpd-full))
  211. $(eval $(call BuildPackage,mpd-mini))
  212. $(eval $(call BuildPackage,mpd-avahi-service))