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