Makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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.15.6
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= c78b8933e4902c5dc407d59925f8b10e
  8. PKG_DESCR:= A music player daemon
  9. PKG_SECTION:= net
  10. PKG_DEPENDS:= glib libstdcxx
  11. PKG_BUILDDEP+= glib
  12. ifneq ($(ADK_PACKAGE_MPD_WITH_ALSA),)
  13. PKG_BUILDDEP+= alsa-lib
  14. endif
  15. ifneq ($(ADK_PACKAGE_MPD_WITH_MP3),)
  16. PKG_BUILDDEP+= libid3tag libmad
  17. endif
  18. ifneq ($(ADK_PACKAGE_MPD_WITH_MP4),)
  19. PKG_BUILDDEP+= faad2
  20. endif
  21. ifneq ($(ADK_PACKAGE_MPD_WITH_OGG),)
  22. PKG_BUILDDEP+= libvorbis
  23. endif
  24. ifneq ($(ADK_PACKAGE_MPD_WITH_TREMOR),)
  25. PKG_BUILDDEP+= libvorbisidec
  26. endif
  27. ifneq ($(ADK_PACKAGE_MPD_WITH_FLAC),)
  28. PKG_BUILDDEP+= flac
  29. endif
  30. ifneq ($(ADK_PACKAGE_MPD_WITH_WAV),)
  31. PKG_BUILDDEP+= libaudiofile
  32. endif
  33. ifneq ($(ADK_PACKAGE_MPD_WITH_SHOUT),)
  34. PKG_BUILDDEP+= lame libvorbis
  35. endif
  36. ifneq ($(ADK_PACKAGE_MPD_WITH_CURL),)
  37. PKG_BUILDDEP+= curl
  38. endif
  39. ifneq ($(ADK_PACKAGE_MPD_WITH_MMS),)
  40. PKG_BUILDDEP+= libmms
  41. endif
  42. ifneq ($(ADK_PACKAGE_MPD_WITH_FFMPEG),)
  43. PKG_BUILDDEP+= ffmpeg
  44. endif
  45. PKG_URL:= http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki
  46. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=musicpd/}
  47. PKG_FLAVOURS:= WITH_ALSA WITH_MP3 WITH_MP4 WITH_TREMOR WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG WITH_SHOUT WITH_CURL
  48. PKGFD_WITH_ALSA:= enable ALSA output
  49. PKGFD_WITH_MP3:= enable MP3 support
  50. PKGFD_WITH_MP4:= enable MP4 support
  51. PKGFD_WITH_OGG:= enable OGG support
  52. PKGFD_WITH_TREMOR:= enable fixpoint Vorbis/OGG support
  53. PKGFD_WITH_FLAC:= enable FLAC support
  54. PKGFD_WITH_WAV:= enable WAVE support
  55. PKGFD_WITH_MMS:= enable MMS support
  56. PKGFD_WITH_FFMPEG:= enable FFMPEG support
  57. PKGFD_WITH_SHOUT:= enable Shoutcast output support
  58. PKGFD_WITH_CURL:= enable CURL support
  59. include ${TOPDIR}/mk/package.mk
  60. ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},)
  61. PKG_DEPENDS+= alsa-lib
  62. endif
  63. ifneq (${ADK_PACKAGE_MPD_WITH_MP3},)
  64. PKG_DEPENDS+= libid3tag libmad
  65. endif
  66. ifneq (${ADK_PACKAGE_MPD_WITH_MP4},)
  67. PKG_DEPENDS+= libfaad2
  68. endif
  69. ifneq (${ADK_PACKAGE_MPD_WITH_OGG},)
  70. PKG_DEPENDS+= libvorbis libogg
  71. endif
  72. ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},)
  73. PKG_DEPENDS+= libvorbisidec
  74. endif
  75. ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},)
  76. PKG_DEPENDS+= libflac
  77. endif
  78. ifneq (${ADK_PACKAGE_MPD_WITH_WAV},)
  79. PKG_DEPENDS+= libaudiofile
  80. endif
  81. ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},)
  82. PKG_DEPENDS+= libshout liblame libvorbisenc
  83. endif
  84. ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
  85. PKG_DEPENDS+= libcurl
  86. endif
  87. ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
  88. PKG_DEPENDS+= libmms
  89. endif
  90. ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
  91. PKG_DEPENDS+= ffmpeg
  92. endif
  93. $(eval $(call PKG_template,MPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  94. CONFIGURE_STYLE:= gnu autotool
  95. BUILD_STYLE:= auto
  96. INSTALL_STYLE:= auto
  97. XAKE_FLAGS+= MPD_CFLAGS='-D_GNU_SOURCE'
  98. CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no
  99. CONFIGURE_ARGS+= \
  100. --disable-httpd-output \
  101. --disable-ao \
  102. --disable-jack \
  103. --disable-fifo \
  104. --disable-pulse \
  105. --disable-oss \
  106. --disable-mpc \
  107. --disable-wavpack \
  108. --disable-sqlite \
  109. --with-zeroconf=no
  110. ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},)
  111. CONFIGURE_ARGS+= --enable-alsa
  112. else
  113. CONFIGURE_ARGS+= --disable-alsa
  114. endif
  115. ifneq (${ADK_PACKAGE_MPD_WITH_MP3},)
  116. CONFIGURE_ARGS+= --enable-id3 --enable-mad
  117. else
  118. CONFIGURE_ARGS+= --disable-id3 --disable-mad
  119. endif
  120. ifneq (${ADK_PACKAGE_MPD_WITH_MP4},)
  121. CONFIGURE_ARGS+= --enable-aac
  122. else
  123. CONFIGURE_ARGS+= --disable-aac
  124. endif
  125. ifneq (${ADK_PACKAGE_MPD_WITH_OGG},)
  126. CONFIGURE_ARGS+= --enable-vorbis
  127. else
  128. CONFIGURE_ARGS+= --disable-vorbis
  129. endif
  130. ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},)
  131. CONFIGURE_ARGS+= \
  132. --disable-vorbis \
  133. --with-tremor \
  134. --with-tremor-includes=${STAGING_DIR}/usr/include \
  135. --with-tremor-libraries=${STAGING_DIR}/usr/lib
  136. endif
  137. ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},)
  138. CONFIGURE_ARGS+= --enable-flac
  139. else
  140. CONFIGURE_ARGS+= --disable-flac
  141. endif
  142. ifneq (${ADK_PACKAGE_MPD_WITH_WAV},)
  143. CONFIGURE_ARGS+= --enable-audiofile
  144. else
  145. CONFIGURE_ARGS+= --disable-audiofile
  146. endif
  147. ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},)
  148. CONFIGURE_ARGS+= --enable-shout \
  149. --enable-lame-encoder \
  150. --enable-vorbis-encoder \
  151. --with-lame-includes=${STAGING_DIR}/usr/include \
  152. --with-lame-libraries=${STAGING_DIR}/usr/lib
  153. else
  154. CONFIGURE_ARGS+= --disable-shout \
  155. --disable-lame-encoder \
  156. --disable-vorbis-encoder
  157. endif
  158. ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
  159. CONFIGURE_ARGS+= --enable-curl
  160. else
  161. CONFIGURE_ARGS+= --disable-curl
  162. endif
  163. ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
  164. CONFIGURE_ARGS+= --enable-mms
  165. else
  166. CONFIGURE_ARGS+= --disable-mms
  167. endif
  168. ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
  169. CONFIGURE_ARGS+= --enable-ffmpeg
  170. else
  171. CONFIGURE_ARGS+= --disable-ffmpeg
  172. endif
  173. post-install:
  174. ${INSTALL_DIR} ${IDIR_MPD}/usr/bin ${IDIR_MPD}/etc
  175. ${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
  176. ${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
  177. include ${TOPDIR}/mk/pkg-bottom.mk