mpd.mk 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #############################################################
  2. #
  3. # mpd
  4. #
  5. #############################################################
  6. MPD_VERSION = 0.16.6
  7. MPD_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/musicpd
  8. MPD_AUTORECONF = YES
  9. MPD_DEPENDENCIES = host-pkg-config libglib2
  10. # Some options need an explicit --disable or --enable
  11. ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
  12. MPD_DEPENDENCIES += alsa-lib
  13. else
  14. MPD_CONF_OPT += --disable-alsa
  15. endif
  16. ifeq ($(BR2_PACKAGE_MPD_AO),y)
  17. MPD_DEPENDENCIES += libao
  18. MPD_CONF_OPT += --enable-ao
  19. endif
  20. ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y)
  21. MPD_DEPENDENCIES += pulseaudio
  22. MPD_CONF_OPT += --enable-pulse
  23. endif
  24. ifeq ($(BR2_PACKAGE_MPD_BZIP2),y)
  25. MPD_DEPENDENCIES += bzip2
  26. MPD_CONF_OPT += --enable-bzip2
  27. endif
  28. ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
  29. MPD_DEPENDENCIES += faad2
  30. else
  31. MPD_CONF_OPT += --disable-faad2
  32. endif
  33. ifeq ($(BR2_PACKAGE_MPD_FLAC),y)
  34. MPD_DEPENDENCIES += flac
  35. else
  36. MPD_CONF_OPT += --without-flac --disable-oggflac
  37. endif
  38. ifeq ($(BR2_PACKAGE_MPD_CURL),y)
  39. MPD_DEPENDENCIES += libcurl
  40. else
  41. MPD_CONF_OPT += --disable-curl
  42. endif
  43. ifeq ($(BR2_PACKAGE_MPD_LAME),y)
  44. MPD_DEPENDENCIES += lame
  45. else
  46. MPD_CONF_OPT += --disable-lame-encoder
  47. endif
  48. ifeq ($(BR2_PACKAGE_MPD_LIBCUE),y)
  49. MPD_DEPENDENCIES += libcue
  50. else
  51. MPD_CONF_OPT += --disable-cue
  52. endif
  53. ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y)
  54. MPD_DEPENDENCIES += libsamplerate
  55. else
  56. MPD_CONF_OPT += --disable-lsr
  57. endif
  58. ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y)
  59. MPD_DEPENDENCIES += libsndfile
  60. else
  61. MPD_CONF_OPT += --disable-sndfile
  62. endif
  63. ifeq ($(BR2_PACKAGE_MPD_VORBIS),y)
  64. MPD_DEPENDENCIES += libvorbis
  65. else
  66. MPD_CONF_OPT += --disable-vorbis
  67. endif
  68. ifeq ($(BR2_PACKAGE_MPD_MPG123),y)
  69. MPD_DEPENDENCIES += libid3tag mpg123
  70. else
  71. MPD_CONF_OPT += --disable-mpg123
  72. endif
  73. ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y)
  74. MPD_DEPENDENCIES += musepack
  75. else
  76. MPD_CONF_OPT += --disable-mpc
  77. endif
  78. ifeq ($(BR2_PACKAGE_MPD_SQLITE),y)
  79. MPD_DEPENDENCIES += sqlite
  80. else
  81. MPD_CONF_OPT += --disable-sqlite
  82. endif
  83. ifneq ($(BR2_PACKAGE_MPD_TCP),y)
  84. MPD_CONF_OPT += --disable-tcp
  85. endif
  86. ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
  87. MPD_DEPENDENCIES += tremor
  88. MPD_CONF_OPT += --with-tremor
  89. endif
  90. ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y)
  91. MPD_DEPENDENCIES += wavpack
  92. else
  93. MPD_CONF_OPT += --disable-wavpack
  94. endif
  95. ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y)
  96. MPD_DEPENDENCIES += ffmpeg
  97. MPD_CONF_OPT += --enable-ffmpeg
  98. else
  99. MPD_CONF_OPT += --disable-ffmpeg
  100. endif
  101. define MPD_INSTALL_EXTRA_FILES
  102. @if [ ! -f $(TARGET_DIR)/etc/mpd.conf ]; then \
  103. $(INSTALL) -D package/multimedia/mpd/mpd.conf \
  104. $(TARGET_DIR)/etc/mpd.conf; \
  105. fi
  106. $(INSTALL) -m 0755 -D package/multimedia/mpd/S95mpd \
  107. $(TARGET_DIR)/etc/init.d/S95mpd
  108. endef
  109. MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
  110. $(eval $(call AUTOTARGETS))