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.

244 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.22.9
  8. PKG_RELEASE:=$(AUTORELEASE)
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.22/
  11. PKG_HASH:=f937403297c2240bd4a569f4b937ee7ab17398a5284ba9df4d6d4c3a0512bc64
  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) \
  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 +libupnp +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. -Dtidal=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. -Dmpg123=disabled \
  126. -Dmikmod=disabled \
  127. -Dmodplug=disabled \
  128. -Dmpcdec=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. -Dsndio=disabled \
  148. -Dsolaris_output=disabled \
  149. -Ddbus=disabled \
  150. -Dexpat=enabled \
  151. -Dicu=disabled \
  152. -Diconv=enabled \
  153. -Dpcre=disabled \
  154. -Dsqlite=disabled \
  155. -Dzlib=enabled \
  156. -Dzeroconf=disabled
  157. ifeq ($(BUILD_VARIANT),full)
  158. MESON_ARGS += \
  159. -Dupnp=enabled \
  160. -Dmms=enabled \
  161. -Dsoundcloud=enabled \
  162. -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
  163. -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
  164. -Dtremor=disabled \
  165. -Dvorbis=enabled \
  166. -Dfifo=true \
  167. -Dpipe=true \
  168. -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  169. -Drecorder=true \
  170. -Dshout=enabled \
  171. -Dyajl=enabled \
  172. -Dvorbisenc=enabled \
  173. -Dlame=enabled
  174. ifeq ($(CONFIG_AUDIO_SUPPORT),y)
  175. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  176. endif
  177. endif
  178. ifeq ($(BUILD_VARIANT),mini)
  179. # oggflac is not compatible with tremor
  180. MESON_ARGS += \
  181. -Dupnp=disabled \
  182. -Dmms=disabled \
  183. -Dsoundcloud=disabled \
  184. -Dffmpeg=disabled \
  185. -Dmad=enabled \
  186. -Dtremor=enabled \
  187. -Dvorbis=disabled \
  188. -Dfifo=false \
  189. -Dpipe=false \
  190. -Dpulse=disabled \
  191. -Drecorder=false \
  192. -Dshout=disabled \
  193. -Dyajl=disabled
  194. endif
  195. define Package/mpd/install
  196. $(INSTALL_DIR) $(1)/usr/bin
  197. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  198. $(INSTALL_DIR) $(1)/etc
  199. $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  200. $(INSTALL_DIR) $(1)/etc/init.d
  201. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  202. endef
  203. define Package/mpd-full/install
  204. $(call Package/mpd/install,$1)
  205. endef
  206. define Package/mpd-mini/install
  207. $(call Package/mpd/install,$1)
  208. endef
  209. define Package/mpd-avahi-service/install
  210. $(INSTALL_DIR) $(1)/etc/avahi/services
  211. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  212. endef
  213. $(eval $(call BuildPackage,mpd-full))
  214. $(eval $(call BuildPackage,mpd-mini))
  215. $(eval $(call BuildPackage,mpd-avahi-service))