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.

210 lines
4.9 KiB

  1. #
  2. # Copyright (C) 2007-2014 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.11
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.18/
  13. PKG_MD5SUM:=be23120f342250e8352f6499cb960fd2
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILE:=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/avahi/services/mpd.service
  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. CONFIGURE_ARGS += \
  72. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  73. --disable-debug \
  74. --disable-documentation \
  75. --disable-gprof \
  76. --disable-test \
  77. --disable-werror \
  78. \
  79. --disable-ao \
  80. --disable-bzip2 \
  81. --enable-cue \
  82. --disable-ffado \
  83. --disable-fluidsynth \
  84. --disable-gme \
  85. --enable-inotify \
  86. --disable-eventfd \
  87. --disable-iso9660 \
  88. --disable-jack \
  89. --disable-lame-encoder \
  90. --disable-libwrap \
  91. --disable-lsr \
  92. --disable-mikmod \
  93. --disable-modplug \
  94. --disable-mpc \
  95. --disable-mpg123 \
  96. --disable-mvp \
  97. --disable-openal \
  98. --disable-opus \
  99. --disable-pulse \
  100. --disable-sidplay \
  101. --disable-solaris-output \
  102. --disable-soup \
  103. --disable-sqlite \
  104. --disable-twolame-encoder \
  105. --enable-wave-encoder \
  106. --disable-wavpack \
  107. --disable-wildmidi \
  108. --disable-zzip \
  109. --with-zeroconf=no \
  110. \
  111. --enable-curl \
  112. --enable-flac \
  113. --enable-httpd-output \
  114. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  115. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  116. --enable-tcp \
  117. --enable-un \
  118. CONFIGURE_VARS += \
  119. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  120. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  121. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  122. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  123. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  124. ifeq ($(BUILD_VARIANT),full)
  125. CONFIGURE_ARGS += \
  126. $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
  127. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  128. --enable-audiofile \
  129. --enable-fifo \
  130. --enable-ffmpeg \
  131. --enable-id3 \
  132. --enable-lastfm \
  133. --enable-mms \
  134. --enable-oggflac \
  135. --enable-pipe-output \
  136. --enable-recorder-output \
  137. --disable-shout \
  138. --enable-sndfile \
  139. --enable-vorbis \
  140. --disable-vorbis-encoder \
  141. --with-faad="$(STAGING_DIR)/usr" \
  142. --with-tremor=yes \
  143. endif
  144. ifeq ($(BUILD_VARIANT),mini)
  145. # oggflac is not compatible with tremor
  146. CONFIGURE_ARGS += \
  147. --disable-aac \
  148. --disable-alsa \
  149. --disable-audiofile \
  150. --disable-fifo \
  151. --disable-ffmpeg \
  152. --disable-id3 \
  153. --disable-lastfm \
  154. --disable-mms \
  155. --disable-oggflac \
  156. --disable-pipe-output \
  157. --disable-recorder-output \
  158. --disable-shout \
  159. --disable-sndfile \
  160. --disable-vorbis \
  161. --disable-vorbis-encoder \
  162. --with-tremor=yes \
  163. endif
  164. define Package/mpd/install
  165. $(INSTALL_DIR) $(1)/usr/bin
  166. $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  167. $(INSTALL_DIR) $(1)/etc
  168. $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  169. $(INSTALL_DIR) $(1)/etc/init.d
  170. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  171. endef
  172. define Package/mpd-full/install
  173. $(call Package/mpd/install,$1)
  174. $(INSTALL_DIR) $(1)/etc/avahi/services
  175. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  176. endef
  177. define Package/mpd-mini/install
  178. $(call Package/mpd/install,$1)
  179. endef
  180. $(eval $(call BuildPackage,mpd-full))
  181. $(eval $(call BuildPackage,mpd-mini))