]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
up to 0.20.12
[packages/mpd.git] / mpd.spec
CommitLineData
02876c51 1# TODO:
c7dcdf50 2# - add logrotate
424f04d1
KK
3#
4# Conditional build:
5125f9d8 5%bcond_without mod # enable MOD support
d63dca03 6%bcond_without pulseaudio # disable PulseAudio support
ea3b33dc 7%bcond_without audiofile # Audiofile support (WAV and others)
9cf1eba3 8
c7dcdf50 9Summary: Music Player Daemon
31afabcf 10Summary(hu.UTF-8): Music Player Daemon
6ae29a87 11Summary(pl.UTF-8): Music Player Daemon - demon odtwarzający muzykę
c7dcdf50 12Name: mpd
71153d89 13Version: 0.20.12
27045b64 14Release: 1
dbce58e4 15License: GPL v2+
c7dcdf50 16Group: Applications/Multimedia
ad4050a4 17Source0: http://www.musicpd.org/download/mpd/0.20/%{name}-%{version}.tar.xz
71153d89 18# Source0-md5: e622d76feb2f4eb3ffaaf8aa99b4364b
31afabcf 19Source1: %{name}.conf
fb6389fb 20Source2: %{name}.init
9cf1eba3 21Source3: %{name}.sysconfig
be963cbe 22Source4: %{name}.tmpfiles
4bdc1a1d 23Patch0: %{name}-mpcsv8.patch
c7dcdf50 24URL: http://www.musicpd.org/
4351e719 25BuildRequires: OpenAL-devel
f756cffc 26BuildRequires: adplug-devel
3523369e 27BuildRequires: alsa-lib-devel >= 0.9.0
a8aa6145 28%{?with_audiofile:BuildRequires: audiofile-devel >= 0.3}
735ff9d7 29BuildRequires: autoconf >= 2.60
a8aa6145
JP
30BuildRequires: automake >= 1:1.11
31BuildRequires: avahi-devel
32BuildRequires: boost-devel >= 1.54
5125f9d8 33BuildRequires: bzip2-devel
a8aa6145
JP
34BuildRequires: curl-devel >= 7.18
35BuildRequires: dbus-devel
5125f9d8 36BuildRequires: doxygen
a8aa6145 37BuildRequires: expat-devel
158342a8 38BuildRequires: faad2-devel >= 2.6.1-5
24a381c6 39BuildRequires: ffmpeg-devel >= 0.8.0
a8aa6145
JP
40BuildRequires: flac-devel >= 1.2.0
41BuildRequires: fluidsynth-devel >= 1.1
296a7717 42BuildRequires: game-music-emu-devel
24a381c6 43BuildRequires: gcc >= 6:4.7
a8aa6145 44BuildRequires: glib2-devel >= 1:2.28.0
a8aa6145 45BuildRequires: jack-audio-connection-kit-devel >= 0.100
424f04d1 46BuildRequires: lame-libs-devel
c7dcdf50 47BuildRequires: libao-devel >= 0.8.3
5125f9d8 48BuildRequires: libcdio-devel
a8aa6145 49BuildRequires: libcdio-paranoia-devel
33e45e33 50BuildRequires: libcue-devel
387493e6 51BuildRequires: libicu-devel
c7dcdf50
AF
52BuildRequires: libid3tag-devel
53BuildRequires: libmad-devel
424f04d1 54%{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7}
a8aa6145 55BuildRequires: libmms-devel >= 0.4
5125f9d8 56BuildRequires: libmodplug-devel
a8aa6145 57BuildRequires: libmpdclient-devel >= 2.2
ad4050a4 58BuildRequires: libmpg123-devel
a8aa6145 59BuildRequires: libnfs-devel
c7dcdf50 60BuildRequires: libogg-devel
a8aa6145 61BuildRequires: libsamplerate-devel >= 0.1.3
38f95112 62BuildRequires: libshout-devel
fb2724cc 63BuildRequires: libsidplay2-devel >= 2.1.1-5
a8aa6145
JP
64BuildRequires: libsmbclient-devel >= 0.2
65BuildRequires: libsndfile-devel
66BuildRequires: libstdc++-devel >= 0.2
67BuildRequires: libupnp-devel
c7dcdf50 68BuildRequires: libvorbis-devel
387493e6 69BuildRequires: libwrap-devel
735ff9d7 70BuildRequires: musepack-devel
a8aa6145 71BuildRequires: opus-devel
3523369e 72BuildRequires: pkgconfig >= 1:0.9.0
a8aa6145 73%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16}
a8b30e82 74BuildRequires: rpmbuild(macros) >= 1.629-2
a8aa6145
JP
75BuildRequires: shine-devel >= 3.1
76BuildRequires: soxr-devel
ad4050a4 77BuildRequires: sqlite3-devel >= 3.7.3
a8aa6145 78BuildRequires: systemd-devel
4351e719 79BuildRequires: twolame-devel
5125f9d8
AF
80BuildRequires: wavpack-devel
81BuildRequires: wildmidi-devel
82BuildRequires: xmlto
f756cffc 83BuildRequires: yajl-devel >= 2.0
c7dcdf50 84BuildRequires: zlib-devel
a8aa6145 85BuildRequires: zziplib-devel >= 0.13
195b8128 86Requires(post,preun,postun): systemd-units >= 38
ad4050a4
JP
87Requires: alsa-lib >= 0.9.0
88%{?with_audiofile:Requires: audiofile >= 0.3}
89Requires: curl-libs >= 7.18
90Requires: faad2-libs >= 2.6.1-5
91Requires: ffmpeg-libs >= 0.8.0
92Requires: flac >= 1.2.0
93Requires: fluidsynth >= 1.1
94Requires: glib2 >= 1:2.28.0
95Requires: jack-audio-connection-kit-libs >= 0.100
96Requires: libao >= 0.8.3
97%{?with_mod:Requires: libmikmod >= 3.1.7}
98Requires: libmms >= 0.4
99Requires: libmpdclient >= 2.2
100Requires: libsamplerate >= 0.1.3
101Requires: libsidplay2 >= 2.1.1-5
102Requires: libsmbclient >= 0.2
103%{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16}
104Requires: shine >= 3.1
105Requires: sqlite3 >= 3.7.3
195b8128 106Requires: systemd-units >= 38
ad4050a4
JP
107Requires: yajl >= 2.0
108Requires: zziplib >= 0.13
31afabcf
ZU
109Provides: group(mpd)
110Provides: user(mpd)
c7dcdf50
AF
111BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
112
113%description
87d7b893
JB
114Music Player Daemon (MPD) allows remote access for playing music (MP3,
115Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
116MPD is designed for integrating a computer into a stereo system that
117provides control for music playback over a local network. It is also
118makes a great desktop music player, especially if you are a console
119junkie, like frontend options, or restart X often.
120
31afabcf
ZU
121%description -l hu.UTF-8
122Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
123(MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
124menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
125irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
126zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
127sűrűn indítják újra az X-et.
128
f7293765
JR
129%description -l pl.UTF-8
130Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
131muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
132zarządzania playlistami. MPD jest zaprojektowany do integrowania
133komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
134w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
135komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
136frontendów albo często restartujących X.
c7dcdf50 137
5412b34a
ER
138%package apidocs
139Summary: MPD API documentation
140Summary(pl.UTF-8): Dokumentacja API biblioteki API
141Group: Documentation
eec98461
ER
142%if "%{_rpmversion}" >= "5"
143BuildArch: noarch
144%endif
5412b34a
ER
145
146%description apidocs
147API and internal documentation for MPD library.
148
149%description apidocs -l pl.UTF-8
150Dokumentacja API biblioteki MPD.
151
152%package doc
153Summary: Documentation for Music Player Daemon (MPD)
154Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD)
155Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD)
156Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD)
157Group: Documentation
158
159%description doc
160Documentation for Music Player Daemon (MPD).
161
162%description doc -l fr.UTF-8
163Documentation pour Music Player Daemon (MPD).
164
165%description doc -l it.UTF-8
166Documentazione di Music Player Daemon (MPD).
167
168%description doc -l pl.UTF-8
169Dokumentacja do Music Player Daemon (MPD).
170
c7dcdf50 171%prep
99bf80d6 172%setup -q
362076bc 173%patch0 -p1
c7dcdf50
AF
174
175%build
735ff9d7
JP
176%{__aclocal} -I m4
177%{__autoconf}
178%{__autoheader}
179%{__automake}
3523369e 180# ac_cv_* hacks to avoid unwanted linking
296a7717 181GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
d9401207 182%configure \
3523369e
JB
183 ac_cv_lib_iconv_main=no \
184 ac_cv_lib_nsl_gethostbyname=no \
d63dca03 185 %{!?with_pulseaudio:--disable-pulse} \
5125f9d8 186 %{?with_mod:--enable-mikmod} \
f756cffc 187 --enable-adplug \
5125f9d8
AF
188 --enable-alsa \
189 --enable-ao \
356a7f8f 190 %{?with_audiofile:--enable-audiofile} \
5125f9d8 191 --enable-bzip2 \
a8aa6145 192 --enable-cdio-paranoia \
5125f9d8 193 --enable-curl \
a8aa6145 194 --enable-database \
5125f9d8 195 --enable-documentation \
a8aa6145
JP
196 --enable-dsd \
197 --enable-expat \
5125f9d8 198 --enable-ffmpeg \
a8aa6145
JP
199 --enable-fifo \
200 --enable-flac \
5125f9d8 201 --enable-fluidsynth \
296a7717 202 --enable-gme \
5125f9d8 203 --enable-httpd-output \
a8aa6145
JP
204 --enable-icu \
205 --enable-id3 \
206 --enable-inotify \
207 --enable-ipv6 \
5125f9d8
AF
208 --enable-iso9660 \
209 --enable-jack \
210 --enable-lame-encoder \
a8aa6145
JP
211 --enable-libmpdclient \
212 --enable-libwrap \
5125f9d8
AF
213 --enable-lsr \
214 --enable-mad \
a8aa6145 215 --enable-mikmod \
5125f9d8
AF
216 --enable-mms \
217 --enable-modplug \
a8aa6145
JP
218 --enable-mpc \
219 --enable-nfs \
4351e719 220 --enable-openal \
a8aa6145
JP
221 --enable-opus \
222 --enable-oss \
4351e719
JP
223 --enable-pipe-output \
224 --enable-recorder-output \
a8aa6145 225 --enable-sidplay \
37a1b5ba 226 --enable-shine-encoder \
5125f9d8 227 --enable-shout \
a8aa6145
JP
228 --enable-smbclient \
229 --enable-sndfile \
f756cffc 230 --enable-soundcloud \
a8aa6145 231 --enable-soxr \
5125f9d8 232 --enable-sqlite \
a8aa6145
JP
233 --enable-systemd-daemon \
234 --enable-tcp \
4351e719 235 --enable-twolame-encoder \
a8aa6145
JP
236 --enable-upnp \
237 --enable-un \
238 --enable-vorbis \
5125f9d8 239 --enable-vorbis-encoder \
4351e719 240 --enable-wave-encoder \
5125f9d8
AF
241 --enable-wavpack \
242 --enable-wildmidi \
a8aa6145 243 --enable-zlib \
4351e719 244 --enable-zzip \
5125f9d8 245 --with-zeroconf=avahi \
a8b30e82
AF
246 --without-tremor \
247 --with-systemdsystemunitdir=%{systemdunitdir}
c7dcdf50
AF
248%{__make}
249
250%install
251rm -rf $RPM_BUILD_ROOT
9cf1eba3 252install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
be963cbe 253 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
fb2724cc 254 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
c7dcdf50
AF
255
256%{__make} install \
257 DESTDIR=$RPM_BUILD_ROOT
fb44ab11 258
9cf1eba3
ER
259cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
260install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
261cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
387493e6 262cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
c7dcdf50 263
424f04d1 264touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
265touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
266touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 267touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
424f04d1 268
1ac45cec 269%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
5125f9d8 270
c7dcdf50
AF
271%clean
272rm -rf $RPM_BUILD_ROOT
273
31afabcf
ZU
274%pre
275%groupadd -g 204 mpd
fb2724cc 276%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
31afabcf 277
fb6389fb 278%post
4351e719 279for f in mpd.log; do
424f04d1
KK
280 if [ ! -f /var/log/%{name}/$f ]; then
281 touch /var/log/%{name}/$f
282 chown mpd:mpd /var/log/%{name}/$f
283 chmod 644 /var/log/%{name}/$f
284 fi
285done
fb6389fb 286/sbin/chkconfig --add mpd
a8aa6145 287%systemd_post %{name}.service %{name}.socket
fb6389fb
ZU
288
289%preun
290if [ "$1" = "0" ]; then
291 %service mpd stop
99bf80d6 292 /sbin/chkconfig --del mpd
fb6389fb 293fi
a8aa6145 294%systemd_preun %{name}.service %{name}.socket
fb6389fb 295
31afabcf
ZU
296%postun
297if [ "$1" = "0" ]; then
298 %userremove mpd
299 %groupremove mpd
300fi
a8b30e82
AF
301%systemd_reload
302
303%triggerpostun -- %{name} < 0.16.6-1
304%systemd_trigger %{name}.service
31afabcf 305
c7dcdf50
AF
306%files
307%defattr(644,root,root,755)
27045b64 308%doc AUTHORS NEWS README.md doc/mpdconf.example
c7dcdf50 309%attr(755,root,root) %{_bindir}/*
fb44ab11
JB
310%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
311%attr(754,root,root) /etc/rc.d/init.d/mpd
9cf1eba3 312%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
fb2724cc 313%{systemdtmpfilesdir}/%{name}.conf
a8b30e82 314%{systemdunitdir}/mpd.service
a8aa6145 315%{systemdunitdir}/mpd.socket
424f04d1
KK
316%dir %attr(770,root,mpd) /var/lib/%{name}
317%dir %attr(770,root,mpd) /var/lib/%{name}/playlists
318%dir %attr(751,root,root) /var/log/%{name}
319%dir %attr(770,root,mpd) /var/run/%{name}
320%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
4351e719
JP
321%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
322%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
424f04d1 323%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
c7dcdf50 324%{_mandir}/man1/mpd.1*
80d0dd8f 325%{_mandir}/man5/mpd.conf.5*
5412b34a
ER
326
327%files doc
328%defattr(644,root,root,755)
329%doc doc/user/*
330
331%files apidocs
332%defattr(644,root,root,755)
333%doc doc/api doc/developer doc/protocol
This page took 0.071604 seconds and 4 git commands to generate.