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.

209 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:=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:=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) \
  30. +libflac +BUILD_PATENTED:libmad +libvorbisidec
  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. +AUDIO_SUPPORT:alsa-lib \
  43. +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
  44. +libmms +libogg +libsndfile +libvorbis
  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/avahi/services/mpd.service
  55. /etc/mpd.conf
  56. endef
  57. define Package/mpd-mini
  58. $(call Package/mpd/Default)
  59. TITLE+= (mini)
  60. PROVIDES:=mpd
  61. VARIANT:=mini
  62. endef
  63. define Package/mpd-mini/description
  64. $(call Package/mpd/Default/description)
  65. .
  66. This package contains a minimal Music Player Daemon, with support for
  67. only Flac, MP3 & OGG media types & only file: & http: protocols.
  68. endef
  69. define Package/mpd-mini/conffiles
  70. /etc/mpd.conf
  71. endef
  72. CONFIGURE_ARGS += \
  73. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  74. --disable-debug \
  75. --disable-documentation \
  76. --disable-gprof \
  77. --disable-test \
  78. --disable-werror \
  79. \
  80. --disable-ao \
  81. --disable-bzip2 \
  82. --enable-cue \
  83. --disable-ffado \
  84. --disable-fluidsynth \
  85. --disable-gme \
  86. --enable-inotify \
  87. --disable-eventfd \
  88. --disable-iso9660 \
  89. --disable-jack \
  90. --disable-lame-encoder \
  91. --disable-libwrap \
  92. --disable-lsr \
  93. --disable-mikmod \
  94. --disable-modplug \
  95. --disable-mpc \
  96. --disable-mpg123 \
  97. --disable-mvp \
  98. --disable-openal \
  99. --disable-pulse \
  100. --disable-sidplay \
  101. --disable-solaris-output \
  102. --disable-sqlite \
  103. --disable-twolame-encoder \
  104. --enable-wave-encoder \
  105. --disable-wavpack \
  106. --disable-wildmidi \
  107. --disable-zzip \
  108. --with-zeroconf=no \
  109. \
  110. --enable-curl \
  111. --enable-flac \
  112. --enable-httpd-output \
  113. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  114. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,oss) \
  115. --enable-tcp \
  116. --enable-un \
  117. CONFIGURE_VARS += \
  118. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  119. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  120. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  121. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  122. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  123. ifeq ($(BUILD_VARIANT),full)
  124. CONFIGURE_ARGS += \
  125. $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
  126. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
  127. --enable-audiofile \
  128. --enable-fifo \
  129. --enable-ffmpeg \
  130. --enable-id3 \
  131. --enable-lastfm \
  132. --enable-mms \
  133. --enable-oggflac \
  134. --enable-pipe-output \
  135. --enable-recorder-output \
  136. --disable-shout \
  137. --enable-sndfile \
  138. --enable-vorbis \
  139. --disable-vorbis-encoder \
  140. --with-faad="$(STAGING_DIR)/usr" \
  141. --with-tremor=yes \
  142. endif
  143. ifeq ($(BUILD_VARIANT),mini)
  144. # oggflac is not compatible with tremor
  145. CONFIGURE_ARGS += \
  146. --disable-aac \
  147. --disable-alsa \
  148. --disable-audiofile \
  149. --disable-fifo \
  150. --disable-ffmpeg \
  151. --disable-id3 \
  152. --disable-lastfm \
  153. --disable-mms \
  154. --disable-oggflac \
  155. --disable-pipe-output \
  156. --disable-recorder-output \
  157. --disable-shout \
  158. --disable-sndfile \
  159. --disable-vorbis \
  160. --disable-vorbis-encoder \
  161. --with-tremor=yes \
  162. endif
  163. define Package/mpd/install
  164. $(INSTALL_DIR) $(1)/usr/bin
  165. $(CP) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  166. $(INSTALL_DIR) $(1)/etc
  167. $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  168. $(INSTALL_DIR) $(1)/etc/init.d
  169. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  170. endef
  171. define Package/mpd-full/install
  172. $(call Package/mpd/install,$1)
  173. $(INSTALL_DIR) $(1)/etc/avahi/services
  174. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  175. endef
  176. define Package/mpd-mini/install
  177. $(call Package/mpd/install,$1)
  178. endef
  179. $(eval $(call BuildPackage,mpd-full))
  180. $(eval $(call BuildPackage,mpd-mini))