1
0

Makefile 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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.10
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 3ee746cb9193acfd0e1bd7a8c54af1a6
  8. PKG_DESCR:= A music player daemon
  9. PKG_SECTION:= multimedia
  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_AO),)
  16. PKG_BUILDDEP+= libao
  17. endif
  18. ifneq ($(ADK_PACKAGE_MPD_WITH_MP3),)
  19. PKG_BUILDDEP+= libid3tag libmad
  20. endif
  21. ifneq ($(ADK_PACKAGE_MPD_WITH_MP4),)
  22. PKG_BUILDDEP+= faad2
  23. endif
  24. ifneq ($(ADK_PACKAGE_MPD_WITH_OGG),)
  25. PKG_BUILDDEP+= libvorbis libogg
  26. endif
  27. ifneq ($(ADK_PACKAGE_MPD_WITH_TREMOR),)
  28. PKG_BUILDDEP+= libvorbisidec
  29. endif
  30. ifneq ($(ADK_PACKAGE_MPD_WITH_FLAC),)
  31. PKG_BUILDDEP+= flac
  32. endif
  33. ifneq ($(ADK_PACKAGE_MPD_WITH_WAV),)
  34. PKG_BUILDDEP+= libaudiofile
  35. endif
  36. ifneq ($(ADK_PACKAGE_MPD_WITH_SHOUT),)
  37. PKG_BUILDDEP+= lame libvorbis libshout
  38. endif
  39. ifneq ($(ADK_PACKAGE_MPD_WITH_CURL),)
  40. PKG_BUILDDEP+= curl
  41. endif
  42. ifneq ($(ADK_PACKAGE_MPD_WITH_MMS),)
  43. PKG_BUILDDEP+= libmms
  44. endif
  45. ifneq ($(ADK_PACKAGE_MPD_WITH_FFMPEG),)
  46. PKG_BUILDDEP+= ffmpeg
  47. endif
  48. PKG_URL:= http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki
  49. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=musicpd/}
  50. PKG_FLAVOURS:= WITH_ALSA WITH_AO WITH_MP3 WITH_MP4 WITH_TREMOR \
  51. WITH_OGG WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG \
  52. WITH_SHOUT WITH_CURL
  53. PKGFD_WITH_ALSA:= enable ALSA output
  54. PKGFS_WITH_ALSA:= alsa-lib
  55. PKGFD_WITH_AO:= enable Libao/ESD output
  56. PKGFS_WITH_AO:= libao
  57. PKGFD_WITH_MP3:= enable MP3 support
  58. PKGFS_WITH_MP3:= libid3tag libmad
  59. PKGFD_WITH_MP4:= enable MP4 support
  60. PKGFS_WITH_MP4:= libfaad2
  61. PKGFD_WITH_OGG:= enable OGG support
  62. PKGFS_WITH_OGG:= libvorbis libogg
  63. PKGFD_WITH_TREMOR:= enable fixpoint Vorbis/OGG support
  64. PKGFS_WITH_TREMOR:= libvorbisidec
  65. PKGFD_WITH_FLAC:= enable FLAC support
  66. PKGFS_WITH_FLAC:= libflac
  67. PKGFD_WITH_WAV:= enable WAVE support
  68. PKGFS_WITH_WAV:= libaudiofile
  69. PKGFD_WITH_MMS:= enable MMS support
  70. PKGFS_WITH_MMS:= libmms
  71. PKGFD_WITH_FFMPEG:= enable FFMPEG support
  72. PKGFS_WITH_FFMPEG:= ffmpeg
  73. PKGFD_WITH_SHOUT:= enable Shoutcast output support
  74. PKGFS_WITH_SHOUT:= libshout liblame libvorbis
  75. PKGFD_WITH_CURL:= enable CURL support
  76. PKGFS_WITH_CURL:= libcurl
  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. --with-lame=${STAGING_DIR}/usr \
  136. --enable-vorbis-encoder
  137. else
  138. CONFIGURE_ARGS+= --disable-shout \
  139. --disable-lame-encoder \
  140. --disable-vorbis-encoder
  141. endif
  142. ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
  143. CONFIGURE_ARGS+= --enable-curl
  144. else
  145. CONFIGURE_ARGS+= --disable-curl
  146. endif
  147. ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
  148. CONFIGURE_ARGS+= --enable-mms
  149. else
  150. CONFIGURE_ARGS+= --disable-mms
  151. endif
  152. ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
  153. CONFIGURE_ARGS+= --enable-ffmpeg
  154. else
  155. CONFIGURE_ARGS+= --disable-ffmpeg
  156. endif
  157. post-install:
  158. ${INSTALL_DIR} ${IDIR_MPD}/usr/bin ${IDIR_MPD}/etc
  159. ${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
  160. ${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
  161. include ${TOPDIR}/mk/pkg-bottom.mk