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.

227 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.20.8
  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:=7d177f29663c4a0997413401e52bbf11d2bb472773bbcf9294f839c4b8751e35
  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. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/mpd/Default
  23. SECTION:=sound
  24. CATEGORY:=Sound
  25. TITLE:=Music Player Daemon
  26. URL:=http://www.musicpd.org/
  27. DEPENDS:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
  28. +libflac +BUILD_PATENTED:libmad +libvorbisidec +AUDIO_SUPPORT:alsa-lib \
  29. +boost +boost-container +libexpat
  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+= \
  41. +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
  42. +libmms +libogg +libsndfile +libvorbis +libupnp
  43. PROVIDES:=mpd
  44. VARIANT:=full
  45. endef
  46. define Package/mpd-full/description
  47. $(call Package/mpd/Default/description)
  48. .
  49. This package contains a full-blown Music Player Daemon.
  50. endef
  51. define Package/mpd-full/conffiles
  52. /etc/mpd.conf
  53. endef
  54. define Package/mpd-mini
  55. $(call Package/mpd/Default)
  56. TITLE+= (mini)
  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, 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-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. TARGET_CFLAGS += -ggdb3
  84. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  85. EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
  86. CONFIGURE_ARGS += \
  87. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  88. --disable-debug \
  89. --disable-documentation \
  90. --disable-test \
  91. --disable-werror \
  92. \
  93. --disable-ao \
  94. --disable-bzip2 \
  95. --disable-fluidsynth \
  96. --disable-wildmidi \
  97. --disable-gme \
  98. --enable-inotify \
  99. --disable-icu \
  100. --disable-eventfd \
  101. --disable-iso9660 \
  102. --disable-jack \
  103. --disable-roar \
  104. --disable-libwrap \
  105. --disable-lsr \
  106. --disable-mikmod \
  107. --disable-modplug \
  108. --disable-mpc \
  109. --disable-mpg123 \
  110. --disable-openal \
  111. --disable-opus \
  112. --disable-pulse \
  113. --disable-sidplay \
  114. --disable-solaris-output \
  115. --disable-sqlite \
  116. --disable-lame-encoder \
  117. --disable-twolame-encoder \
  118. --disable-shine-encoder \
  119. --enable-wave-encoder \
  120. --disable-wavpack \
  121. --disable-wildmidi \
  122. --disable-zzip \
  123. --with-zeroconf=no \
  124. --disable-soxr \
  125. \
  126. --enable-curl \
  127. --enable-flac \
  128. --enable-httpd-output \
  129. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  130. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  131. --enable-tcp \
  132. --enable-un \
  133. CONFIGURE_VARS += \
  134. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  135. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  136. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  137. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  138. ifeq ($(BUILD_VARIANT),full)
  139. CONFIGURE_ARGS += \
  140. --enable-upnp \
  141. $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
  142. --enable-audiofile \
  143. --enable-fifo \
  144. --enable-ffmpeg \
  145. --enable-id3 \
  146. --enable-mms \
  147. --enable-flac \
  148. --enable-pipe-output \
  149. --enable-recorder-output \
  150. --disable-shout \
  151. --enable-sndfile \
  152. --enable-vorbis \
  153. --disable-vorbis-encoder \
  154. --with-tremor=yes \
  155. endif
  156. ifeq ($(BUILD_VARIANT),mini)
  157. # oggflac is not compatible with tremor
  158. CONFIGURE_ARGS += \
  159. --disable-upnp \
  160. --disable-aac \
  161. --disable-audiofile \
  162. --disable-fifo \
  163. --disable-ffmpeg \
  164. --disable-id3 \
  165. --disable-mms \
  166. --disable-pipe-output \
  167. --disable-recorder-output \
  168. --disable-shout \
  169. --disable-sndfile \
  170. --disable-vorbis \
  171. --disable-vorbis-encoder \
  172. --with-tremor=yes \
  173. endif
  174. define Package/mpd/install
  175. $(INSTALL_DIR) $(1)/usr/bin
  176. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  177. $(INSTALL_DIR) $(1)/etc
  178. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  179. $(INSTALL_DIR) $(1)/etc/init.d
  180. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  181. endef
  182. define Package/mpd-full/install
  183. $(call Package/mpd/install,$1)
  184. endef
  185. define Package/mpd-mini/install
  186. $(call Package/mpd/install,$1)
  187. endef
  188. define Package/mpd-avahi-service/install
  189. $(INSTALL_DIR) $(1)/etc/avahi/services
  190. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  191. endef
  192. $(eval $(call BuildPackage,mpd-full))
  193. $(eval $(call BuildPackage,mpd-mini))
  194. $(eval $(call BuildPackage,mpd-avahi-service))