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.

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