Makefile 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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_BUILDDEP+= alsa-lib glib
  8. ifneq ($(ADK_COMPILE_MPD_WITH_MP3),)
  9. PKG_BUILDDEP+= libid3tag libmad
  10. endif
  11. ifneq ($(ADK_COMPILE_MPD_WITH_MP4),)
  12. PKG_BUILDDEP+= faad2
  13. endif
  14. ifneq ($(ADK_COMPILE_MPD_WITH_OGG),)
  15. PKG_BUILDDEP+= libvorbis
  16. endif
  17. ifneq ($(ADK_COMPILE_MPD_WITH_TREMOR),)
  18. PKG_BUILDDEP+= libvorbisidec
  19. endif
  20. ifneq ($(ADK_COMPILE_MPD_WITH_FLAC),)
  21. PKG_BUILDDEP+= flac
  22. endif
  23. ifneq ($(ADK_COMPILE_MPD_WITH_WAV),)
  24. PKG_BUILDDEP+= libaudiofile
  25. endif
  26. ifneq ($(ADK_COMPILE_MPD_WITH_SHOUT),)
  27. PKG_BUILDDEP+= lame
  28. endif
  29. ifneq ($(ADK_COMPILE_MPD_WITH_CURL),)
  30. PKG_BUILDDEP+= curl
  31. endif
  32. ifneq ($(ADK_COMPILE_MPD_WITH_MMS),)
  33. PKG_BUILDDEP+= libmms
  34. endif
  35. ifneq ($(ADK_COMPILE_MPD_WITH_FFMPEG),)
  36. PKG_BUILDDEP+= ffmpeg
  37. endif
  38. PKG_MD5SUM:= c78b8933e4902c5dc407d59925f8b10e
  39. PKG_DESCR:= A music player daemon
  40. PKG_SECTION:= net
  41. PKG_DEPENDS:= glib
  42. PKG_URL:= http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki
  43. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=musicpd/}
  44. include ${TOPDIR}/mk/package.mk
  45. ifneq (${ADK_COMPILE_MPD_WITH_ALSA},)
  46. PKG_DEPENDS+= alsa-lib
  47. endif
  48. ifneq (${ADK_COMPILE_MPD_WITH_MP3},)
  49. PKG_DEPENDS+= libid3tag libmad
  50. endif
  51. ifneq (${ADK_COMPILE_MPD_WITH_MP4},)
  52. PKG_DEPENDS+= libfaad2
  53. endif
  54. ifneq (${ADK_COMPILE_MPD_WITH_OGG},)
  55. PKG_DEPENDS+= libvorbis libogg
  56. endif
  57. ifneq (${ADK_COMPILE_MPD_WITH_TREMOR},)
  58. PKG_DEPENDS+= libvorbisidec
  59. endif
  60. ifneq (${ADK_COMPILE_MPD_WITH_FLAC},)
  61. PKG_DEPENDS+= libflac
  62. endif
  63. ifneq (${ADK_COMPILE_MPD_WITH_WAV},)
  64. PKG_DEPENDS+= libaudiofile
  65. endif
  66. ifneq (${ADK_COMPILE_MPD_WITH_SHOUT},)
  67. PKG_DEPENDS+= libshout liblame
  68. endif
  69. ifneq (${ADK_COMPILE_MPD_WITH_CURL},)
  70. PKG_DEPENDS+= libcurl
  71. endif
  72. ifneq (${ADK_COMPILE_MPD_WITH_MMS},)
  73. PKG_DEPENDS+= libmms
  74. endif
  75. ifneq (${ADK_COMPILE_MPD_WITH_FFMPEG},)
  76. PKG_DEPENDS+= ffmpeg
  77. endif
  78. $(eval $(call PKG_template,MPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  79. CONFIGURE_STYLE:= gnu autotool
  80. BUILD_STYLE:= auto
  81. INSTALL_STYLE:= auto
  82. XAKE_FLAGS+= MPD_CFLAGS='-D_GNU_SOURCE'
  83. CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no
  84. CONFIGURE_ARGS+= \
  85. --disable-httpd-output \
  86. --disable-ao \
  87. --disable-jack \
  88. --disable-fifo \
  89. --disable-pulse \
  90. --disable-oss \
  91. --disable-mpc \
  92. --disable-wavpack \
  93. --disable-sqlite \
  94. --with-zeroconf=no
  95. ifneq (${ADK_COMPILE_MPD_WITH_ALSA},)
  96. CONFIGURE_ARGS+= --enable-alsa
  97. else
  98. CONFIGURE_ARGS+= --disable-alsa
  99. endif
  100. ifneq (${ADK_COMPILE_MPD_WITH_MP3},)
  101. CONFIGURE_ARGS+= --enable-id3 --enable-mad
  102. else
  103. CONFIGURE_ARGS+= --disable-id3 --disable-mad
  104. endif
  105. ifneq (${ADK_COMPILE_MPD_WITH_MP4},)
  106. CONFIGURE_ARGS+= --enable-aac
  107. else
  108. CONFIGURE_ARGS+= --disable-aac
  109. endif
  110. ifneq (${ADK_COMPILE_MPD_WITH_OGG},)
  111. CONFIGURE_ARGS+= --enable-vorbis
  112. else
  113. CONFIGURE_ARGS+= --disable-vorbis
  114. endif
  115. ifneq (${ADK_COMPILE_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_COMPILE_MPD_WITH_FLAC},)
  123. CONFIGURE_ARGS+= --enable-flac
  124. else
  125. CONFIGURE_ARGS+= --disable-flac
  126. endif
  127. ifneq (${ADK_COMPILE_MPD_WITH_WAV},)
  128. CONFIGURE_ARGS+= --enable-audiofile
  129. else
  130. CONFIGURE_ARGS+= --disable-audiofile
  131. endif
  132. ifneq (${ADK_COMPILE_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_COMPILE_MPD_WITH_CURL},)
  144. CONFIGURE_ARGS+= --enable-curl
  145. else
  146. CONFIGURE_ARGS+= --disable-curl
  147. endif
  148. ifneq (${ADK_COMPILE_MPD_WITH_MMS},)
  149. CONFIGURE_ARGS+= --enable-mms
  150. else
  151. CONFIGURE_ARGS+= --disable-mms
  152. endif
  153. ifneq (${ADK_COMPILE_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