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.

225 lines
5.3 KiB

  1. #
  2. # Copyright (C) 2007-2015 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.11
  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:=78935f6c464b67e19b4dc65bdb80319e
  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. \
  121. --enable-curl \
  122. --enable-flac \
  123. --enable-httpd-output \
  124. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  125. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  126. --enable-tcp \
  127. --enable-un \
  128. CONFIGURE_VARS += \
  129. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  130. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  131. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  132. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  133. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  134. ifeq ($(BUILD_VARIANT),full)
  135. CONFIGURE_ARGS += \
  136. --enable-upnp \
  137. $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
  138. --enable-audiofile \
  139. --enable-fifo \
  140. --enable-ffmpeg \
  141. --enable-id3 \
  142. --enable-lastfm \
  143. --enable-mms \
  144. --enable-oggflac \
  145. --enable-pipe-output \
  146. --enable-recorder-output \
  147. --disable-shout \
  148. --enable-sndfile \
  149. --enable-vorbis \
  150. --disable-vorbis-encoder \
  151. --with-faad="$(STAGING_DIR)/usr" \
  152. --with-tremor=yes \
  153. endif
  154. ifeq ($(BUILD_VARIANT),mini)
  155. # oggflac is not compatible with tremor
  156. CONFIGURE_ARGS += \
  157. --disable-upnp \
  158. --disable-aac \
  159. --disable-audiofile \
  160. --disable-fifo \
  161. --disable-ffmpeg \
  162. --disable-id3 \
  163. --disable-mms \
  164. --disable-pipe-output \
  165. --disable-recorder-output \
  166. --disable-shout \
  167. --disable-sndfile \
  168. --disable-vorbis \
  169. --disable-vorbis-encoder \
  170. --with-tremor=yes \
  171. endif
  172. define Package/mpd/install
  173. $(INSTALL_DIR) $(1)/usr/bin
  174. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  175. $(INSTALL_DIR) $(1)/etc
  176. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  177. $(INSTALL_DIR) $(1)/etc/init.d
  178. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  179. endef
  180. define Package/mpd-full/install
  181. $(call Package/mpd/install,$1)
  182. endef
  183. define Package/mpd-mini/install
  184. $(call Package/mpd/install,$1)
  185. endef
  186. define Package/mpd-avahi-service/install
  187. $(INSTALL_DIR) $(1)/etc/avahi/services
  188. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  189. endef
  190. $(eval $(call BuildPackage,mpd-full))
  191. $(eval $(call BuildPackage,mpd-mini))
  192. $(eval $(call BuildPackage,mpd-avahi-service))