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.

212 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.21
  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:=8322764dc265c20f05c8c8fdfdd578b0722e74626bef56fcd8eebfb01acc58dc
  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. --enable-webdav \
  127. --disable-zzip \
  128. --with-zeroconf=no \
  129. --disable-soxr \
  130. --enable-curl \
  131. --enable-httpd-output \
  132. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  133. --enable-tcp \
  134. --disable-sndio \
  135. --disable-haiku
  136. ifeq ($(BUILD_VARIANT),full)
  137. CONFIGURE_ARGS += \
  138. --enable-upnp \
  139. --enable-ffmpeg \
  140. --enable-id3 \
  141. --enable-mms \
  142. --disable-mpg123 \
  143. --enable-pipe-output \
  144. --enable-recorder-output \
  145. --enable-shout \
  146. --disable-vorbis
  147. endif
  148. ifeq ($(BUILD_VARIANT),mini)
  149. # oggflac is not compatible with tremor
  150. CONFIGURE_ARGS += \
  151. --disable-upnp \
  152. --disable-fifo \
  153. --disable-ffmpeg \
  154. --disable-id3 \
  155. --disable-mms \
  156. --disable-shout \
  157. --enable-vorbis \
  158. --with-tremor=yes \
  159. --disable-recorder-output
  160. endif
  161. define Package/mpd/install
  162. $(INSTALL_DIR) $(1)/usr/bin
  163. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  164. $(INSTALL_DIR) $(1)/etc
  165. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  166. $(INSTALL_DIR) $(1)/etc/init.d
  167. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  168. endef
  169. define Package/mpd-full/install
  170. $(call Package/mpd/install,$1)
  171. endef
  172. define Package/mpd-mini/install
  173. $(call Package/mpd/install,$1)
  174. endef
  175. define Package/mpd-avahi-service/install
  176. $(INSTALL_DIR) $(1)/etc/avahi/services
  177. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  178. endef
  179. $(eval $(call BuildPackage,mpd-full))
  180. $(eval $(call BuildPackage,mpd-mini))
  181. $(eval $(call BuildPackage,mpd-avahi-service))