Makefile 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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.10
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 046f23f63ad9aa4af38159754f813fc7
  8. PKG_DESCR:= music player daemon
  9. PKG_SECTION:= multimedia
  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_NEED_CXX:= 1
  16. PKG_FLAVOURS_MPD:= WITH_ALSA WITH_AO WITH_MP3 WITH_MP4 WITH_TREMOR
  17. PKG_FLAVOURS_MPD+= WITH_OGG WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG
  18. PKG_FLAVOURS_MPD+= WITH_SHOUT WITH_CURL WITH_SAMPLERATE WITH_HTTPD
  19. PKG_FLAVOURS_MPD+= WITH_OPUS WITH_PULSE WITH_AVAHI
  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 libmp3lame 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. PKGFD_WITH_OPUS:= enable OPUS support
  99. PKGFS_WITH_OPUS:= libopus
  100. PKGFB_WITH_OPUS:= opus
  101. ifeq ($(ADK_PACKAGE_MPD_WITH_OPUS),y)
  102. PKG_FDEPENDS+= libopus
  103. endif
  104. PKGFD_WITH_PULSE:= enable PULSE support
  105. PKGFS_WITH_PULSE:= pulseaudio
  106. PKGFB_WITH_PULSE:= pulseaudio
  107. ifeq ($(ADK_PACKAGE_MPD_WITH_PULSE),y)
  108. PKG_FDEPENDS+= pulseaudio
  109. endif
  110. PKGFD_WITH_AVAHI:= enable AVAHI/zeroconf support
  111. PKGFS_WITH_AVAHI:= libavahi libdbus
  112. PKGFB_WITH_AVAHI:= avahi
  113. ifeq ($(ADK_PACKAGE_MPD_WITH_AVAHI),y)
  114. PKG_FDEPENDS+= libavahi
  115. endif
  116. PKGFD_WITH_HTTPD:= enable HTTP output
  117. include ${TOPDIR}/mk/package.mk
  118. $(eval $(call PKG_template,MPD,mpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_FDEPENDS},${PKG_DESCR},${PKG_SECTION}))
  119. TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE
  120. TARGET_CFLAGS+= -std=gnu99
  121. CONFIGURE_ENV+= ac_cv_lib_nsl_gethostbyname=no
  122. CONFIGURE_ARGS+= --disable-jack \
  123. --disable-fifo \
  124. --disable-oss \
  125. --disable-bzip2 \
  126. --disable-libwrap \
  127. --disable-mpc \
  128. --disable-wavpack \
  129. --disable-modplug \
  130. --disable-sqlite \
  131. --disable-mpg123 \
  132. --disable-soundcloud \
  133. --enable-inotify
  134. ifneq (${ADK_PACKAGE_MPD_WITH_HTTPD},)
  135. CONFIGURE_ARGS+= --enable-httpd-output
  136. else
  137. CONFIGURE_ARGS+= --disable-httpd-output
  138. endif
  139. ifneq (${ADK_PACKAGE_MPD_WITH_AVAHI},)
  140. CONFIGURE_ARGS+= --with-zeroconf=avahi
  141. else
  142. CONFIGURE_ARGS+= --with-zeroconf=no
  143. endif
  144. ifneq (${ADK_PACKAGE_MPD_WITH_PULSE},)
  145. CONFIGURE_ARGS+= --enable-pulse
  146. else
  147. CONFIGURE_ARGS+= --disable-pulse
  148. endif
  149. ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},)
  150. CONFIGURE_ARGS+= --enable-alsa
  151. else
  152. CONFIGURE_ARGS+= --disable-alsa
  153. endif
  154. ifneq (${ADK_PACKAGE_MPD_WITH_AO},)
  155. CONFIGURE_ARGS+= --enable-ao
  156. else
  157. CONFIGURE_ARGS+= --disable-ao
  158. endif
  159. ifneq (${ADK_PACKAGE_MPD_WITH_MP3},)
  160. CONFIGURE_ARGS+= --enable-id3 --enable-mad
  161. else
  162. CONFIGURE_ARGS+= --disable-id3 --disable-mad
  163. endif
  164. ifneq (${ADK_PACKAGE_MPD_WITH_MP4},)
  165. CONFIGURE_ARGS+= --enable-aac
  166. else
  167. CONFIGURE_ARGS+= --disable-aac
  168. endif
  169. ifneq (${ADK_PACKAGE_MPD_WITH_OGG},)
  170. CONFIGURE_ARGS+= --enable-vorbis
  171. else
  172. CONFIGURE_ARGS+= --disable-vorbis
  173. endif
  174. ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},)
  175. CONFIGURE_ARGS+= \
  176. --disable-vorbis \
  177. --with-tremor \
  178. --with-tremor-includes=${STAGING_TARGET_DIR}/usr/include \
  179. --with-tremor-libraries=${STAGING_TARGET_DIR}/usr/lib
  180. endif
  181. ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},)
  182. CONFIGURE_ARGS+= --enable-flac
  183. else
  184. CONFIGURE_ARGS+= --disable-flac
  185. endif
  186. ifneq (${ADK_PACKAGE_MPD_WITH_WAV},)
  187. CONFIGURE_ARGS+= --enable-audiofile
  188. else
  189. CONFIGURE_ARGS+= --disable-audiofile
  190. endif
  191. ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},)
  192. CONFIGURE_ARGS+= --enable-shout \
  193. --enable-lame-encoder \
  194. --enable-vorbis-encoder
  195. else
  196. CONFIGURE_ARGS+= --disable-shout \
  197. --disable-lame-encoder \
  198. --disable-vorbis-encoder
  199. endif
  200. ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
  201. CONFIGURE_ARGS+= --enable-curl
  202. else
  203. CONFIGURE_ARGS+= --disable-curl
  204. endif
  205. ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
  206. CONFIGURE_ARGS+= --enable-mms
  207. else
  208. CONFIGURE_ARGS+= --disable-mms
  209. endif
  210. ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
  211. CONFIGURE_ARGS+= --enable-ffmpeg
  212. else
  213. CONFIGURE_ARGS+= --disable-ffmpeg
  214. endif
  215. ifneq (${ADK_PACKAGE_MPD_WITH_SAMPLERATE},)
  216. CONFIGURE_ARGS+= --enable-lsr
  217. else
  218. CONFIGURE_ARGS+= --disable-lsr
  219. endif
  220. ifneq (${ADK_PACKAGE_MPD_WITH_OPUS},)
  221. CONFIGURE_ARGS+= --enable-opus
  222. else
  223. CONFIGURE_ARGS+= --disable-opus
  224. endif
  225. mpd-install:
  226. ${INSTALL_DIR} ${IDIR_MPD}/usr/bin ${IDIR_MPD}/etc/mpd/playlists
  227. ${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
  228. ${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
  229. include ${TOPDIR}/mk/pkg-bottom.mk