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