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.

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