1
0

Makefile 6.0 KB

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