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.

213 lines
4.9 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.20.20
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.20/
  11. PKG_HASH:=a9e458c6e07cdf62649de7722e1e5a7f13aa82eeb397bfbbebc07cf5cf273584
  12. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  13. PKG_LICENSE:=GPL-2.0
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_CONFIG_DEPENDS:= \
  18. CONFIG_IPV6 \
  19. PKG_INSTALL:=1
  20. PKG_USE_MIPS16:=0
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/mpd/Default
  24. SECTION:=sound
  25. CATEGORY:=Sound
  26. TITLE:=Music Player Daemon
  27. URL:=http://www.musicpd.org/
  28. DEPENDS:= +zlib +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
  29. +AUDIO_SUPPORT:alsa-lib +boost +boost-container +libexpat +libflac
  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+= +libffmpeg +libid3tag +libmms +libupnp +libshout
  41. PROVIDES:=mpd
  42. VARIANT:=full
  43. endef
  44. define Package/mpd-full/description
  45. $(call Package/mpd/Default/description)
  46. .
  47. This package contains a full-blown Music Player Daemon.
  48. endef
  49. define Package/mpd-full/conffiles
  50. /etc/mpd.conf
  51. endef
  52. define Package/mpd-mini
  53. $(call Package/mpd/Default)
  54. TITLE+= (mini)
  55. DEPENDS+= +libmpg123 +libvorbisidec
  56. PROVIDES:=mpd
  57. VARIANT:=mini
  58. endef
  59. define Package/mpd-mini/description
  60. $(call Package/mpd/Default/description)
  61. .
  62. This package contains a minimal Music Player Daemon, with support for
  63. only Flac, MP3 & OGG media types & only file: & http: protocols.
  64. endef
  65. define Package/mpd-mini/conffiles
  66. /etc/mpd.conf
  67. endef
  68. define Package/mpd-avahi-service
  69. $(call Package/mpd/Default)
  70. TITLE+= (Avahi service)
  71. DEPENDS+=+avahi-daemon
  72. endef
  73. define Package/mpd-avahi-service/description
  74. $(call Package/mpd/Default/description)
  75. .
  76. This package contains the service definition for announcing the
  77. Music Player Daemon service via mDNS/DNS-SD.
  78. endef
  79. define Package/mpd-avahi-service/conffiles
  80. /etc/avahi/services/mpd.service
  81. endef
  82. EXTRA_LDFLAGS += $(if $(ICONV_FULL),-liconv,-Wl,--whole-archive -liconv -Wl,--no-whole-archive)
  83. EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
  84. CONFIGURE_ARGS += \
  85. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  86. --disable-debug \
  87. --disable-documentation \
  88. --disable-test \
  89. --disable-aac \
  90. --disable-adplug \
  91. --disable-ao \
  92. --disable-audiofile \
  93. --disable-bzip2 \
  94. --disable-cdio-paranoia \
  95. --disable-fluidsynth \
  96. --disable-wildmidi \
  97. --disable-gme \
  98. --enable-inotify \
  99. --disable-icu \
  100. --enable-iconv \
  101. --disable-iso9660 \
  102. --disable-jack \
  103. --disable-roar \
  104. --disable-libwrap \
  105. --disable-lsr \
  106. --disable-mad \
  107. --disable-mikmod \
  108. --disable-modplug \
  109. --disable-mpc \
  110. --disable-nfs \
  111. --disable-openal \
  112. --disable-opus \
  113. --disable-pulse \
  114. --disable-sidplay \
  115. --disable-smbclient \
  116. --disable-sndfile \
  117. --disable-solaris-output \
  118. --disable-sqlite \
  119. --disable-systemd-daemon \
  120. --disable-lame-encoder \
  121. --disable-twolame-encoder \
  122. --disable-shine-encoder \
  123. --disable-vorbis-encoder \
  124. --enable-wave-encoder \
  125. --disable-wavpack \
  126. --disable-webdav \
  127. --disable-wildmidi \
  128. --disable-zzip \
  129. --with-zeroconf=no \
  130. --disable-soxr \
  131. --enable-curl \
  132. --enable-httpd-output \
  133. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  134. --enable-tcp \
  135. --disable-sndio \
  136. --disable-haiku
  137. ifeq ($(BUILD_VARIANT),full)
  138. CONFIGURE_ARGS += \
  139. --enable-upnp \
  140. --enable-ffmpeg \
  141. --enable-id3 \
  142. --enable-mms \
  143. --disable-mpg123 \
  144. --enable-pipe-output \
  145. --enable-recorder-output \
  146. --enable-shout \
  147. --disable-vorbis
  148. endif
  149. ifeq ($(BUILD_VARIANT),mini)
  150. # oggflac is not compatible with tremor
  151. CONFIGURE_ARGS += \
  152. --disable-upnp \
  153. --disable-fifo \
  154. --disable-ffmpeg \
  155. --disable-id3 \
  156. --disable-mms \
  157. --disable-shout \
  158. --enable-vorbis \
  159. --with-tremor=yes \
  160. --disable-recorder-output
  161. endif
  162. define Package/mpd/install
  163. $(INSTALL_DIR) $(1)/usr/bin
  164. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  165. $(INSTALL_DIR) $(1)/etc
  166. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  167. $(INSTALL_DIR) $(1)/etc/init.d
  168. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  169. endef
  170. define Package/mpd-full/install
  171. $(call Package/mpd/install,$1)
  172. endef
  173. define Package/mpd-mini/install
  174. $(call Package/mpd/install,$1)
  175. endef
  176. define Package/mpd-avahi-service/install
  177. $(INSTALL_DIR) $(1)/etc/avahi/services
  178. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  179. endef
  180. $(eval $(call BuildPackage,mpd-full))
  181. $(eval $(call BuildPackage,mpd-mini))
  182. $(eval $(call BuildPackage,mpd-avahi-service))