Makefile 5.4 KB

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