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.3 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:=3
  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+= +BUILD_PATENTED:libffmpeg +libvorbis +libmms +libupnp +libshout +AUDIO_SUPPORT:pulseaudio-daemon +yajl
  41. PROVIDES:=mpd
  42. VARIANT:=full
  43. endef
  44. define Package/mpd-full/description
  45. $(call Package/mpd/Default/description)
  46. .
  47. This package contains a full-blown Music Player Daemon.
  48. endef
  49. define Package/mpd-full/conffiles
  50. /etc/mpd.conf
  51. endef
  52. define Package/mpd-mini
  53. $(call Package/mpd/Default)
  54. TITLE+= (mini)
  55. DEPENDS+= +libmad +libvorbisidec
  56. PROVIDES:=mpd
  57. VARIANT:=mini
  58. endef
  59. define Package/mpd-mini/description
  60. $(call Package/mpd/Default/description)
  61. .
  62. This package contains a minimal Music Player Daemon, with support for
  63. only FLAC, AAC, MP3 & OGG media types & only file: & http: protocols.
  64. endef
  65. define Package/mpd-mini/conffiles
  66. /etc/mpd.conf
  67. endef
  68. define Package/mpd-avahi-service
  69. $(call Package/mpd/Default)
  70. TITLE+= (Avahi service)
  71. DEPENDS+=+avahi-daemon
  72. endef
  73. define Package/mpd-avahi-service/description
  74. $(call Package/mpd/Default/description)
  75. .
  76. This package contains the service definition for announcing the
  77. Music Player Daemon service via mDNS/DNS-SD.
  78. endef
  79. define Package/mpd-avahi-service/conffiles
  80. /etc/avahi/services/mpd.service
  81. endef
  82. ifeq ($(CONFIG_AUDIO_SUPPORT),y)
  83. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  84. endif
  85. MESON_ARGS += \
  86. -Ddocumentation=false \
  87. -Dtest=false \
  88. -Dsyslog=enabled \
  89. -Dinotify=true \
  90. -Ddaemon=false \
  91. -Dsystemd=disabled \
  92. -Dtcp=true \
  93. -Dipv6=$(if $(CONFIG_IPV6),enabled,disabled) \
  94. -Dlocal_socket=true \
  95. -Ddsd=false \
  96. -Ddatabase=true \
  97. -Dlibmpdclient=enabled \
  98. -Dneighbor=false \
  99. -Dudisks=disabled \
  100. -Dwebdav=enabled \
  101. -Dcue=true \
  102. -Dcdio_paranoia=disabled \
  103. -Dcurl=enabled \
  104. -Dnfs=disabled \
  105. -Dsmbclient=disabled \
  106. -Dqobuz=disabled \
  107. -Dtidal=disabled \
  108. -Dbzip2=disabled \
  109. -Diso9660=disabled \
  110. -Dzzip=disabled \
  111. -Did3tag=enabled \
  112. -Dchromaprint=disabled \
  113. -Dadplug=disabled \
  114. -Daudiofile=disabled \
  115. -Dfaad=enabled \
  116. -Dflac=enabled \
  117. -Dfluidsynth=disabled \
  118. -Dgme=disabled \
  119. -Dmpg123=disabled \
  120. -Dmikmod=disabled \
  121. -Dmodplug=disabled \
  122. -Dmpcdec=disabled \
  123. -Dopus=enabled \
  124. -Dsidplay=disabled \
  125. -Dsndfile=disabled \
  126. -Dwavpack=disabled \
  127. -Dwildmidi=disabled \
  128. -Dvorbisenc=disabled \
  129. -Dlame=disabled \
  130. -Dtwolame=disabled \
  131. -Dshine=disabled \
  132. -Dwave_encoder=true \
  133. -Dlibsamplerate=disabled \
  134. -Dsoxr=disabled \
  135. -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  136. -Dao=disabled \
  137. -Dhttpd=true \
  138. -Djack=disabled \
  139. -Dopenal=disabled \
  140. -Doss=disabled \
  141. -Dsndio=disabled \
  142. -Dsolaris_output=disabled \
  143. -Ddbus=disabled \
  144. -Dexpat=enabled \
  145. -Dicu=disabled \
  146. -Diconv=enabled \
  147. -Dpcre=disabled \
  148. -Dsqlite=disabled \
  149. -Dzlib=enabled \
  150. -Dzeroconf=disabled
  151. ifeq ($(BUILD_VARIANT),full)
  152. MESON_ARGS += \
  153. -Dupnp=enabled \
  154. -Dmms=enabled \
  155. -Dsoundcloud=enabled \
  156. -Dffmpeg=$(if $(CONFIG_BUILD_PATENTED),en,dis)abled \
  157. -Dmad=disabled \
  158. -Dtremor=disabled \
  159. -Dvorbis=enabled \
  160. -Dfifo=true \
  161. -Dpipe=true \
  162. -Dpulse=$(if $(CONFIG_AUDIO_SUPPORT),en,dis)abled \
  163. -Drecorder=true \
  164. -Dshout=enabled \
  165. -Dyajl=enabled
  166. endif
  167. ifeq ($(BUILD_VARIANT),mini)
  168. # oggflac is not compatible with tremor
  169. MESON_ARGS += \
  170. -Dupnp=disabled \
  171. -Dmms=disabled \
  172. -Dsoundcloud=disabled \
  173. -Dffmpeg=disabled \
  174. -Dmad=enabled \
  175. -Dtremor=enabled \
  176. -Dvorbis=disabled \
  177. -Dfifo=false \
  178. -Dpipe=false \
  179. -Dpulse=disabled \
  180. -Drecorder=false \
  181. -Dshout=disabled \
  182. -Dyajl=disabled
  183. endif
  184. define Package/mpd/install
  185. $(INSTALL_DIR) $(1)/usr/bin
  186. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  187. $(INSTALL_DIR) $(1)/etc
  188. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  189. $(INSTALL_DIR) $(1)/etc/init.d
  190. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  191. endef
  192. define Package/mpd-full/install
  193. $(call Package/mpd/install,$1)
  194. endef
  195. define Package/mpd-mini/install
  196. $(call Package/mpd/install,$1)
  197. endef
  198. define Package/mpd-avahi-service/install
  199. $(INSTALL_DIR) $(1)/etc/avahi/services
  200. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  201. endef
  202. $(eval $(call BuildPackage,mpd-full))
  203. $(eval $(call BuildPackage,mpd-mini))
  204. $(eval $(call BuildPackage,mpd-avahi-service))