Makefile 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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.18.9
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= 0e5156a831d4302d2032998bcfd5c36f
  8. PKG_DESCR:= A music player daemon
  9. PKG_SECTION:= multimedia
  10. PKG_DEPENDS:= glib libstdcxx libgcc libiconv-tiny libmpdclient
  11. PKG_FDEPENDS:= glib libstdcxx libgcc libiconv-tiny libmpdclient
  12. PKG_BUILDDEP:= glib libmpdclient
  13. PKG_URL:= http://www.musicpd.org/
  14. PKG_SITES:= http://www.musicpd.org/download/mpd/0.18/
  15. PKG_NEED_CXX:= 1
  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 WITH_HTTPD
  20. PKG_FLAVOURS_MPD+= WITH_OPUS WITH_PULSE WITH_AVAHI
  21. PKGFD_WITH_ALSA:= enable ALSA output
  22. PKGFS_WITH_ALSA:= alsa-lib
  23. PKGFB_WITH_ALSA:= alsa-lib
  24. ifeq ($(ADK_PACKAGE_MPD_WITH_ALSA),y)
  25. PKG_FDEPENDS+= alsa-lib
  26. endif
  27. PKGFD_WITH_AO:= enable Libao/ESD output
  28. PKGFS_WITH_AO:= libao
  29. PKGFB_WITH_AO:= libao
  30. ifeq ($(ADK_PACKAGE_MPD_WITH_AO),y)
  31. PKG_FDEPENDS+= libao
  32. endif
  33. PKGFD_WITH_MP3:= enable MP3 support
  34. PKGFS_WITH_MP3:= libid3tag libmad
  35. PKGFB_WITH_MP3:= libid3tag libmad
  36. ifeq ($(ADK_PACKAGE_MPD_WITH_MP3),y)
  37. PKG_FDEPENDS+= libid3tag libmad
  38. endif
  39. PKGFD_WITH_MP4:= enable MP4 support
  40. PKGFS_WITH_MP4:= libfaad2
  41. PKGFB_WITH_MP4:= faad2
  42. ifeq ($(ADK_PACKAGE_MPD_WITH_MP4),y)
  43. PKG_FDEPENDS+= libfaad2
  44. endif
  45. PKGFD_WITH_OGG:= enable OGG support
  46. PKGFS_WITH_OGG:= libvorbis libogg
  47. PKGFB_WITH_OGG:= libvorbis libogg
  48. ifeq ($(ADK_PACKAGE_MPD_WITH_OGG),y)
  49. PKG_FDEPENDS+= libvorbis libogg
  50. endif
  51. PKGFD_WITH_TREMOR:= enable fixpoint Vorbis/OGG support
  52. PKGFS_WITH_TREMOR:= libvorbisidec
  53. PKGFB_WITH_TREMOR:= libvorbisidec
  54. ifeq ($(ADK_PACKAGE_MPD_WITH_TREMOR),y)
  55. PKG_FDEPENDS+= libvorbisidec
  56. endif
  57. PKGFD_WITH_FLAC:= enable FLAC support
  58. PKGFS_WITH_FLAC:= libflac
  59. PKGFB_WITH_FLAC:= flac
  60. ifeq ($(ADK_PACKAGE_MPD_WITH_FLAC),y)
  61. PKG_FDEPENDS+= libflac
  62. endif
  63. PKGFD_WITH_WAV:= enable WAVE support
  64. PKGFS_WITH_WAV:= libaudiofile
  65. PKGFB_WITH_WAV:= libaudiofile
  66. ifeq ($(ADK_PACKAGE_MPD_WITH_WAV),y)
  67. PKG_FDEPENDS+= libaudiofile
  68. endif
  69. PKGFD_WITH_MMS:= enable MMS support
  70. PKGFS_WITH_MMS:= libmms
  71. PKGFB_WITH_MMS:= libmms
  72. ifeq ($(ADK_PACKAGE_MPD_WITH_MMS),y)
  73. PKG_FDEPENDS+= libmms
  74. endif
  75. PKGFD_WITH_FFMPEG:= enable FFMPEG support
  76. PKGFS_WITH_FFMPEG:= libffmpeg
  77. PKGFB_WITH_FFMPEG:= ffmpeg
  78. ifeq ($(ADK_PACKAGE_MPD_WITH_FFMPEG),y)
  79. PKG_FDEPENDS+= libffmpeg
  80. endif
  81. PKGFD_WITH_SHOUT:= enable Shoutcast output support
  82. PKGFS_WITH_SHOUT:= libshout libmp3lame libvorbisenc
  83. PKGFB_WITH_SHOUT:= lame libvorbis libshout
  84. ifeq ($(ADK_PACKAGE_MPD_WITH_SHOUT),y)
  85. PKG_FDEPENDS+= libshout libmp3lame libvorbisenc
  86. endif
  87. PKGFD_WITH_CURL:= enable CURL support
  88. PKGFS_WITH_CURL:= libcurl
  89. PKGFB_WITH_CURL:= curl
  90. ifeq ($(ADK_PACKAGE_MPD_WITH_CURL),y)
  91. PKG_FDEPENDS+= libcurl
  92. endif
  93. PKGFD_WITH_SAMPLERATE:= enable samplerate support
  94. PKGFS_WITH_SAMPLERATE:= libsamplerate
  95. PKGFB_WITH_SAMPLERATE:= libsamplerate
  96. ifeq ($(ADK_PACKAGE_MPD_WITH_SAMPLERATE),y)
  97. PKG_FDEPENDS+= libsamplerate
  98. endif
  99. PKGFD_WITH_OPUS:= enable OPUS support
  100. PKGFS_WITH_OPUS:= libopus
  101. PKGFB_WITH_OPUS:= opus
  102. ifeq ($(ADK_PACKAGE_MPD_WITH_OPUS),y)
  103. PKG_FDEPENDS+= libopus
  104. endif
  105. PKGFD_WITH_PULSE:= enable PULSE support
  106. PKGFS_WITH_PULSE:= pulseaudio
  107. PKGFB_WITH_PULSE:= pulseaudio
  108. ifeq ($(ADK_PACKAGE_MPD_WITH_PULSE),y)
  109. PKG_FDEPENDS+= pulseaudio
  110. endif
  111. PKGFD_WITH_AVAHI:= enable AVAHI/zeroconf support
  112. PKGFS_WITH_AVAHI:= libavahi libdbus
  113. PKGFB_WITH_AVAHI:= avahi
  114. ifeq ($(ADK_PACKAGE_MPD_WITH_AVAHI),y)
  115. PKG_FDEPENDS+= libavahi
  116. endif
  117. PKGFD_WITH_HTTPD:= enable HTTP output
  118. include ${TOPDIR}/mk/package.mk
  119. $(eval $(call PKG_template,MPD,mpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_FDEPENDS},${PKG_DESCR},${PKG_SECTION}))
  120. TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE
  121. TARGET_CFLAGS+= -std=gnu99
  122. CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no
  123. CONFIGURE_ARGS+= --disable-jack \
  124. --disable-fifo \
  125. --disable-oss \
  126. --disable-bzip2 \
  127. --disable-libwrap \
  128. --disable-mpc \
  129. --disable-wavpack \
  130. --disable-modplug \
  131. --disable-sqlite \
  132. --disable-mpg123 \
  133. --disable-soundcloud \
  134. --enable-inotify
  135. ifneq (${ADK_PACKAGE_MPD_WITH_HTTPD},)
  136. CONFIGURE_ARGS+= --enable-httpd-output
  137. else
  138. CONFIGURE_ARGS+= --disable-httpd-output
  139. endif
  140. ifneq (${ADK_PACKAGE_MPD_WITH_AVAHI},)
  141. CONFIGURE_ARGS+= --with-zeroconf=avahi
  142. else
  143. CONFIGURE_ARGS+= --with-zeroconf=no
  144. endif
  145. ifneq (${ADK_PACKAGE_MPD_WITH_PULSE},)
  146. CONFIGURE_ARGS+= --enable-pulse
  147. else
  148. CONFIGURE_ARGS+= --disable-pulse
  149. endif
  150. ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},)
  151. CONFIGURE_ARGS+= --enable-alsa
  152. else
  153. CONFIGURE_ARGS+= --disable-alsa
  154. endif
  155. ifneq (${ADK_PACKAGE_MPD_WITH_AO},)
  156. CONFIGURE_ARGS+= --enable-ao
  157. else
  158. CONFIGURE_ARGS+= --disable-ao
  159. endif
  160. ifneq (${ADK_PACKAGE_MPD_WITH_MP3},)
  161. CONFIGURE_ARGS+= --enable-id3 --enable-mad
  162. else
  163. CONFIGURE_ARGS+= --disable-id3 --disable-mad
  164. endif
  165. ifneq (${ADK_PACKAGE_MPD_WITH_MP4},)
  166. CONFIGURE_ARGS+= --enable-aac
  167. else
  168. CONFIGURE_ARGS+= --disable-aac
  169. endif
  170. ifneq (${ADK_PACKAGE_MPD_WITH_OGG},)
  171. CONFIGURE_ARGS+= --enable-vorbis
  172. else
  173. CONFIGURE_ARGS+= --disable-vorbis
  174. endif
  175. ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},)
  176. CONFIGURE_ARGS+= \
  177. --disable-vorbis \
  178. --with-tremor \
  179. --with-tremor-includes=${STAGING_TARGET_DIR}/usr/include \
  180. --with-tremor-libraries=${STAGING_TARGET_DIR}/usr/lib
  181. endif
  182. ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},)
  183. CONFIGURE_ARGS+= --enable-flac
  184. else
  185. CONFIGURE_ARGS+= --disable-flac
  186. endif
  187. ifneq (${ADK_PACKAGE_MPD_WITH_WAV},)
  188. CONFIGURE_ARGS+= --enable-audiofile
  189. else
  190. CONFIGURE_ARGS+= --disable-audiofile
  191. endif
  192. ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},)
  193. CONFIGURE_ARGS+= --enable-shout \
  194. --enable-lame-encoder \
  195. --enable-vorbis-encoder
  196. else
  197. CONFIGURE_ARGS+= --disable-shout \
  198. --disable-lame-encoder \
  199. --disable-vorbis-encoder
  200. endif
  201. ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
  202. CONFIGURE_ARGS+= --enable-curl
  203. else
  204. CONFIGURE_ARGS+= --disable-curl
  205. endif
  206. ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
  207. CONFIGURE_ARGS+= --enable-mms
  208. else
  209. CONFIGURE_ARGS+= --disable-mms
  210. endif
  211. ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
  212. CONFIGURE_ARGS+= --enable-ffmpeg
  213. else
  214. CONFIGURE_ARGS+= --disable-ffmpeg
  215. endif
  216. ifneq (${ADK_PACKAGE_MPD_WITH_SAMPLERATE},)
  217. CONFIGURE_ARGS+= --enable-lsr
  218. else
  219. CONFIGURE_ARGS+= --disable-lsr
  220. endif
  221. ifneq (${ADK_PACKAGE_MPD_WITH_OPUS},)
  222. CONFIGURE_ARGS+= --enable-opus
  223. else
  224. CONFIGURE_ARGS+= --disable-opus
  225. endif
  226. mpd-install:
  227. ${INSTALL_DIR} ${IDIR_MPD}/usr/bin ${IDIR_MPD}/etc/mpd/playlists
  228. ${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
  229. ${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
  230. include ${TOPDIR}/mk/pkg-bottom.mk