Makefile 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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 ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= mpd
  5. PKG_VERSION:= 0.19.7
  6. PKG_RELEASE:= 2
  7. PKG_HASH:= 16d96332ec09d58ae2b914cfa509862e5f5b854dd52fdd6bda7336d66e888278
  8. PKG_DESCR:= music player daemon
  9. PKG_SECTION:= mm/audio
  10. PKG_DEPENDS:= glib libstdcxx libmpdclient librt boost
  11. PKG_FDEPENDS:= glib libstdcxx libmpdclient librt
  12. PKG_BUILDDEP:= glib libmpdclient boost
  13. PKG_URL:= http://www.musicpd.org/
  14. PKG_SITES:= http://www.musicpd.org/download/mpd/0.19/
  15. PKG_BUILDDEP_UCLIBC:= libiconv-tiny
  16. PKG_BUILDDEP_UCLIBC_NG:=libiconv-tiny
  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_SNDFILE 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_SNDFILE:= enable sndfile support
  106. PKGFS_WITH_SNDFILE:= libsndfile
  107. PKGFB_WITH_SNDFILE:= libsndfile
  108. ifeq ($(ADK_PACKAGE_MPD_WITH_SNDFILE),y)
  109. PKG_FDEPENDS+= libsndfile
  110. endif
  111. PKGFD_WITH_PULSE:= enable pulse support
  112. PKGFS_WITH_PULSE:= pulseaudio
  113. PKGFB_WITH_PULSE:= pulseaudio
  114. ifeq ($(ADK_PACKAGE_MPD_WITH_PULSE),y)
  115. PKG_FDEPENDS+= pulseaudio
  116. endif
  117. PKGFD_WITH_AVAHI:= enable avahi/zeroconf support
  118. PKGFS_WITH_AVAHI:= libavahi libdbus
  119. PKGFB_WITH_AVAHI:= avahi
  120. ifeq ($(ADK_PACKAGE_MPD_WITH_AVAHI),y)
  121. PKG_FDEPENDS+= libavahi
  122. endif
  123. PKGFD_WITH_HTTPD:= enable http output
  124. include ${ADK_TOPDIR}/mk/package.mk
  125. $(eval $(call PKG_template,MPD,mpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_FDEPENDS},${PKG_DESCR},${PKG_SECTION}))
  126. TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE
  127. TARGET_CFLAGS+= -std=gnu99
  128. CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no
  129. CONFIGURE_ARGS+= --disable-jack \
  130. --disable-fifo \
  131. --disable-oss \
  132. --disable-icu \
  133. --disable-bzip2 \
  134. --disable-libwrap \
  135. --disable-smbclient \
  136. --disable-mpc \
  137. --disable-wavpack \
  138. --disable-modplug \
  139. --disable-sqlite \
  140. --disable-mpg123 \
  141. --disable-soundcloud \
  142. --enable-inotify
  143. ifneq (${ADK_PACKAGE_MPD_WITH_SNDFILE},)
  144. CONFIGURE_ARGS+= --enable-sndfile
  145. else
  146. CONFIGURE_ARGS+= --disable-sndfile
  147. endif
  148. ifneq (${ADK_PACKAGE_MPD_WITH_HTTPD},)
  149. CONFIGURE_ARGS+= --enable-httpd-output
  150. else
  151. CONFIGURE_ARGS+= --disable-httpd-output
  152. endif
  153. ifneq (${ADK_PACKAGE_MPD_WITH_AVAHI},)
  154. CONFIGURE_ARGS+= --with-zeroconf=avahi
  155. else
  156. CONFIGURE_ARGS+= --with-zeroconf=no
  157. endif
  158. ifneq (${ADK_PACKAGE_MPD_WITH_PULSE},)
  159. CONFIGURE_ARGS+= --enable-pulse
  160. else
  161. CONFIGURE_ARGS+= --disable-pulse
  162. endif
  163. ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},)
  164. CONFIGURE_ARGS+= --enable-alsa
  165. else
  166. CONFIGURE_ARGS+= --disable-alsa
  167. endif
  168. ifneq (${ADK_PACKAGE_MPD_WITH_AO},)
  169. CONFIGURE_ARGS+= --enable-ao
  170. else
  171. CONFIGURE_ARGS+= --disable-ao
  172. endif
  173. ifneq (${ADK_PACKAGE_MPD_WITH_MP3},)
  174. CONFIGURE_ARGS+= --enable-id3 --enable-mad
  175. else
  176. CONFIGURE_ARGS+= --disable-id3 --disable-mad
  177. endif
  178. ifneq (${ADK_PACKAGE_MPD_WITH_MP4},)
  179. CONFIGURE_ARGS+= --enable-aac
  180. else
  181. CONFIGURE_ARGS+= --disable-aac
  182. endif
  183. ifneq (${ADK_PACKAGE_MPD_WITH_OGG},)
  184. CONFIGURE_ARGS+= --enable-vorbis
  185. else
  186. CONFIGURE_ARGS+= --disable-vorbis
  187. endif
  188. ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},)
  189. CONFIGURE_ARGS+= \
  190. --disable-vorbis \
  191. --with-tremor \
  192. --with-tremor-includes=${STAGING_TARGET_DIR}/usr/include \
  193. --with-tremor-libraries=${STAGING_TARGET_DIR}/usr/lib
  194. endif
  195. ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},)
  196. CONFIGURE_ARGS+= --enable-flac
  197. else
  198. CONFIGURE_ARGS+= --disable-flac
  199. endif
  200. ifneq (${ADK_PACKAGE_MPD_WITH_WAV},)
  201. CONFIGURE_ARGS+= --enable-audiofile
  202. else
  203. CONFIGURE_ARGS+= --disable-audiofile
  204. endif
  205. ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},)
  206. CONFIGURE_ARGS+= --enable-shout \
  207. --enable-lame-encoder \
  208. --enable-vorbis-encoder
  209. else
  210. CONFIGURE_ARGS+= --disable-shout \
  211. --disable-lame-encoder \
  212. --disable-vorbis-encoder
  213. endif
  214. ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
  215. CONFIGURE_ARGS+= --enable-curl
  216. else
  217. CONFIGURE_ARGS+= --disable-curl
  218. endif
  219. ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
  220. CONFIGURE_ARGS+= --enable-mms
  221. else
  222. CONFIGURE_ARGS+= --disable-mms
  223. endif
  224. ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
  225. CONFIGURE_ARGS+= --enable-ffmpeg
  226. else
  227. CONFIGURE_ARGS+= --disable-ffmpeg
  228. endif
  229. ifneq (${ADK_PACKAGE_MPD_WITH_SAMPLERATE},)
  230. CONFIGURE_ARGS+= --enable-lsr
  231. else
  232. CONFIGURE_ARGS+= --disable-lsr
  233. endif
  234. ifneq (${ADK_PACKAGE_MPD_WITH_OPUS},)
  235. CONFIGURE_ARGS+= --enable-opus
  236. else
  237. CONFIGURE_ARGS+= --disable-opus
  238. endif
  239. mpd-install:
  240. ${INSTALL_DIR} ${IDIR_MPD}/etc
  241. ${INSTALL_DIR} ${IDIR_MPD}/usr/bin
  242. ${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
  243. ${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
  244. include ${ADK_TOPDIR}/mk/pkg-bottom.mk