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.

232 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.20
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.21/
  11. PKG_HASH:=422ef0a996d961f3ebc6856395f3a855b45fa0059910e878fb98281007e510e1
  12. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  13. PKG_LICENSE:=GPL-2.0-or-later
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_CONFIG_DEPENDS:= \
  16. CONFIG_IPV6 \
  17. PKG_INSTALL:=1
  18. PKG_USE_MIPS16:=0
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. include ../../devel/meson/meson.mk
  22. define Package/mpd/Default
  23. SECTION:=sound
  24. CATEGORY:=Sound
  25. TITLE:=Music Player Daemon
  26. URL:=https://www.musicpd.org/
  27. DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
  28. +AUDIO_SUPPORT:alsa-lib +boost +libexpat +libflac +USE_UCLIBC:icu
  29. endef
  30. define Package/mpd/Default/description
  31. Music Player Daemon (MPD) is a flexible, powerful, server-side
  32. application for playing music. It is typically controlled over a
  33. network using one of it's many clients including mpc (console),
  34. gmpc (gnome), phpmp (php), etc...
  35. endef
  36. define Package/mpd-full
  37. $(call Package/mpd/Default)
  38. TITLE+= (full)
  39. DEPENDS+= +libffmpeg +libid3tag +libvorbis +libmms +libupnp +libshout +pulseaudio-daemon +yajl
  40. PROVIDES:=mpd
  41. VARIANT:=full
  42. endef
  43. define Package/mpd-full/description
  44. $(call Package/mpd/Default/description)
  45. .
  46. This package contains a full-blown Music Player Daemon.
  47. endef
  48. define Package/mpd-full/conffiles
  49. /etc/mpd.conf
  50. endef
  51. define Package/mpd-mini
  52. $(call Package/mpd/Default)
  53. TITLE+= (mini)
  54. DEPENDS+= +libmad +libvorbisidec
  55. PROVIDES:=mpd
  56. VARIANT:=mini
  57. endef
  58. define Package/mpd-mini/description
  59. $(call Package/mpd/Default/description)
  60. .
  61. This package contains a minimal Music Player Daemon, with support for
  62. only Flac, MP3 & OGG media types & only file: & http: protocols.
  63. endef
  64. define Package/mpd-mini/conffiles
  65. /etc/mpd.conf
  66. endef
  67. define Package/mpd-avahi-service
  68. $(call Package/mpd/Default)
  69. TITLE+= (Avahi service)
  70. DEPENDS+=+avahi-daemon
  71. endef
  72. define Package/mpd-avahi-service/description
  73. $(call Package/mpd/Default/description)
  74. .
  75. This package contains the service definition for announcing the
  76. Music Player Daemon service via mDNS/DNS-SD.
  77. endef
  78. define Package/mpd-avahi-service/conffiles
  79. /etc/avahi/services/mpd.service
  80. endef
  81. EXTRA_LDFLAGS += $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  82. MESON_ARGS += \
  83. -Ddocumentation=false \
  84. -Dtest=false \
  85. -Dsyslog=enabled \
  86. -Dinotify=true \
  87. -Ddaemon=false \
  88. -Dsystemd=disabled \
  89. -Dtcp=true \
  90. -Dipv6=$(if $(CONFIG_IPV6),enabled,disabled) \
  91. -Dlocal_socket=true \
  92. -Ddsd=false \
  93. -Ddatabase=true \
  94. -Dlibmpdclient=enabled \
  95. -Dneighbor=false \
  96. -Dudisks=disabled \
  97. -Dwebdav=enabled \
  98. -Dcue=true \
  99. -Dcdio_paranoia=disabled \
  100. -Dcurl=enabled \
  101. -Dnfs=disabled \
  102. -Dsmbclient=disabled \
  103. -Dqobuz=disabled \
  104. -Dtidal=disabled \
  105. -Dbzip2=disabled \
  106. -Diso9660=disabled \
  107. -Dzzip=disabled \
  108. -Dchromaprint=disabled \
  109. -Dadplug=disabled \
  110. -Daudiofile=disabled \
  111. -Dfaad=disabled \
  112. -Dflac=enabled \
  113. -Dfluidsynth=disabled \
  114. -Dgme=disabled \
  115. -Dmpg123=disabled \
  116. -Dmikmod=disabled \
  117. -Dmodplug=disabled \
  118. -Dmpcdec=disabled \
  119. -Dopus=disabled \
  120. -Dsidplay=disabled \
  121. -Dsndfile=disabled \
  122. -Dwavpack=disabled \
  123. -Dwildmidi=disabled \
  124. -Dvorbisenc=disabled \
  125. -Dlame=disabled \
  126. -Dtwolame=disabled \
  127. -Dshine=disabled \
  128. -Dwave_encoder=true \
  129. -Dlibsamplerate=disabled \
  130. -Dsoxr=disabled \
  131. -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),enabled,disabled) \
  132. -Dao=disabled \
  133. -Dhttpd=true \
  134. -Djack=disabled \
  135. -Dopenal=disabled \
  136. -Doss=disabled \
  137. -Dsndio=disabled \
  138. -Dsolaris_output=disabled \
  139. -Ddbus=disabled \
  140. -Dexpat=enabled \
  141. -Dicu=$(if $(CONFIG_USE_UCLIBC),enabled,disabled) \
  142. -Diconv=$(if $(CONFIG_USE_UCLIBC),disabled,enabled) \
  143. -Dpcre=disabled \
  144. -Dsqlite=disabled \
  145. -Dzlib=enabled \
  146. -Dzeroconf=disabled
  147. ifeq ($(BUILD_VARIANT),full)
  148. MESON_ARGS += \
  149. -Dupnp=enabled \
  150. -Dmms=enabled \
  151. -Dsoundcloud=enabled \
  152. -Did3tag=enabled \
  153. -Dffmpeg=enabled \
  154. -Dmad=disabled \
  155. -Dtremor=disabled \
  156. -Dvorbis=enabled \
  157. -Dfifo=true \
  158. -Dpipe=true \
  159. -Dpulse=enabled \
  160. -Drecorder=true \
  161. -Dshout=enabled \
  162. -Dyajl=enabled
  163. endif
  164. ifeq ($(BUILD_VARIANT),mini)
  165. # oggflac is not compatible with tremor
  166. MESON_ARGS += \
  167. -Dupnp=disabled \
  168. -Dmms=disabled \
  169. -Dsoundcloud=disabled \
  170. -Did3tag=disabled \
  171. -Dffmpeg=disabled \
  172. -Dmad=enabled \
  173. -Dtremor=enabled \
  174. -Dvorbis=disabled \
  175. -Dfifo=false \
  176. -Dpipe=false \
  177. -Dpulse=disabled \
  178. -Drecorder=false \
  179. -Dshout=disabled \
  180. -Dyajl=disabled
  181. endif
  182. define Package/mpd/install
  183. $(INSTALL_DIR) $(1)/usr/bin
  184. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  185. $(INSTALL_DIR) $(1)/etc
  186. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  187. $(INSTALL_DIR) $(1)/etc/init.d
  188. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  189. endef
  190. define Package/mpd-full/install
  191. $(call Package/mpd/install,$1)
  192. endef
  193. define Package/mpd-mini/install
  194. $(call Package/mpd/install,$1)
  195. endef
  196. define Package/mpd-avahi-service/install
  197. $(INSTALL_DIR) $(1)/etc/avahi/services
  198. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  199. endef
  200. $(eval $(call BuildPackage,mpd-full))
  201. $(eval $(call BuildPackage,mpd-mini))
  202. $(eval $(call BuildPackage,mpd-avahi-service))