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.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.17.6
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.17/
  13. PKG_MD5SUM:=0a42ed81ff298c12e22c16be31097e4c
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_CONFIG_DEPENDS:= \
  18. CONFIG_IPV6 \
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/mpd/Default
  23. SECTION:=sound
  24. CATEGORY:=Sound
  25. TITLE:=Music Player Daemon
  26. URL:=http://www.musicpd.org/
  27. DEPENDS:= +glib2 +libcurl +libpthread $(ICONV_DEPENDS) \
  28. +libflac +BUILD_PATENTED:libmad +libvorbisidec
  29. endef
  30. define Package/mpd/Default/description
  31. Music Player Daemon (MPD) is a flexible, powerful, server-side
  32. application for playing music. It is typically controlled over a
  33. network using one of it's many clients including mpc (console),
  34. gmpc (gnome), phpmp (php), etc...
  35. endef
  36. define Package/mpd-full
  37. $(call Package/mpd/Default)
  38. TITLE+= (full)
  39. DEPENDS+= \
  40. +AUDIO_SUPPORT:alsa-lib \
  41. +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \
  42. +libmms +libogg +libsndfile +libvorbis
  43. PROVIDES:=mpd
  44. VARIANT:=full
  45. endef
  46. define Package/mpd-full/description
  47. $(call Package/mpd/Default/description)
  48. .
  49. This package contains a full-blown Music Player Daemon.
  50. endef
  51. define Package/mpd-full/conffiles
  52. /etc/avahi/services/mpd.service
  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. CONFIGURE_ARGS += \
  71. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  72. --disable-debug \
  73. --disable-documentation \
  74. --disable-gprof \
  75. --disable-test \
  76. --disable-werror \
  77. \
  78. --disable-ao \
  79. --disable-bzip2 \
  80. --enable-cue \
  81. --disable-ffado \
  82. --disable-fluidsynth \
  83. --disable-gme \
  84. --enable-inotify \
  85. --disable-iso9660 \
  86. --disable-jack \
  87. --disable-lame-encoder \
  88. --disable-libwrap \
  89. --disable-lsr \
  90. --disable-mikmod \
  91. --disable-modplug \
  92. --disable-mpc \
  93. --disable-mpg123 \
  94. --disable-mvp \
  95. --disable-openal \
  96. --disable-pulse \
  97. --disable-sidplay \
  98. --disable-solaris-output \
  99. --disable-sqlite \
  100. --disable-twolame-encoder \
  101. --enable-wave-encoder \
  102. --disable-wavpack \
  103. --disable-wildmidi \
  104. --disable-zzip \
  105. --with-zeroconf=auto \
  106. \
  107. --enable-curl \
  108. --enable-flac \
  109. --enable-httpd-output \
  110. $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
  111. $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,oss) \
  112. --enable-tcp \
  113. --enable-un \
  114. CONFIGURE_VARS += \
  115. FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
  116. FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
  117. $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
  118. $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
  119. TARGET_CFLAGS += -std=gnu99
  120. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv)
  121. # use gcc instead of g++ to avoid unnecessary linking against libstdc++
  122. TARGET_CXX:=$(TARGET_CC)
  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))