change package tarball compression to xz whenever possible
[buildroot-gz.git] / package / mpd / mpd.mk
blobedcd945ef0976b28665d2c4c3afddc589d006900
1 ################################################################################
3 # mpd
5 ################################################################################
7 MPD_VERSION = 0.17.5
8 MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz
9 MPD_SITE = http://www.musicpd.org/download/mpd/stable
10 MPD_DEPENDENCIES = host-pkgconf libglib2
11 MPD_LICENSE = GPLv2
12 MPD_LICENSE_FILES = COPYING
14 # Some options need an explicit --disable or --enable
16 ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
17 MPD_DEPENDENCIES += alsa-lib
18 else
19 MPD_CONF_OPT += --disable-alsa
20 endif
22 ifeq ($(BR2_PACKAGE_MPD_AO),y)
23 MPD_DEPENDENCIES += libao
24 MPD_CONF_OPT += --enable-ao
25 endif
27 ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE),y)
28 MPD_DEPENDENCIES += audiofile
29 MPD_CONF_OPT += --enable-audiofile
30 endif
32 ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y)
33 MPD_DEPENDENCIES += pulseaudio
34 MPD_CONF_OPT += --enable-pulse
35 endif
37 ifeq ($(BR2_PACKAGE_MPD_BZIP2),y)
38 MPD_DEPENDENCIES += bzip2
39 MPD_CONF_OPT += --enable-bzip2
40 endif
42 ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
43 MPD_DEPENDENCIES += faad2
44 else
45 MPD_CONF_OPT += --disable-faad2
46 endif
48 ifeq ($(BR2_PACKAGE_MPD_FLAC),y)
49 MPD_DEPENDENCIES += flac
50 else
51 MPD_CONF_OPT += --without-flac --disable-oggflac
52 endif
54 ifeq ($(BR2_PACKAGE_MPD_CURL),y)
55 MPD_DEPENDENCIES += libcurl
56 else
57 MPD_CONF_OPT += --disable-curl
58 endif
60 ifeq ($(BR2_PACKAGE_MPD_LAME),y)
61 MPD_DEPENDENCIES += lame
62 else
63 MPD_CONF_OPT += --disable-lame-encoder
64 endif
66 ifeq ($(BR2_PACKAGE_MPD_LIBCUE),y)
67 MPD_DEPENDENCIES += libcue
68 else
69 MPD_CONF_OPT += --disable-cue
70 endif
72 ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y)
73 MPD_DEPENDENCIES += libsamplerate
74 else
75 MPD_CONF_OPT += --disable-lsr
76 endif
78 ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y)
79 MPD_DEPENDENCIES += libsndfile
80 else
81 MPD_CONF_OPT += --disable-sndfile
82 endif
84 ifeq ($(BR2_PACKAGE_MPD_VORBIS),y)
85 MPD_DEPENDENCIES += libvorbis
86 else
87 MPD_CONF_OPT += --disable-vorbis
88 endif
90 ifeq ($(BR2_PACKAGE_MPD_MPG123),y)
91 MPD_DEPENDENCIES += libid3tag mpg123
92 else
93 MPD_CONF_OPT += --disable-mpg123
94 endif
96 ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y)
97 MPD_DEPENDENCIES += musepack
98 else
99 MPD_CONF_OPT += --disable-mpc
100 endif
102 ifeq ($(BR2_PACKAGE_MPD_SQLITE),y)
103 MPD_DEPENDENCIES += sqlite
104 else
105 MPD_CONF_OPT += --disable-sqlite
106 endif
108 ifneq ($(BR2_PACKAGE_MPD_TCP),y)
109 MPD_CONF_OPT += --disable-tcp
110 endif
112 ifeq ($(BR2_PACKAGE_MPD_TREMOR),y)
113 MPD_DEPENDENCIES += tremor
114 MPD_CONF_OPT += --with-tremor
115 endif
117 ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y)
118 MPD_DEPENDENCIES += wavpack
119 else
120 MPD_CONF_OPT += --disable-wavpack
121 endif
123 ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y)
124 MPD_DEPENDENCIES += ffmpeg
125 MPD_CONF_OPT += --enable-ffmpeg
126 else
127 MPD_CONF_OPT += --disable-ffmpeg
128 endif
130 define MPD_INSTALL_EXTRA_FILES
131 @if [ ! -f $(TARGET_DIR)/etc/mpd.conf ]; then \
132 $(INSTALL) -D package/multimedia/mpd/mpd.conf \
133 $(TARGET_DIR)/etc/mpd.conf; \
135 $(INSTALL) -m 0755 -D package/multimedia/mpd/S95mpd \
136 $(TARGET_DIR)/etc/init.d/S95mpd
137 endef
139 MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES
141 $(eval $(autotools-package))