Makefile 4.5 KB

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