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.

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