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.

228 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. 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:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
  29. +libflac +BUILD_PATENTED:libmad +libvorbisidec +AUDIO_SUPPORT:alsa-lib \
  30. +boost +boost-container +libexpat
  31. endef
  32. define Package/mpd/Default/description
  33. Music Player Daemon (MPD) is a flexible, powerful, server-side
  34. application for playing music. It is typically controlled over a
  35. network using one of it's many clients including mpc (console),
  36. gmpc (gnome), phpmp (php), etc...
  37. endef
  38. define Package/mpd-full
  39. $(call Package/mpd/Default)
  40. TITLE+= (full)
  41. DEPENDS+= \
  42. +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
  43. +libmms +libogg +libsndfile +libvorbis +libupnp
  44. PROVIDES:=mpd
  45. VARIANT:=full
  46. endef
  47. define Package/mpd-full/description
  48. $(call Package/mpd/Default/description)
  49. .
  50. This package contains a full-blown Music Player Daemon.
  51. endef
  52. define Package/mpd-full/conffiles
  53. /etc/mpd.conf
  54. endef
  55. define Package/mpd-mini
  56. $(call Package/mpd/Default)
  57. TITLE+= (mini)
  58. PROVIDES:=mpd
  59. VARIANT:=mini
  60. endef
  61. define Package/mpd-mini/description
  62. $(call Package/mpd/Default/description)
  63. .
  64. This package contains a minimal Music Player Daemon, with support for
  65. only Flac, MP3 & OGG media types & only file: & http: protocols.
  66. endef
  67. define Package/mpd-mini/conffiles
  68. /etc/mpd.conf
  69. endef
  70. define Package/mpd-avahi-service
  71. $(call Package/mpd/Default)
  72. TITLE+= (Avahi service)
  73. DEPENDS+=+avahi-daemon
  74. endef
  75. define Package/mpd-avahi-service/description
  76. $(call Package/mpd/Default/description)
  77. .
  78. This package contains the service definition for announcing the
  79. Music Player Daemon service via mDNS/DNS-SD.
  80. endef
  81. define Package/mpd-avahi-service/conffiles
  82. /etc/avahi/services/mpd.service
  83. endef
  84. TARGET_CFLAGS += -ggdb3
  85. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  86. EXTRA_CXXFLAGS += $(if $(CONFIG_GCC_VERSION_4_8),-std=gnu++11,-std=gnu++14)
  87. CONFIGURE_ARGS += \
  88. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  89. --disable-debug \
  90. --disable-documentation \
  91. --disable-test \
  92. --disable-werror \
  93. \
  94. --disable-ao \
  95. --disable-bzip2 \
  96. --disable-fluidsynth \
  97. --disable-wildmidi \
  98. --disable-gme \
  99. --enable-inotify \
  100. --disable-icu \
  101. --disable-eventfd \
  102. --disable-iso9660 \
  103. --disable-jack \
  104. --disable-roar \
  105. --disable-libwrap \
  106. --disable-lsr \
  107. --disable-mikmod \
  108. --disable-modplug \
  109. --disable-mpc \
  110. --disable-mpg123 \
  111. --disable-openal \
  112. --disable-opus \
  113. --disable-pulse \
  114. --disable-sidplay \
  115. --disable-solaris-output \
  116. --disable-sqlite \
  117. --disable-lame-encoder \
  118. --disable-twolame-encoder \
  119. --disable-shine-encoder \
  120. --enable-wave-encoder \
  121. --disable-wavpack \
  122. --disable-wildmidi \
  123. --disable-zzip \
  124. --with-zeroconf=no \
  125. --disable-soxr \
  126. \
  127. --enable-curl \
  128. --enable-flac \
  129. --enable-httpd-output \
  130. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  131. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  132. --enable-tcp \
  133. --enable-un \
  134. CONFIGURE_VARS += \
  135. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  136. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  137. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  138. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  139. ifeq ($(BUILD_VARIANT),full)
  140. CONFIGURE_ARGS += \
  141. --enable-upnp \
  142. $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
  143. --enable-audiofile \
  144. --enable-fifo \
  145. --enable-ffmpeg \
  146. --enable-id3 \
  147. --enable-mms \
  148. --enable-flac \
  149. --enable-pipe-output \
  150. --enable-recorder-output \
  151. --disable-shout \
  152. --enable-sndfile \
  153. --enable-vorbis \
  154. --disable-vorbis-encoder \
  155. --with-tremor=yes \
  156. endif
  157. ifeq ($(BUILD_VARIANT),mini)
  158. # oggflac is not compatible with tremor
  159. CONFIGURE_ARGS += \
  160. --disable-upnp \
  161. --disable-aac \
  162. --disable-audiofile \
  163. --disable-fifo \
  164. --disable-ffmpeg \
  165. --disable-id3 \
  166. --disable-mms \
  167. --disable-pipe-output \
  168. --disable-recorder-output \
  169. --disable-shout \
  170. --disable-sndfile \
  171. --disable-vorbis \
  172. --disable-vorbis-encoder \
  173. --with-tremor=yes \
  174. endif
  175. define Package/mpd/install
  176. $(INSTALL_DIR) $(1)/usr/bin
  177. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  178. $(INSTALL_DIR) $(1)/etc
  179. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  180. $(INSTALL_DIR) $(1)/etc/init.d
  181. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  182. endef
  183. define Package/mpd-full/install
  184. $(call Package/mpd/install,$1)
  185. endef
  186. define Package/mpd-mini/install
  187. $(call Package/mpd/install,$1)
  188. endef
  189. define Package/mpd-avahi-service/install
  190. $(INSTALL_DIR) $(1)/etc/avahi/services
  191. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  192. endef
  193. $(eval $(call BuildPackage,mpd-full))
  194. $(eval $(call BuildPackage,mpd-mini))
  195. $(eval $(call BuildPackage,mpd-avahi-service))