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.

208 lines
4.8 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-pulse \
  99. --disable-sidplay \
  100. --disable-solaris-output \
  101. --disable-sqlite \
  102. --disable-twolame-encoder \
  103. --enable-wave-encoder \
  104. --disable-wavpack \
  105. --disable-wildmidi \
  106. --disable-zzip \
  107. --with-zeroconf=no \
  108. \
  109. --enable-curl \
  110. --enable-flac \
  111. --enable-httpd-output \
  112. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  113. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  114. --enable-tcp \
  115. --enable-un \
  116. CONFIGURE_VARS += \
  117. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  118. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  119. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  120. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  121. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  122. ifeq ($(BUILD_VARIANT),full)
  123. CONFIGURE_ARGS += \
  124. $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
  125. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  126. --enable-audiofile \
  127. --enable-fifo \
  128. --enable-ffmpeg \
  129. --enable-id3 \
  130. --enable-lastfm \
  131. --enable-mms \
  132. --enable-oggflac \
  133. --enable-pipe-output \
  134. --enable-recorder-output \
  135. --disable-shout \
  136. --enable-sndfile \
  137. --enable-vorbis \
  138. --disable-vorbis-encoder \
  139. --with-faad="$(STAGING_DIR)/usr" \
  140. --with-tremor=yes \
  141. endif
  142. ifeq ($(BUILD_VARIANT),mini)
  143. # oggflac is not compatible with tremor
  144. CONFIGURE_ARGS += \
  145. --disable-aac \
  146. --disable-alsa \
  147. --disable-audiofile \
  148. --disable-fifo \
  149. --disable-ffmpeg \
  150. --disable-id3 \
  151. --disable-lastfm \
  152. --disable-mms \
  153. --disable-oggflac \
  154. --disable-pipe-output \
  155. --disable-recorder-output \
  156. --disable-shout \
  157. --disable-sndfile \
  158. --disable-vorbis \
  159. --disable-vorbis-encoder \
  160. --with-tremor=yes \
  161. endif
  162. define Package/mpd/install
  163. $(INSTALL_DIR) $(1)/usr/bin
  164. $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  165. $(INSTALL_DIR) $(1)/etc
  166. $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  167. $(INSTALL_DIR) $(1)/etc/init.d
  168. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  169. endef
  170. define Package/mpd-full/install
  171. $(call Package/mpd/install,$1)
  172. $(INSTALL_DIR) $(1)/etc/avahi/services
  173. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  174. endef
  175. define Package/mpd-mini/install
  176. $(call Package/mpd/install,$1)
  177. endef
  178. $(eval $(call BuildPackage,mpd-full))
  179. $(eval $(call BuildPackage,mpd-mini))