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.23
  8. PKG_RELEASE:=2
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=https://www.musicpd.org/download/mpd/0.21/
  11. PKG_HASH:=439f522ca9800f375e4fb459ec31e61b3d824fc5c0580ff06dac48b5d21207a3
  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 +libid3tag +libfaad2 +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 +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, AAC, 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. -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=disabled \
  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),enabled,disabled) \
  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=$(if $(CONFIG_USE_UCLIBC),enabled,disabled) \
  146. -Diconv=$(if $(CONFIG_USE_UCLIBC),disabled,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=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. -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))