Makefile 6.5 KB

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