]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
up to 0.23.3
[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
22b503e8 12Version: 0.23.3
dcb956bb 13Release: 1
dbce58e4 14License: GPL v2+
c7dcdf50 15Group: Applications/Multimedia
a1df62ee 16Source0: https://www.musicpd.org/download/mpd/0.23/%{name}-%{version}.tar.xz
22b503e8 17# Source0-md5: c2ae9525d2cb9cc2d2be555c10133f53
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
4f727bb7 30BuildRequires: curl-devel >= 7.33
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
296a7717 38BuildRequires: game-music-emu-devel
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
38f95112 60BuildRequires: libshout-devel
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}
2605800f 76BuildRequires: rpmbuild(macros) >= 1.736
a8aa6145
JP
77BuildRequires: shine-devel >= 3.1
78BuildRequires: soxr-devel
5ce9dcc9 79BuildRequires: sphinx-pdg
ad4050a4 80BuildRequires: sqlite3-devel >= 3.7.3
a8aa6145 81BuildRequires: systemd-devel
00831d71 82BuildRequires: tar >= 1:1.22
4351e719 83BuildRequires: twolame-devel
5125f9d8
AF
84BuildRequires: wavpack-devel
85BuildRequires: wildmidi-devel
86BuildRequires: xmlto
00831d71 87BuildRequires: xz
f756cffc 88BuildRequires: yajl-devel >= 2.0
c7dcdf50 89BuildRequires: zlib-devel
a8aa6145 90BuildRequires: zziplib-devel >= 0.13
6ba39ac6 91Requires(post,postun): gtk-update-icon-cache
195b8128 92Requires(post,preun,postun): systemd-units >= 38
ad4050a4
JP
93Requires: alsa-lib >= 0.9.0
94%{?with_audiofile:Requires: audiofile >= 0.3}
4f727bb7 95Requires: curl-libs >= 7.33
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
100Requires: glib2 >= 1:2.28.0
6ba39ac6 101Requires: hicolor-icon-theme
ad4050a4
JP
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
4f727bb7 113Requires: libsidplayfp >= 1.8
ad4050a4 114Requires: libsmbclient >= 0.2
4f727bb7 115Requires: libupnp >= 1.8
a1df62ee 116Requires: pipewire-libs >= 0.3
ad4050a4
JP
117%{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16}
118Requires: shine >= 3.1
119Requires: sqlite3 >= 3.7.3
195b8128 120Requires: systemd-units >= 38
ad4050a4
JP
121Requires: yajl >= 2.0
122Requires: zziplib >= 0.13
31afabcf
ZU
123Provides: group(mpd)
124Provides: user(mpd)
c7dcdf50
AF
125BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
126
127%description
87d7b893
JB
128Music Player Daemon (MPD) allows remote access for playing music (MP3,
129Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
130MPD is designed for integrating a computer into a stereo system that
131provides control for music playback over a local network. It is also
132makes a great desktop music player, especially if you are a console
133junkie, like frontend options, or restart X often.
134
31afabcf
ZU
135%description -l hu.UTF-8
136Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
137(MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
138menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
139irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
140zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
141sűrűn indítják újra az X-et.
142
f7293765
JR
143%description -l pl.UTF-8
144Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
145muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
146zarządzania playlistami. MPD jest zaprojektowany do integrowania
147komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
148w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
149komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
150frontendów albo często restartujących X.
c7dcdf50 151
5412b34a
ER
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
5ce9dcc9 158Obsoletes: mpd-apidocs < 0.21
5412b34a
ER
159
160%description doc
161Documentation for Music Player Daemon (MPD).
162
163%description doc -l fr.UTF-8
164Documentation pour Music Player Daemon (MPD).
165
166%description doc -l it.UTF-8
167Documentazione di Music Player Daemon (MPD).
168
169%description doc -l pl.UTF-8
170Dokumentacja do Music Player Daemon (MPD).
171
c7dcdf50 172%prep
99bf80d6 173%setup -q
c7dcdf50
AF
174
175%build
5ce9dcc9
JP
176%meson build \
177 -Dpulse=%{?with_pulseaudio:enabled}%{!?with_pulseaudio:disabled} \
178 -Dmikmod=%{?with_mod:enabled}%{!?with_mod:disabled} \
179 -Dadplug=enabled \
180 -Dalsa=enabled \
181 -Dao=enabled \
182 -Daudiofile=%{?with_audiofile:enabled}%{!?with_audiofile:disabled} \
183 -Dbzip2=enabled \
4f727bb7 184 -Dcdio_paranoia=enabled \
5ce9dcc9
JP
185 -Dcurl=enabled \
186 -Ddatabase=true \
4f727bb7 187 -Ddocumentation=enabled \
5ce9dcc9
JP
188 -Ddsd=true \
189 -Dexpat=enabled \
190 -Dffmpeg=enabled \
191 -Dfifo=true \
192 -Dflac=enabled \
193 -Dfluidsynth=enabled \
194 -Dgme=enabled \
195 -Dhttpd=true \
196 -Dicu=enabled \
4f727bb7 197 -Did3tag=enabled \
5ce9dcc9 198 -Dinotify=true \
4f727bb7 199 -Dio_uring=enabled \
5ce9dcc9
JP
200 -Dipv6=enabled \
201 -Diso9660=enabled \
202 -Djack=enabled \
4f727bb7 203 -Dlame=enabled \
5ce9dcc9 204 -Dlibmpdclient=enabled \
5ce9dcc9
JP
205 -Dmad=enabled \
206 -Dmikmod=enabled \
207 -Dmms=enabled \
208 -Dmodplug=enabled \
209 -Dmpcdec=disabled \
210 -Dnfs=enabled \
211 -Dopenal=enabled \
212 -Dopus=enabled \
213 -Doss=enabled \
214 -Dpipe=true \
215 -Drecorder=true \
216 -Dsidplay=enabled \
4f727bb7 217 -Dshine=enabled \
5ce9dcc9
JP
218 -Dshout=enabled \
219 -Dsmbclient=enabled \
220 -Dsndfile=enabled \
221 -Dsoundcloud=enabled \
222 -Dsoxr=enabled \
223 -Dsqlite=enabled \
224 -Ddaemon=true \
225 -Dsystemd=enabled \
226 -Dtcp=true \
4f727bb7 227 -Dtwolame=enabled \
a1df62ee 228 -Dupnp=pupnp \
5ce9dcc9 229 -Dvorbis=enabled \
4f727bb7 230 -Dvorbisenc=enabled \
5ce9dcc9
JP
231 -Dwave_encoder=true \
232 -Dwavpack=enabled \
233 -Dwildmidi=enabled \
234 -Dzlib=enabled \
235 -Dzzip=enabled \
236 -Dzeroconf=avahi \
237 -Dsystemd_system_unit_dir=%{systemdunitdir} \
238 -Dsystemd_user_unit_dir=%{systemduserunitdir}
2605800f 239%ninja_build -C build
c7dcdf50
AF
240
241%install
242rm -rf $RPM_BUILD_ROOT
9cf1eba3 243install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
be963cbe 244 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
fb2724cc 245 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
c7dcdf50 246
2605800f 247%ninja_install -C build
fb44ab11 248
9cf1eba3
ER
249cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
250install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
251cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
387493e6 252cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
c7dcdf50 253
424f04d1 254touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
255touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
256touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 257touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
424f04d1 258
1ac45cec 259%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
5125f9d8 260
c7dcdf50
AF
261%clean
262rm -rf $RPM_BUILD_ROOT
263
31afabcf
ZU
264%pre
265%groupadd -g 204 mpd
fb2724cc 266%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
31afabcf 267
fb6389fb 268%post
4351e719 269for f in mpd.log; do
424f04d1
KK
270 if [ ! -f /var/log/%{name}/$f ]; then
271 touch /var/log/%{name}/$f
272 chown mpd:mpd /var/log/%{name}/$f
273 chmod 644 /var/log/%{name}/$f
274 fi
275done
fb6389fb 276/sbin/chkconfig --add mpd
a8aa6145 277%systemd_post %{name}.service %{name}.socket
6ba39ac6 278%update_icon_cache hicolor
fb6389fb
ZU
279
280%preun
281if [ "$1" = "0" ]; then
282 %service mpd stop
99bf80d6 283 /sbin/chkconfig --del mpd
fb6389fb 284fi
a8aa6145 285%systemd_preun %{name}.service %{name}.socket
fb6389fb 286
31afabcf
ZU
287%postun
288if [ "$1" = "0" ]; then
289 %userremove mpd
290 %groupremove mpd
291fi
a8b30e82 292%systemd_reload
6ba39ac6 293%update_icon_cache hicolor
a8b30e82
AF
294
295%triggerpostun -- %{name} < 0.16.6-1
296%systemd_trigger %{name}.service
31afabcf 297
c7dcdf50
AF
298%files
299%defattr(644,root,root,755)
27045b64 300%doc AUTHORS NEWS README.md doc/mpdconf.example
c7dcdf50 301%attr(755,root,root) %{_bindir}/*
fb44ab11
JB
302%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
303%attr(754,root,root) /etc/rc.d/init.d/mpd
9cf1eba3 304%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
fb2724cc 305%{systemdtmpfilesdir}/%{name}.conf
a8b30e82 306%{systemdunitdir}/mpd.service
a8aa6145 307%{systemdunitdir}/mpd.socket
711cad09 308%{systemduserunitdir}/mpd.service
7221bed2 309%{systemduserunitdir}/mpd.socket
424f04d1
KK
310%dir %attr(770,root,mpd) /var/lib/%{name}
311%dir %attr(770,root,mpd) /var/lib/%{name}/playlists
312%dir %attr(751,root,root) /var/log/%{name}
313%dir %attr(770,root,mpd) /var/run/%{name}
314%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
4351e719
JP
315%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
316%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
424f04d1 317%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
6ba39ac6 318%{_iconsdir}/hicolor/scalable/apps/mpd.svg
c7dcdf50 319%{_mandir}/man1/mpd.1*
80d0dd8f 320%{_mandir}/man5/mpd.conf.5*
5412b34a
ER
321
322%files doc
323%defattr(644,root,root,755)
5ce9dcc9 324%doc build/doc/html
This page took 0.277426 seconds and 4 git commands to generate.