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.

229 lines
5.3 KiB

  1. #
  2. # Copyright (C) 2015-2016 Ted Hess
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=mpd
  9. PKG_VERSION:=0.19.19
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/
  13. PKG_MD5SUM:=6e4fca9a9c26dad08b61bac9a91802db
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_IPV6 \
  21. PKG_INSTALL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. define Package/mpd/Default
  25. SECTION:=sound
  26. CATEGORY:=Sound
  27. TITLE:=Music Player Daemon
  28. URL:=http://www.musicpd.org/
  29. DEPENDS:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \
  30. +libflac +BUILD_PATENTED:libmad +libvorbisidec +AUDIO_SUPPORT:alsa-lib \
  31. +boost +boost-container +libexpat
  32. endef
  33. define Package/mpd/Default/description
  34. Music Player Daemon (MPD) is a flexible, powerful, server-side
  35. application for playing music. It is typically controlled over a
  36. network using one of it's many clients including mpc (console),
  37. gmpc (gnome), phpmp (php), etc...
  38. endef
  39. define Package/mpd-full
  40. $(call Package/mpd/Default)
  41. TITLE+= (full)
  42. DEPENDS+= \
  43. +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
  44. +libmms +libogg +libsndfile +libvorbis +libupnp
  45. PROVIDES:=mpd
  46. VARIANT:=full
  47. endef
  48. define Package/mpd-full/description
  49. $(call Package/mpd/Default/description)
  50. .
  51. This package contains a full-blown Music Player Daemon.
  52. endef
  53. define Package/mpd-full/conffiles
  54. /etc/mpd.conf
  55. endef
  56. define Package/mpd-mini
  57. $(call Package/mpd/Default)
  58. TITLE+= (mini)
  59. PROVIDES:=mpd
  60. VARIANT:=mini
  61. endef
  62. define Package/mpd-mini/description
  63. $(call Package/mpd/Default/description)
  64. .
  65. This package contains a minimal Music Player Daemon, with support for
  66. only Flac, MP3 & OGG media types & only file: & http: protocols.
  67. endef
  68. define Package/mpd-mini/conffiles
  69. /etc/mpd.conf
  70. endef
  71. define Package/mpd-avahi-service
  72. $(call Package/mpd/Default)
  73. TITLE+= (Avahi service)
  74. DEPENDS+=+avahi-daemon
  75. endef
  76. define Package/mpd-avahi-service/description
  77. $(call Package/mpd/Default/description)
  78. .
  79. This package contains the service definition for announcing the
  80. Music Player Daemon service via mDNS/DNS-SD.
  81. endef
  82. define Package/mpd-avahi-service/conffiles
  83. /etc/avahi/services/mpd.service
  84. endef
  85. CONFIGURE_ARGS += \
  86. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  87. --disable-debug \
  88. --disable-documentation \
  89. --disable-test \
  90. --disable-werror \
  91. \
  92. --disable-ao \
  93. --disable-bzip2 \
  94. --disable-fluidsynth \
  95. --disable-wildmidi \
  96. --disable-gme \
  97. --enable-inotify \
  98. --disable-icu \
  99. --disable-eventfd \
  100. --disable-iso9660 \
  101. --disable-jack \
  102. --disable-roar \
  103. --disable-libwrap \
  104. --disable-lsr \
  105. --disable-mikmod \
  106. --disable-modplug \
  107. --disable-mpc \
  108. --disable-mpg123 \
  109. --disable-openal \
  110. --disable-opus \
  111. --disable-pulse \
  112. --disable-sidplay \
  113. --disable-solaris-output \
  114. --disable-sqlite \
  115. --disable-lame-encoder \
  116. --disable-twolame-encoder \
  117. --disable-shine-encoder \
  118. --enable-wave-encoder \
  119. --disable-wavpack \
  120. --disable-wildmidi \
  121. --disable-zzip \
  122. --with-zeroconf=no \
  123. --disable-soxr \
  124. \
  125. --enable-curl \
  126. --enable-flac \
  127. --enable-httpd-output \
  128. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  129. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  130. --enable-tcp \
  131. --enable-un \
  132. CONFIGURE_VARS += \
  133. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  134. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  135. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  136. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  137. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  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-lastfm \
  147. --enable-mms \
  148. --enable-oggflac \
  149. --enable-pipe-output \
  150. --enable-recorder-output \
  151. --disable-shout \
  152. --enable-sndfile \
  153. --enable-vorbis \
  154. --disable-vorbis-encoder \
  155. --with-faad="$(STAGING_DIR)/usr" \
  156. --with-tremor=yes \
  157. endif
  158. ifeq ($(BUILD_VARIANT),mini)
  159. # oggflac is not compatible with tremor
  160. CONFIGURE_ARGS += \
  161. --disable-upnp \
  162. --disable-aac \
  163. --disable-audiofile \
  164. --disable-fifo \
  165. --disable-ffmpeg \
  166. --disable-id3 \
  167. --disable-mms \
  168. --disable-pipe-output \
  169. --disable-recorder-output \
  170. --disable-shout \
  171. --disable-sndfile \
  172. --disable-vorbis \
  173. --disable-vorbis-encoder \
  174. --with-tremor=yes \
  175. endif
  176. define Package/mpd/install
  177. $(INSTALL_DIR) $(1)/usr/bin
  178. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  179. $(INSTALL_DIR) $(1)/etc
  180. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  181. $(INSTALL_DIR) $(1)/etc/init.d
  182. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  183. endef
  184. define Package/mpd-full/install
  185. $(call Package/mpd/install,$1)
  186. endef
  187. define Package/mpd-mini/install
  188. $(call Package/mpd/install,$1)
  189. endef
  190. define Package/mpd-avahi-service/install
  191. $(INSTALL_DIR) $(1)/etc/avahi/services
  192. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  193. endef
  194. $(eval $(call BuildPackage,mpd-full))
  195. $(eval $(call BuildPackage,mpd-mini))
  196. $(eval $(call BuildPackage,mpd-avahi-service))