]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
upstream patch for dynamic samplerate selection with pipewire output plugin
[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
a1df62ee 12Version: 0.23
dcb956bb 13Release: 1
dbce58e4 14License: GPL v2+
c7dcdf50 15Group: Applications/Multimedia
a1df62ee
JP
16Source0: https://www.musicpd.org/download/mpd/0.23/%{name}-%{version}.tar.xz
17# Source0-md5: 103db74cc275ec0f7e5b7503cfd80131
31afabcf 18Source1: %{name}.conf
fb6389fb 19Source2: %{name}.init
9cf1eba3 20Source3: %{name}.sysconfig
be963cbe 21Source4: %{name}.tmpfiles
a1df62ee 22Patch0: smb.patch
bcbeb87e 23Patch1: pipewire-graph-samplerate.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}
a8aa6145 29BuildRequires: avahi-devel
5ce9dcc9 30BuildRequires: boost-devel >= 1.58
5125f9d8 31BuildRequires: bzip2-devel
4f727bb7 32BuildRequires: curl-devel >= 7.33
a8aa6145 33BuildRequires: dbus-devel
5125f9d8 34BuildRequires: doxygen
a8aa6145 35BuildRequires: expat-devel
158342a8 36BuildRequires: faad2-devel >= 2.6.1-5
5ce9dcc9 37BuildRequires: ffmpeg-devel >= 2.4.0
a8aa6145
JP
38BuildRequires: flac-devel >= 1.2.0
39BuildRequires: fluidsynth-devel >= 1.1
296a7717 40BuildRequires: game-music-emu-devel
4f727bb7 41BuildRequires: gcc >= 6:8
a8aa6145 42BuildRequires: glib2-devel >= 1:2.28.0
a8aa6145 43BuildRequires: jack-audio-connection-kit-devel >= 0.100
424f04d1 44BuildRequires: lame-libs-devel
c7dcdf50 45BuildRequires: libao-devel >= 0.8.3
5125f9d8 46BuildRequires: libcdio-devel
4f727bb7
JP
47BuildRequires: libcdio-paranoia-devel >= 0.93
48BuildRequires: libchromaprint-devel
a1df62ee 49BuildRequires: libfmt-devel
5ce9dcc9 50BuildRequires: libicu-devel >= 50
c7dcdf50
AF
51BuildRequires: libid3tag-devel
52BuildRequires: libmad-devel
5ce9dcc9 53%{?with_mod:BuildRequires: libmikmod-devel >= 3.2}
a8aa6145 54BuildRequires: libmms-devel >= 0.4
5125f9d8 55BuildRequires: libmodplug-devel
a1df62ee 56BuildRequires: libmpdclient-devel >= 2.11
df032f15 57BuildRequires: libmpg123-devel >= 1.28.0
5ce9dcc9 58BuildRequires: libnfs-devel >= 1.11
c7dcdf50 59BuildRequires: libogg-devel
a1df62ee 60BuildRequires: libopenmpt-devel >= 0.5
a8aa6145 61BuildRequires: libsamplerate-devel >= 0.1.3
38f95112 62BuildRequires: libshout-devel
4f727bb7 63BuildRequires: libsidplayfp-devel >= 1.8
a8aa6145
JP
64BuildRequires: libsmbclient-devel >= 0.2
65BuildRequires: libsndfile-devel
4f727bb7
JP
66BuildRequires: libstdc++-devel
67BuildRequires: libupnp-devel >= 1.8
68BuildRequires: liburing-devel
c7dcdf50 69BuildRequires: libvorbis-devel
a1df62ee 70BuildRequires: meson >= 0.56.0
735ff9d7 71BuildRequires: musepack-devel
5ce9dcc9 72BuildRequires: ninja
a8aa6145 73BuildRequires: opus-devel
4f727bb7 74BuildRequires: pcre-devel
a1df62ee 75BuildRequires: pipewire-devel >= 0.3
3523369e 76BuildRequires: pkgconfig >= 1:0.9.0
a8aa6145 77%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16}
2605800f 78BuildRequires: rpmbuild(macros) >= 1.736
a8aa6145
JP
79BuildRequires: shine-devel >= 3.1
80BuildRequires: soxr-devel
5ce9dcc9 81BuildRequires: sphinx-pdg
ad4050a4 82BuildRequires: sqlite3-devel >= 3.7.3
a8aa6145 83BuildRequires: systemd-devel
00831d71 84BuildRequires: tar >= 1:1.22
4351e719 85BuildRequires: twolame-devel
5125f9d8
AF
86BuildRequires: wavpack-devel
87BuildRequires: wildmidi-devel
88BuildRequires: xmlto
00831d71 89BuildRequires: xz
f756cffc 90BuildRequires: yajl-devel >= 2.0
c7dcdf50 91BuildRequires: zlib-devel
a8aa6145 92BuildRequires: zziplib-devel >= 0.13
6ba39ac6 93Requires(post,postun): gtk-update-icon-cache
195b8128 94Requires(post,preun,postun): systemd-units >= 38
ad4050a4
JP
95Requires: alsa-lib >= 0.9.0
96%{?with_audiofile:Requires: audiofile >= 0.3}
4f727bb7 97Requires: curl-libs >= 7.33
ad4050a4 98Requires: faad2-libs >= 2.6.1-5
5ce9dcc9 99Requires: ffmpeg-libs >= 2.4.0
ad4050a4
JP
100Requires: flac >= 1.2.0
101Requires: fluidsynth >= 1.1
102Requires: glib2 >= 1:2.28.0
6ba39ac6 103Requires: hicolor-icon-theme
ad4050a4
JP
104Requires: jack-audio-connection-kit-libs >= 0.100
105Requires: libao >= 0.8.3
4f727bb7 106Requires: libcdio-paranoia >= 0.93
5ce9dcc9
JP
107Requires: libicu >= 50
108%{?with_mod:Requires: libmikmod >= 3.2}
ad4050a4 109Requires: libmms >= 0.4
a1df62ee 110Requires: libmpdclient >= 2.11
df032f15 111Requires: libmpg123 >= 1.28.0
5ce9dcc9 112Requires: libnfs >= 1.11
a1df62ee 113Requires: libopenmpt >= 0.5
ad4050a4 114Requires: libsamplerate >= 0.1.3
4f727bb7 115Requires: libsidplayfp >= 1.8
ad4050a4 116Requires: libsmbclient >= 0.2
4f727bb7 117Requires: libupnp >= 1.8
a1df62ee 118Requires: pipewire-libs >= 0.3
ad4050a4
JP
119%{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16}
120Requires: shine >= 3.1
121Requires: sqlite3 >= 3.7.3
195b8128 122Requires: systemd-units >= 38
ad4050a4
JP
123Requires: yajl >= 2.0
124Requires: zziplib >= 0.13
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
c7dcdf50 174%prep
99bf80d6 175%setup -q
a1df62ee 176%patch0 -p1
bcbeb87e 177%patch1 -p1
c7dcdf50
AF
178
179%build
5ce9dcc9
JP
180%meson build \
181 -Dpulse=%{?with_pulseaudio:enabled}%{!?with_pulseaudio:disabled} \
182 -Dmikmod=%{?with_mod:enabled}%{!?with_mod:disabled} \
183 -Dadplug=enabled \
184 -Dalsa=enabled \
185 -Dao=enabled \
186 -Daudiofile=%{?with_audiofile:enabled}%{!?with_audiofile:disabled} \
187 -Dbzip2=enabled \
4f727bb7 188 -Dcdio_paranoia=enabled \
5ce9dcc9
JP
189 -Dcurl=enabled \
190 -Ddatabase=true \
4f727bb7 191 -Ddocumentation=enabled \
5ce9dcc9
JP
192 -Ddsd=true \
193 -Dexpat=enabled \
194 -Dffmpeg=enabled \
195 -Dfifo=true \
196 -Dflac=enabled \
197 -Dfluidsynth=enabled \
198 -Dgme=enabled \
199 -Dhttpd=true \
200 -Dicu=enabled \
4f727bb7 201 -Did3tag=enabled \
5ce9dcc9 202 -Dinotify=true \
4f727bb7 203 -Dio_uring=enabled \
5ce9dcc9
JP
204 -Dipv6=enabled \
205 -Diso9660=enabled \
206 -Djack=enabled \
4f727bb7 207 -Dlame=enabled \
5ce9dcc9 208 -Dlibmpdclient=enabled \
5ce9dcc9
JP
209 -Dmad=enabled \
210 -Dmikmod=enabled \
211 -Dmms=enabled \
212 -Dmodplug=enabled \
213 -Dmpcdec=disabled \
214 -Dnfs=enabled \
215 -Dopenal=enabled \
216 -Dopus=enabled \
217 -Doss=enabled \
218 -Dpipe=true \
219 -Drecorder=true \
220 -Dsidplay=enabled \
4f727bb7 221 -Dshine=enabled \
5ce9dcc9
JP
222 -Dshout=enabled \
223 -Dsmbclient=enabled \
224 -Dsndfile=enabled \
225 -Dsoundcloud=enabled \
226 -Dsoxr=enabled \
227 -Dsqlite=enabled \
228 -Ddaemon=true \
229 -Dsystemd=enabled \
230 -Dtcp=true \
4f727bb7 231 -Dtwolame=enabled \
a1df62ee 232 -Dupnp=pupnp \
5ce9dcc9 233 -Dvorbis=enabled \
4f727bb7 234 -Dvorbisenc=enabled \
5ce9dcc9
JP
235 -Dwave_encoder=true \
236 -Dwavpack=enabled \
237 -Dwildmidi=enabled \
238 -Dzlib=enabled \
239 -Dzzip=enabled \
240 -Dzeroconf=avahi \
241 -Dsystemd_system_unit_dir=%{systemdunitdir} \
242 -Dsystemd_user_unit_dir=%{systemduserunitdir}
2605800f 243%ninja_build -C build
c7dcdf50
AF
244
245%install
246rm -rf $RPM_BUILD_ROOT
9cf1eba3 247install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
be963cbe 248 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
fb2724cc 249 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
c7dcdf50 250
2605800f 251%ninja_install -C build
fb44ab11 252
9cf1eba3
ER
253cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
254install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
255cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
387493e6 256cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
c7dcdf50 257
424f04d1 258touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
259touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
260touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 261touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
424f04d1 262
1ac45cec 263%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
5125f9d8 264
c7dcdf50
AF
265%clean
266rm -rf $RPM_BUILD_ROOT
267
31afabcf
ZU
268%pre
269%groupadd -g 204 mpd
fb2724cc 270%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
31afabcf 271
fb6389fb 272%post
4351e719 273for f in mpd.log; do
424f04d1
KK
274 if [ ! -f /var/log/%{name}/$f ]; then
275 touch /var/log/%{name}/$f
276 chown mpd:mpd /var/log/%{name}/$f
277 chmod 644 /var/log/%{name}/$f
278 fi
279done
fb6389fb 280/sbin/chkconfig --add mpd
a8aa6145 281%systemd_post %{name}.service %{name}.socket
6ba39ac6 282%update_icon_cache hicolor
fb6389fb
ZU
283
284%preun
285if [ "$1" = "0" ]; then
286 %service mpd stop
99bf80d6 287 /sbin/chkconfig --del mpd
fb6389fb 288fi
a8aa6145 289%systemd_preun %{name}.service %{name}.socket
fb6389fb 290
31afabcf
ZU
291%postun
292if [ "$1" = "0" ]; then
293 %userremove mpd
294 %groupremove mpd
295fi
a8b30e82 296%systemd_reload
6ba39ac6 297%update_icon_cache hicolor
a8b30e82
AF
298
299%triggerpostun -- %{name} < 0.16.6-1
300%systemd_trigger %{name}.service
31afabcf 301
c7dcdf50
AF
302%files
303%defattr(644,root,root,755)
27045b64 304%doc AUTHORS NEWS README.md doc/mpdconf.example
c7dcdf50 305%attr(755,root,root) %{_bindir}/*
fb44ab11
JB
306%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
307%attr(754,root,root) /etc/rc.d/init.d/mpd
9cf1eba3 308%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
fb2724cc 309%{systemdtmpfilesdir}/%{name}.conf
a8b30e82 310%{systemdunitdir}/mpd.service
a8aa6145 311%{systemdunitdir}/mpd.socket
711cad09 312%{systemduserunitdir}/mpd.service
7221bed2 313%{systemduserunitdir}/mpd.socket
424f04d1
KK
314%dir %attr(770,root,mpd) /var/lib/%{name}
315%dir %attr(770,root,mpd) /var/lib/%{name}/playlists
316%dir %attr(751,root,root) /var/log/%{name}
317%dir %attr(770,root,mpd) /var/run/%{name}
318%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
4351e719
JP
319%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
320%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
424f04d1 321%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
6ba39ac6 322%{_iconsdir}/hicolor/scalable/apps/mpd.svg
c7dcdf50 323%{_mandir}/man1/mpd.1*
80d0dd8f 324%{_mandir}/man5/mpd.conf.5*
5412b34a
ER
325
326%files doc
327%defattr(644,root,root,755)
5ce9dcc9 328%doc build/doc/html
This page took 0.203125 seconds and 4 git commands to generate.