Makefile 5.0 KB

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