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.

235 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.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. TARGET_LDFLAGS += \
  82. $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive) \
  83. $(if $(CONFIG_USE_GLIBC),-lpthread) \
  84. -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  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. -Dchromaprint=disabled \
  112. -Dadplug=disabled \
  113. -Daudiofile=disabled \
  114. -Dfaad=disabled \
  115. -Dflac=enabled \
  116. -Dfluidsynth=disabled \
  117. -Dgme=disabled \
  118. -Dmpg123=disabled \
  119. -Dmikmod=disabled \
  120. -Dmodplug=disabled \
  121. -Dmpcdec=disabled \
  122. -Dopus=disabled \
  123. -Dsidplay=disabled \
  124. -Dsndfile=disabled \
  125. -Dwavpack=disabled \
  126. -Dwildmidi=disabled \
  127. -Dvorbisenc=disabled \
  128. -Dlame=disabled \
  129. -Dtwolame=disabled \
  130. -Dshine=disabled \
  131. -Dwave_encoder=true \
  132. -Dlibsamplerate=disabled \
  133. -Dsoxr=disabled \
  134. -Dalsa=$(if $(CONFIG_AUDIO_SUPPORT),enabled,disabled) \
  135. -Dao=disabled \
  136. -Dhttpd=true \
  137. -Djack=disabled \
  138. -Dopenal=disabled \
  139. -Doss=disabled \
  140. -Dsndio=disabled \
  141. -Dsolaris_output=disabled \
  142. -Ddbus=disabled \
  143. -Dexpat=enabled \
  144. -Dicu=$(if $(CONFIG_USE_UCLIBC),enabled,disabled) \
  145. -Diconv=$(if $(CONFIG_USE_UCLIBC),disabled,enabled) \
  146. -Dpcre=disabled \
  147. -Dsqlite=disabled \
  148. -Dzlib=enabled \
  149. -Dzeroconf=disabled
  150. ifeq ($(BUILD_VARIANT),full)
  151. MESON_ARGS += \
  152. -Dupnp=enabled \
  153. -Dmms=enabled \
  154. -Dsoundcloud=enabled \
  155. -Did3tag=enabled \
  156. -Dffmpeg=enabled \
  157. -Dmad=disabled \
  158. -Dtremor=disabled \
  159. -Dvorbis=enabled \
  160. -Dfifo=true \
  161. -Dpipe=true \
  162. -Dpulse=enabled \
  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. -Did3tag=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))