Makefile 4.6 KB

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