Makefile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= mpd
  5. PKG_VERSION:= 0.18.5
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 63bcf6ce338caa2ae2cd6dc8e9710d5c
  8. PKG_DESCR:= A music player daemon
  9. PKG_SECTION:= multimedia
  10. PKG_DEPENDS:= glib libstdcxx libgcc libiconv
  11. PKG_FDEPENDS:= glib libstdcxx libgcc libiconv
  12. PKG_BUILDDEP:= glib
  13. PKG_URL:= http://www.musicpd.org/
  14. PKG_SITES:= http://www.musicpd.org/download/mpd/0.18/
  15. PKG_NEED_CXX:= 1
  16. PKG_ARCH_DEPENDS:= !avr32 !m68k
  17. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
  18. PKG_FLAVOURS_MPD:= WITH_ALSA WITH_AO WITH_MP3 WITH_MP4 WITH_TREMOR
  19. PKG_FLAVOURS_MPD+= WITH_OGG WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG
  20. PKG_FLAVOURS_MPD+= WITH_SHOUT WITH_CURL WITH_SAMPLERATE WITH_HTTPD
  21. PKG_FLAVOURS_MPD+= WITH_OPUS
  22. PKGFD_WITH_ALSA:= enable ALSA output
  23. PKGFS_WITH_ALSA:= alsa-lib
  24. PKGFB_WITH_ALSA:= alsa-lib
  25. ifeq ($(ADK_PACKAGE_MPD_WITH_ALSA),y)
  26. PKG_FDEPENDS+= alsa-lib
  27. endif
  28. PKGFD_WITH_AO:= enable Libao/ESD output
  29. PKGFS_WITH_AO:= libao
  30. PKGFB_WITH_AO:= libao
  31. ifeq ($(ADK_PACKAGE_MPD_WITH_AO),y)
  32. PKG_FDEPENDS+= libao
  33. endif
  34. PKGFD_WITH_MP3:= enable MP3 support
  35. PKGFS_WITH_MP3:= libid3tag libmad
  36. PKGFB_WITH_MP3:= libid3tag libmad
  37. ifeq ($(ADK_PACKAGE_MPD_WITH_MP3),y)
  38. PKG_FDEPENDS+= libid3tag libmad
  39. endif
  40. PKGFD_WITH_MP4:= enable MP4 support
  41. PKGFS_WITH_MP4:= libfaad2
  42. PKGFB_WITH_MP4:= faad2
  43. ifeq ($(ADK_PACKAGE_MPD_WITH_MP4),y)
  44. PKG_FDEPENDS+= libfaad2
  45. endif
  46. PKGFD_WITH_OGG:= enable OGG support
  47. PKGFS_WITH_OGG:= libvorbis libogg
  48. PKGFB_WITH_OGG:= libvorbis libogg
  49. ifeq ($(ADK_PACKAGE_MPD_WITH_OGG),y)
  50. PKG_FDEPENDS+= libvorbis libogg
  51. endif
  52. PKGFD_WITH_TREMOR:= enable fixpoint Vorbis/OGG support
  53. PKGFS_WITH_TREMOR:= libvorbisidec
  54. PKGFB_WITH_TREMOR:= libvorbisidec
  55. ifeq ($(ADK_PACKAGE_MPD_WITH_TREMOR),y)
  56. PKG_FDEPENDS+= libvorbisidec
  57. endif
  58. PKGFD_WITH_FLAC:= enable FLAC support
  59. PKGFS_WITH_FLAC:= libflac
  60. PKGFB_WITH_FLAC:= flac
  61. ifeq ($(ADK_PACKAGE_MPD_WITH_FLAC),y)
  62. PKG_FDEPENDS+= libflac
  63. endif
  64. PKGFD_WITH_WAV:= enable WAVE support
  65. PKGFS_WITH_WAV:= libaudiofile
  66. PKGFB_WITH_WAV:= libaudiofile
  67. ifeq ($(ADK_PACKAGE_MPD_WITH_WAV),y)
  68. PKG_FDEPENDS+= libaudiofile
  69. endif
  70. PKGFD_WITH_MMS:= enable MMS support
  71. PKGFS_WITH_MMS:= libmms
  72. PKGFB_WITH_MMS:= libmms
  73. ifeq ($(ADK_PACKAGE_MPD_WITH_MMS),y)
  74. PKG_FDEPENDS+= libmms
  75. endif
  76. PKGFD_WITH_FFMPEG:= enable FFMPEG support
  77. PKGFS_WITH_FFMPEG:= libffmpeg
  78. PKGFB_WITH_FFMPEG:= ffmpeg
  79. ifeq ($(ADK_PACKAGE_MPD_WITH_FFMPEG),y)
  80. PKG_FDEPENDS+= libffmpeg
  81. endif
  82. PKGFD_WITH_SHOUT:= enable Shoutcast output support
  83. PKGFS_WITH_SHOUT:= libshout libmp3lame libvorbisenc
  84. PKGFB_WITH_SHOUT:= lame libvorbis libshout
  85. ifeq ($(ADK_PACKAGE_MPD_WITH_SHOUT),y)
  86. PKG_FDEPENDS+= libshout libmp3lame libvorbisenc
  87. endif
  88. PKGFD_WITH_CURL:= enable CURL support
  89. PKGFS_WITH_CURL:= libcurl
  90. PKGFB_WITH_CURL:= curl
  91. ifeq ($(ADK_PACKAGE_MPD_WITH_CURL),y)
  92. PKG_FDEPENDS+= libcurl
  93. endif
  94. PKGFD_WITH_SAMPLERATE:= enable samplerate support
  95. PKGFS_WITH_SAMPLERATE:= libsamplerate
  96. PKGFB_WITH_SAMPLERATE:= libsamplerate
  97. ifeq ($(ADK_PACKAGE_MPD_WITH_SAMPLERATE),y)
  98. PKG_FDEPENDS+= libsamplerate
  99. endif
  100. PKGFD_WITH_OPUS:= enable OPUS support
  101. PKGFS_WITH_OPUS:= libopus
  102. PKGFB_WITH_OPUS:= opus
  103. ifeq ($(ADK_PACKAGE_MPD_WITH_OPUS),y)
  104. PKG_FDEPENDS+= libopus
  105. endif
  106. PKGFD_WITH_HTTPD:= enable HTTP output
  107. include ${TOPDIR}/mk/package.mk
  108. $(eval $(call PKG_template,MPD,mpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_FDEPENDS},${PKG_DESCR},${PKG_SECTION}))
  109. TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE
  110. TARGET_CFLAGS+= -std=gnu99
  111. CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no
  112. CONFIGURE_ARGS+= --disable-jack \
  113. --disable-fifo \
  114. --disable-pulse \
  115. --disable-oss \
  116. --disable-bzip2 \
  117. --disable-mpc \
  118. --disable-wavpack \
  119. --disable-modplug \
  120. --disable-sqlite \
  121. --disable-mpg123 \
  122. --disable-soundcloud \
  123. --enable-inotify \
  124. --with-zeroconf=no
  125. ifneq (${ADK_PACKAGE_MPD_WITH_HTTPD},)
  126. CONFIGURE_ARGS+= --enable-httpd-output
  127. else
  128. CONFIGURE_ARGS+= --disable-httpd-output
  129. endif
  130. ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},)
  131. CONFIGURE_ARGS+= --enable-alsa
  132. else
  133. CONFIGURE_ARGS+= --disable-alsa
  134. endif
  135. ifneq (${ADK_PACKAGE_MPD_WITH_AO},)
  136. CONFIGURE_ARGS+= --enable-ao
  137. else
  138. CONFIGURE_ARGS+= --disable-ao
  139. endif
  140. ifneq (${ADK_PACKAGE_MPD_WITH_MP3},)
  141. CONFIGURE_ARGS+= --enable-id3 --enable-mad
  142. else
  143. CONFIGURE_ARGS+= --disable-id3 --disable-mad
  144. endif
  145. ifneq (${ADK_PACKAGE_MPD_WITH_MP4},)
  146. CONFIGURE_ARGS+= --enable-aac
  147. else
  148. CONFIGURE_ARGS+= --disable-aac
  149. endif
  150. ifneq (${ADK_PACKAGE_MPD_WITH_OGG},)
  151. CONFIGURE_ARGS+= --enable-vorbis
  152. else
  153. CONFIGURE_ARGS+= --disable-vorbis
  154. endif
  155. ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},)
  156. CONFIGURE_ARGS+= \
  157. --disable-vorbis \
  158. --with-tremor \
  159. --with-tremor-includes=${STAGING_TARGET_DIR}/usr/include \
  160. --with-tremor-libraries=${STAGING_TARGET_DIR}/usr/lib
  161. endif
  162. ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},)
  163. CONFIGURE_ARGS+= --enable-flac
  164. else
  165. CONFIGURE_ARGS+= --disable-flac
  166. endif
  167. ifneq (${ADK_PACKAGE_MPD_WITH_WAV},)
  168. CONFIGURE_ARGS+= --enable-audiofile
  169. else
  170. CONFIGURE_ARGS+= --disable-audiofile
  171. endif
  172. ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},)
  173. CONFIGURE_ARGS+= --enable-shout \
  174. --enable-lame-encoder \
  175. --enable-vorbis-encoder
  176. else
  177. CONFIGURE_ARGS+= --disable-shout \
  178. --disable-lame-encoder \
  179. --disable-vorbis-encoder
  180. endif
  181. ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
  182. CONFIGURE_ARGS+= --enable-curl
  183. else
  184. CONFIGURE_ARGS+= --disable-curl
  185. endif
  186. ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
  187. CONFIGURE_ARGS+= --enable-mms
  188. else
  189. CONFIGURE_ARGS+= --disable-mms
  190. endif
  191. ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
  192. CONFIGURE_ARGS+= --enable-ffmpeg
  193. else
  194. CONFIGURE_ARGS+= --disable-ffmpeg
  195. endif
  196. ifneq (${ADK_PACKAGE_MPD_WITH_SAMPLERATE},)
  197. CONFIGURE_ARGS+= --enable-lsr
  198. else
  199. CONFIGURE_ARGS+= --disable-lsr
  200. endif
  201. ifneq (${ADK_PACKAGE_MPD_WITH_OPUS},)
  202. CONFIGURE_ARGS+= --enable-opus
  203. else
  204. CONFIGURE_ARGS+= --disable-opus
  205. endif
  206. mpd-install:
  207. ${INSTALL_DIR} ${IDIR_MPD}/usr/bin ${IDIR_MPD}/etc/mpd/playlists
  208. ${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
  209. ${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
  210. include ${TOPDIR}/mk/pkg-bottom.mk