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