]> git.pld-linux.org Git - packages/mpd.git/blame_incremental - mpd.spec
up to 0.23.9
[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.23.9
13Release: 1
14License: GPL v2+
15Group: Applications/Multimedia
16Source0: https://www.musicpd.org/download/mpd/0.23/%{name}-%{version}.tar.xz
17# Source0-md5: aeb8382c5d7795ed8dfd02fe14f81f06
18Source1: %{name}.conf
19Source2: %{name}.init
20Source3: %{name}.sysconfig
21Source4: %{name}.tmpfiles
22URL: http://www.musicpd.org/
23BuildRequires: OpenAL-devel
24BuildRequires: adplug-devel
25BuildRequires: alsa-lib-devel >= 0.9.0
26%{?with_audiofile:BuildRequires: audiofile-devel >= 0.3}
27BuildRequires: avahi-devel
28BuildRequires: boost-devel >= 1.58
29BuildRequires: bzip2-devel
30BuildRequires: curl-devel >= 7.33
31BuildRequires: dbus-devel
32BuildRequires: doxygen
33BuildRequires: expat-devel
34BuildRequires: faad2-devel >= 2.6.1-5
35BuildRequires: ffmpeg-devel >= 2.4.0
36BuildRequires: flac-devel >= 1.2.0
37BuildRequires: fluidsynth-devel >= 1.1
38BuildRequires: game-music-emu-devel
39BuildRequires: gcc >= 6:8
40BuildRequires: glib2-devel >= 1:2.28.0
41BuildRequires: jack-audio-connection-kit-devel >= 0.100
42BuildRequires: lame-libs-devel
43BuildRequires: libao-devel >= 0.8.3
44BuildRequires: libcdio-devel
45BuildRequires: libcdio-paranoia-devel >= 0.93
46BuildRequires: libchromaprint-devel
47BuildRequires: libfmt-devel
48BuildRequires: libicu-devel >= 50
49BuildRequires: libid3tag-devel
50BuildRequires: libmad-devel
51%{?with_mod:BuildRequires: libmikmod-devel >= 3.2}
52BuildRequires: libmms-devel >= 0.4
53BuildRequires: libmodplug-devel
54BuildRequires: libmpdclient-devel >= 2.11
55BuildRequires: libmpg123-devel >= 1.28.0
56BuildRequires: libnfs-devel >= 1.11
57BuildRequires: libogg-devel
58BuildRequires: libopenmpt-devel >= 0.5
59BuildRequires: libsamplerate-devel >= 0.1.3
60BuildRequires: libshout-devel >= 2.4.6
61BuildRequires: libsidplayfp-devel >= 1.8
62BuildRequires: libsmbclient-devel >= 0.2
63BuildRequires: libsndfile-devel
64BuildRequires: libstdc++-devel
65BuildRequires: libupnp-devel >= 1.8
66BuildRequires: liburing-devel
67BuildRequires: libvorbis-devel
68BuildRequires: meson >= 0.56.0
69BuildRequires: musepack-devel
70BuildRequires: ninja
71BuildRequires: opus-devel
72BuildRequires: pcre-devel
73BuildRequires: pipewire-devel >= 0.3
74BuildRequires: pkgconfig >= 1:0.9.0
75%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16}
76BuildRequires: rpm-build >= 4.6
77BuildRequires: rpmbuild(macros) >= 2.011
78BuildRequires: shine-devel >= 3.1
79BuildRequires: soxr-devel
80BuildRequires: sphinx-pdg
81BuildRequires: sqlite3-devel >= 3.7.3
82BuildRequires: systemd-devel
83BuildRequires: tar >= 1:1.22
84BuildRequires: twolame-devel
85BuildRequires: wavpack-devel
86BuildRequires: wildmidi-devel
87BuildRequires: xmlto
88BuildRequires: xz
89BuildRequires: yajl-devel >= 2.0
90BuildRequires: zlib-devel
91BuildRequires: zziplib-devel >= 0.13
92Requires(post,preun,postun): systemd-units >= 1:250.1
93Requires: alsa-lib >= 0.9.0
94%{?with_audiofile:Requires: audiofile >= 0.3}
95Requires: curl-libs >= 7.33
96Requires: faad2-libs >= 2.6.1-5
97Requires: ffmpeg-libs >= 2.4.0
98Requires: flac >= 1.2.0
99Requires: fluidsynth >= 1.1
100Requires: glib2 >= 1:2.28.0
101Requires: jack-audio-connection-kit-libs >= 0.100
102Requires: libao >= 0.8.3
103Requires: libcdio-paranoia >= 0.93
104Requires: libicu >= 50
105%{?with_mod:Requires: libmikmod >= 3.2}
106Requires: libmms >= 0.4
107Requires: libmpdclient >= 2.11
108Requires: libmpg123 >= 1.28.0
109Requires: libnfs >= 1.11
110Requires: libopenmpt >= 0.5
111Requires: libsamplerate >= 0.1.3
112Requires: libshout >= 2.4.6
113Requires: libsidplayfp >= 1.8
114Requires: libsmbclient >= 0.2
115Requires: libupnp >= 1.8
116Requires: pipewire-libs >= 0.3
117%{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16}
118Requires: shine >= 3.1
119Requires: sqlite3 >= 3.7.3
120Requires: systemd-units >= 1:250.1
121Requires: yajl >= 2.0
122Requires: zziplib >= 0.13
123Suggests: %{name}-icons
124Provides: group(mpd)
125Provides: user(mpd)
126BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
127
128%description
129Music Player Daemon (MPD) allows remote access for playing music (MP3,
130Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
131MPD is designed for integrating a computer into a stereo system that
132provides control for music playback over a local network. It is also
133makes a great desktop music player, especially if you are a console
134junkie, like frontend options, or restart X often.
135
136%description -l hu.UTF-8
137Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
138(MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
139menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
140irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
141zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
142sűrűn indítják újra az X-et.
143
144%description -l pl.UTF-8
145Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
146muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
147zarządzania playlistami. MPD jest zaprojektowany do integrowania
148komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
149w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
150komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
151frontendów albo często restartujących X.
152
153%package doc
154Summary: Documentation for Music Player Daemon (MPD)
155Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD)
156Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD)
157Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD)
158Group: Documentation
159Obsoletes: mpd-apidocs < 0.21
160
161%description doc
162Documentation for Music Player Daemon (MPD).
163
164%description doc -l fr.UTF-8
165Documentation pour Music Player Daemon (MPD).
166
167%description doc -l it.UTF-8
168Documentazione di Music Player Daemon (MPD).
169
170%description doc -l pl.UTF-8
171Dokumentacja do Music Player Daemon (MPD).
172
173%package icons
174Summary: Icon files for Music Player Daemon (MPD)
175Summary(pl.UTF-8): Pliki ikon dla Music Player Daemon (MPD)
176Group: Applications
177Requires(post,postun): gtk-update-icon-cache
178Requires: hicolor-icon-theme
179BuildArch: noarch
180
181%description icons
182Documentation for Music Player Daemon (MPD).
183
184%description icons -l pl.UTF-8
185Pliki ikon dla Music Player Daemon (MPD).
186
187%prep
188%setup -q
189
190%build
191%meson build \
192 -Dpulse=%{?with_pulseaudio:enabled}%{!?with_pulseaudio:disabled} \
193 -Dmikmod=%{?with_mod:enabled}%{!?with_mod:disabled} \
194 -Dadplug=enabled \
195 -Dalsa=enabled \
196 -Dao=enabled \
197 -Daudiofile=%{?with_audiofile:enabled}%{!?with_audiofile:disabled} \
198 -Dbzip2=enabled \
199 -Dcdio_paranoia=enabled \
200 -Dcurl=enabled \
201 -Ddatabase=true \
202 -Ddocumentation=enabled \
203 -Ddsd=true \
204 -Dexpat=enabled \
205 -Dffmpeg=enabled \
206 -Dfifo=true \
207 -Dflac=enabled \
208 -Dfluidsynth=enabled \
209 -Dgme=enabled \
210 -Dhttpd=true \
211 -Dicu=enabled \
212 -Did3tag=enabled \
213 -Dinotify=true \
214 -Dio_uring=enabled \
215 -Dipv6=enabled \
216 -Diso9660=enabled \
217 -Djack=enabled \
218 -Dlame=enabled \
219 -Dlibmpdclient=enabled \
220 -Dmad=enabled \
221 -Dmikmod=enabled \
222 -Dmms=enabled \
223 -Dmodplug=enabled \
224 -Dmpcdec=disabled \
225 -Dnfs=enabled \
226 -Dopenal=enabled \
227 -Dopus=enabled \
228 -Doss=enabled \
229 -Dpipe=true \
230 -Drecorder=true \
231 -Dsidplay=enabled \
232 -Dshine=enabled \
233 -Dshout=enabled \
234 -Dsmbclient=enabled \
235 -Dsndfile=enabled \
236 -Dsoundcloud=enabled \
237 -Dsoxr=enabled \
238 -Dsqlite=enabled \
239 -Ddaemon=true \
240 -Dsystemd=enabled \
241 -Dtcp=true \
242 -Dtwolame=enabled \
243 -Dupnp=pupnp \
244 -Dvorbis=enabled \
245 -Dvorbisenc=enabled \
246 -Dwave_encoder=true \
247 -Dwavpack=enabled \
248 -Dwildmidi=enabled \
249 -Dzlib=enabled \
250 -Dzzip=enabled \
251 -Dzeroconf=avahi \
252 -Dsystemd_system_unit_dir=%{systemdunitdir} \
253 -Dsystemd_user_unit_dir=%{systemduserunitdir}
254%ninja_build -C build
255
256%install
257rm -rf $RPM_BUILD_ROOT
258install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
259 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
260 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
261
262%ninja_install -C build
263
264cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
265install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
266cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
267cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
268
269touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
270touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
271touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
272touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
273
274%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
275
276%clean
277rm -rf $RPM_BUILD_ROOT
278
279%pre
280%groupadd -g 204 mpd
281%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
282
283%post
284for f in mpd.log; do
285 if [ ! -f /var/log/%{name}/$f ]; then
286 touch /var/log/%{name}/$f
287 chown mpd:mpd /var/log/%{name}/$f
288 chmod 644 /var/log/%{name}/$f
289 fi
290done
291/sbin/chkconfig --add mpd
292%systemd_post %{name}.service %{name}.socket
293%systemd_user_post %{name}.service %{name}.socket
294
295%post icons
296%update_icon_cache hicolor
297
298%preun
299if [ "$1" = "0" ]; then
300 %service mpd stop
301 /sbin/chkconfig --del mpd
302fi
303%systemd_preun %{name}.service %{name}.socket
304%systemd_user_preun %{name}.service %{name}.socket
305
306%postun
307if [ "$1" = "0" ]; then
308 %userremove mpd
309 %groupremove mpd
310fi
311%systemd_reload
312
313%postun icons
314%update_icon_cache hicolor
315
316%triggerpostun -- %{name} < 0.16.6-1
317%systemd_trigger %{name}.service
318
319%files
320%defattr(644,root,root,755)
321%doc AUTHORS NEWS README.md doc/mpdconf.example
322%attr(755,root,root) %{_bindir}/*
323%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
324%attr(754,root,root) /etc/rc.d/init.d/mpd
325%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
326%{systemdtmpfilesdir}/%{name}.conf
327%{systemdunitdir}/mpd.service
328%{systemdunitdir}/mpd.socket
329%{systemduserunitdir}/mpd.service
330%{systemduserunitdir}/mpd.socket
331%dir %attr(770,root,mpd) /var/lib/%{name}
332%dir %attr(770,root,mpd) /var/lib/%{name}/playlists
333%dir %attr(751,root,root) /var/log/%{name}
334%dir %attr(770,root,mpd) /var/run/%{name}
335%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
336%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
337%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
338%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
339%{_mandir}/man1/mpd.1*
340%{_mandir}/man5/mpd.conf.5*
341
342%files doc
343%defattr(644,root,root,755)
344%doc build/doc/html
345
346%files icons
347%defattr(644,root,root,755)
348%{_iconsdir}/hicolor/scalable/apps/mpd.svg
This page took 0.048266 seconds and 4 git commands to generate.