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.

234 lines
5.4 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.21.25
  8. PKG_RELEASE:=4
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.21/
  11. PKG_HASH:=20a0ad01bf327b2dbeb6ae8e1af952cb0de83d2d63fab0fa4b7183a74765c201
  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-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=false \
  85. -Dtest=false \
  86. -Dsyslog=enabled \
  87. -Dinotify=true \
  88. -Ddaemon=false \
  89. -Dsystemd=disabled \
  90. -Dtcp=true \
  91. -Dipv6=$(if $(CONFIG_IPV6),en,dis)abled \
  92. -Dlocal_socket=true \
  93. -Ddsd=false \
  94. -Ddatabase=true \
  95. -Dlibmpdclient=enabled \
  96. -Dneighbor=false \
  97. -Dudisks=disabled \
  98. -Dwebdav=enabled \
  99. -Dcue=true \
  100. -Dcdio_paranoia=disabled \
  101. -Dcurl=enabled \
  102. -Dnfs=disabled \
  103. -Dsmbclient=disabled \
  104. -Dqobuz=disabled \
  105. -Dtidal=disabled \
  106. -Dbzip2=disabled \
  107. -Diso9660=disabled \
  108. -Dzzip=disabled \
  109. -Did3tag=enabled \
  110. -Dchromaprint=disabled \
  111. -Dadplug=disabled \
  112. -Daudiofile=disabled \
  113. -Dfaad=enabled \
  114. -Dflac=enabled \
  115. -Dfluidsynth=disabled \
  116. -Dgme=disabled \
  117. -Dmpg123=disabled \
  118. -Dmikmod=disabled \
  119. -Dmodplug=disabled \
  120. -Dmpcdec=disabled \
  121. -Dopus=enabled \
  122. -Dsidplay=disabled \
  123. -Dsndfile=disabled \
  124. -Dwavpack=disabled \
  125. -Dwildmidi=disabled \
  126. -Dvorbisenc=disabled \
  127. -Dlame=disabled \
  128. -Dtwolame=disabled \
  129. -Dshine=disabled \
  130. -Dwave_encoder=true \
  131. -Dlibsamplerate=disabled \
  132. -Dsoxr=disabled \
  133. -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  134. -Dao=disabled \
  135. -Dhttpd=true \
  136. -Djack=disabled \
  137. -Dopenal=disabled \
  138. -Doss=disabled \
  139. -Dsndio=disabled \
  140. -Dsolaris_output=disabled \
  141. -Ddbus=disabled \
  142. -Dexpat=enabled \
  143. -Dicu=disabled \
  144. -Diconv=enabled \
  145. -Dpcre=disabled \
  146. -Dsqlite=disabled \
  147. -Dzlib=enabled \
  148. -Dzeroconf=disabled
  149. ifeq ($(BUILD_VARIANT),full)
  150. MESON_ARGS += \
  151. -Dupnp=enabled \
  152. -Dmms=enabled \
  153. -Dsoundcloud=enabled \
  154. -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
  155. -Dmad=$(if $(CONFIG_BUILD_PATENTED),dis,en)abled \
  156. -Dtremor=disabled \
  157. -Dvorbis=enabled \
  158. -Dfifo=true \
  159. -Dpipe=true \
  160. -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  161. -Drecorder=true \
  162. -Dshout=enabled \
  163. -Dyajl=enabled
  164. ifeq ($(CONFIG_AUDIO_SUPPORT),y)
  165. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  166. endif
  167. endif
  168. ifeq ($(BUILD_VARIANT),mini)
  169. # oggflac is not compatible with tremor
  170. MESON_ARGS += \
  171. -Dupnp=disabled \
  172. -Dmms=disabled \
  173. -Dsoundcloud=disabled \
  174. -Dffmpeg=disabled \
  175. -Dmad=enabled \
  176. -Dtremor=enabled \
  177. -Dvorbis=disabled \
  178. -Dfifo=false \
  179. -Dpipe=false \
  180. -Dpulse=disabled \
  181. -Drecorder=false \
  182. -Dshout=disabled \
  183. -Dyajl=disabled
  184. endif
  185. define Package/mpd/install
  186. $(INSTALL_DIR) $(1)/usr/bin
  187. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  188. $(INSTALL_DIR) $(1)/etc
  189. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  190. $(INSTALL_DIR) $(1)/etc/init.d
  191. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  192. endef
  193. define Package/mpd-full/install
  194. $(call Package/mpd/install,$1)
  195. endef
  196. define Package/mpd-mini/install
  197. $(call Package/mpd/install,$1)
  198. endef
  199. define Package/mpd-avahi-service/install
  200. $(INSTALL_DIR) $(1)/etc/avahi/services
  201. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  202. endef
  203. $(eval $(call BuildPackage,mpd-full))
  204. $(eval $(call BuildPackage,mpd-mini))
  205. $(eval $(call BuildPackage,mpd-avahi-service))