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.

228 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.23
  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:=fcdfe8b3a7a21a87b6776204e6eb7814
  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. --enable-audiofile \
  141. --enable-fifo \
  142. --enable-ffmpeg \
  143. --enable-id3 \
  144. --enable-lastfm \
  145. --enable-mms \
  146. --enable-oggflac \
  147. --enable-pipe-output \
  148. --enable-recorder-output \
  149. --disable-shout \
  150. --enable-sndfile \
  151. --enable-vorbis \
  152. --disable-vorbis-encoder \
  153. --with-faad="$(STAGING_DIR)/usr" \
  154. --with-tremor=yes \
  155. endif
  156. ifeq ($(BUILD_VARIANT),mini)
  157. # oggflac is not compatible with tremor
  158. CONFIGURE_ARGS += \
  159. --disable-aac \
  160. --disable-audiofile \
  161. --disable-fifo \
  162. --disable-ffmpeg \
  163. --disable-id3 \
  164. --disable-lastfm \
  165. --disable-mms \
  166. --disable-oggflac \
  167. --disable-pipe-output \
  168. --disable-recorder-output \
  169. --disable-shout \
  170. --disable-sndfile \
  171. --disable-vorbis \
  172. --disable-vorbis-encoder \
  173. --with-tremor=yes \
  174. endif
  175. define Package/mpd/install
  176. $(INSTALL_DIR) $(1)/usr/bin
  177. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
  178. $(INSTALL_DIR) $(1)/etc
  179. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
  180. $(INSTALL_DIR) $(1)/etc/init.d
  181. $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
  182. endef
  183. define Package/mpd-full/install
  184. $(call Package/mpd/install,$1)
  185. endef
  186. define Package/mpd-mini/install
  187. $(call Package/mpd/install,$1)
  188. endef
  189. define Package/mpd-avahi-service/install
  190. $(INSTALL_DIR) $(1)/etc/avahi/services
  191. $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
  192. endef
  193. $(eval $(call BuildPackage,mpd-full))
  194. $(eval $(call BuildPackage,mpd-mini))
  195. $(eval $(call BuildPackage,mpd-avahi-service))