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.

226 lines
5.3 KiB

  1. #
  2. # Copyright (C) 2007-2016 OpenWrt.org
  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.17
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/
  13. PKG_MD5SUM:=47e13f3f160bf94e7a897c5a48990f3d
  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-gme \
  96. --enable-inotify \
  97. --disable-icu \
  98. --disable-eventfd \
  99. --disable-iso9660 \
  100. --disable-jack \
  101. --disable-lame-encoder \
  102. --disable-libwrap \
  103. --disable-lsr \
  104. --disable-mikmod \
  105. --disable-modplug \
  106. --disable-mpc \
  107. --disable-mpg123 \
  108. --disable-openal \
  109. --disable-opus \
  110. --disable-pulse \
  111. --disable-sidplay \
  112. --disable-solaris-output \
  113. --disable-sqlite \
  114. --disable-twolame-encoder \
  115. --enable-wave-encoder \
  116. --disable-wavpack \
  117. --disable-wildmidi \
  118. --disable-zzip \
  119. --with-zeroconf=no \
  120. --disable-soxr \
  121. \
  122. --enable-curl \
  123. --enable-flac \
  124. --enable-httpd-output \
  125. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  126. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  127. --enable-tcp \
  128. --enable-un \
  129. CONFIGURE_VARS += \
  130. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  131. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  132. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  133. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  134. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  135. ifeq ($(BUILD_VARIANT),full)
  136. CONFIGURE_ARGS += \
  137. --enable-upnp \
  138. $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
  139. --enable-audiofile \
  140. --enable-fifo \
  141. --enable-ffmpeg \
  142. --enable-id3 \
  143. --enable-lastfm \
  144. --enable-mms \
  145. --enable-oggflac \
  146. --enable-pipe-output \
  147. --enable-recorder-output \
  148. --disable-shout \
  149. --enable-sndfile \
  150. --enable-vorbis \
  151. --disable-vorbis-encoder \
  152. --with-faad="$(STAGING_DIR)/usr" \
  153. --with-tremor=yes \
  154. endif
  155. ifeq ($(BUILD_VARIANT),mini)
  156. # oggflac is not compatible with tremor
  157. CONFIGURE_ARGS += \
  158. --disable-upnp \
  159. --disable-aac \
  160. --disable-audiofile \
  161. --disable-fifo \
  162. --disable-ffmpeg \
  163. --disable-id3 \
  164. --disable-mms \
  165. --disable-pipe-output \
  166. --disable-recorder-output \
  167. --disable-shout \
  168. --disable-sndfile \
  169. --disable-vorbis \
  170. --disable-vorbis-encoder \
  171. --with-tremor=yes \
  172. endif
  173. define Package/mpd/install
  174. $(INSTALL_DIR) $(1)/usr/bin
  175. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  176. $(INSTALL_DIR) $(1)/etc
  177. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  178. $(INSTALL_DIR) $(1)/etc/init.d
  179. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  180. endef
  181. define Package/mpd-full/install
  182. $(call Package/mpd/install,$1)
  183. endef
  184. define Package/mpd-mini/install
  185. $(call Package/mpd/install,$1)
  186. endef
  187. define Package/mpd-avahi-service/install
  188. $(INSTALL_DIR) $(1)/etc/avahi/services
  189. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  190. endef
  191. $(eval $(call BuildPackage,mpd-full))
  192. $(eval $(call BuildPackage,mpd-mini))
  193. $(eval $(call BuildPackage,mpd-avahi-service))