]> git.pld-linux.org Git - packages/mpd.git/blame_incremental - mpd.spec
upstream patch for dynamic samplerate selection with pipewire output plugin
[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
13Release: 1
14License: GPL v2+
15Group: Applications/Multimedia
16Source0: https://www.musicpd.org/download/mpd/0.23/%{name}-%{version}.tar.xz
17# Source0-md5: 103db74cc275ec0f7e5b7503cfd80131
18Source1: %{name}.conf
19Source2: %{name}.init
20Source3: %{name}.sysconfig
21Source4: %{name}.tmpfiles
22Patch0: smb.patch
23Patch1: pipewire-graph-samplerate.patch
24URL: http://www.musicpd.org/
25BuildRequires: OpenAL-devel
26BuildRequires: adplug-devel
27BuildRequires: alsa-lib-devel >= 0.9.0
28%{?with_audiofile:BuildRequires: audiofile-devel >= 0.3}
29BuildRequires: avahi-devel
30BuildRequires: boost-devel >= 1.58
31BuildRequires: bzip2-devel
32BuildRequires: curl-devel >= 7.33
33BuildRequires: dbus-devel
34BuildRequires: doxygen
35BuildRequires: expat-devel
36BuildRequires: faad2-devel >= 2.6.1-5
37BuildRequires: ffmpeg-devel >= 2.4.0
38BuildRequires: flac-devel >= 1.2.0
39BuildRequires: fluidsynth-devel >= 1.1
40BuildRequires: game-music-emu-devel
41BuildRequires: gcc >= 6:8
42BuildRequires: glib2-devel >= 1:2.28.0
43BuildRequires: jack-audio-connection-kit-devel >= 0.100
44BuildRequires: lame-libs-devel
45BuildRequires: libao-devel >= 0.8.3
46BuildRequires: libcdio-devel
47BuildRequires: libcdio-paranoia-devel >= 0.93
48BuildRequires: libchromaprint-devel
49BuildRequires: libfmt-devel
50BuildRequires: libicu-devel >= 50
51BuildRequires: libid3tag-devel
52BuildRequires: libmad-devel
53%{?with_mod:BuildRequires: libmikmod-devel >= 3.2}
54BuildRequires: libmms-devel >= 0.4
55BuildRequires: libmodplug-devel
56BuildRequires: libmpdclient-devel >= 2.11
57BuildRequires: libmpg123-devel >= 1.28.0
58BuildRequires: libnfs-devel >= 1.11
59BuildRequires: libogg-devel
60BuildRequires: libopenmpt-devel >= 0.5
61BuildRequires: libsamplerate-devel >= 0.1.3
62BuildRequires: libshout-devel
63BuildRequires: libsidplayfp-devel >= 1.8
64BuildRequires: libsmbclient-devel >= 0.2
65BuildRequires: libsndfile-devel
66BuildRequires: libstdc++-devel
67BuildRequires: libupnp-devel >= 1.8
68BuildRequires: liburing-devel
69BuildRequires: libvorbis-devel
70BuildRequires: meson >= 0.56.0
71BuildRequires: musepack-devel
72BuildRequires: ninja
73BuildRequires: opus-devel
74BuildRequires: pcre-devel
75BuildRequires: pipewire-devel >= 0.3
76BuildRequires: pkgconfig >= 1:0.9.0
77%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16}
78BuildRequires: rpmbuild(macros) >= 1.736
79BuildRequires: shine-devel >= 3.1
80BuildRequires: soxr-devel
81BuildRequires: sphinx-pdg
82BuildRequires: sqlite3-devel >= 3.7.3
83BuildRequires: systemd-devel
84BuildRequires: tar >= 1:1.22
85BuildRequires: twolame-devel
86BuildRequires: wavpack-devel
87BuildRequires: wildmidi-devel
88BuildRequires: xmlto
89BuildRequires: xz
90BuildRequires: yajl-devel >= 2.0
91BuildRequires: zlib-devel
92BuildRequires: zziplib-devel >= 0.13
93Requires(post,postun): gtk-update-icon-cache
94Requires(post,preun,postun): systemd-units >= 38
95Requires: alsa-lib >= 0.9.0
96%{?with_audiofile:Requires: audiofile >= 0.3}
97Requires: curl-libs >= 7.33
98Requires: faad2-libs >= 2.6.1-5
99Requires: ffmpeg-libs >= 2.4.0
100Requires: flac >= 1.2.0
101Requires: fluidsynth >= 1.1
102Requires: glib2 >= 1:2.28.0
103Requires: hicolor-icon-theme
104Requires: jack-audio-connection-kit-libs >= 0.100
105Requires: libao >= 0.8.3
106Requires: libcdio-paranoia >= 0.93
107Requires: libicu >= 50
108%{?with_mod:Requires: libmikmod >= 3.2}
109Requires: libmms >= 0.4
110Requires: libmpdclient >= 2.11
111Requires: libmpg123 >= 1.28.0
112Requires: libnfs >= 1.11
113Requires: libopenmpt >= 0.5
114Requires: libsamplerate >= 0.1.3
115Requires: libsidplayfp >= 1.8
116Requires: libsmbclient >= 0.2
117Requires: libupnp >= 1.8
118Requires: pipewire-libs >= 0.3
119%{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16}
120Requires: shine >= 3.1
121Requires: sqlite3 >= 3.7.3
122Requires: systemd-units >= 38
123Requires: yajl >= 2.0
124Requires: zziplib >= 0.13
125Provides: group(mpd)
126Provides: user(mpd)
127BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
128
129%description
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
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
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.
153
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
160Obsoletes: mpd-apidocs < 0.21
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
174%prep
175%setup -q
176%patch0 -p1
177%patch1 -p1
178
179%build
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 \
188 -Dcdio_paranoia=enabled \
189 -Dcurl=enabled \
190 -Ddatabase=true \
191 -Ddocumentation=enabled \
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 \
201 -Did3tag=enabled \
202 -Dinotify=true \
203 -Dio_uring=enabled \
204 -Dipv6=enabled \
205 -Diso9660=enabled \
206 -Djack=enabled \
207 -Dlame=enabled \
208 -Dlibmpdclient=enabled \
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 \
221 -Dshine=enabled \
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 \
231 -Dtwolame=enabled \
232 -Dupnp=pupnp \
233 -Dvorbis=enabled \
234 -Dvorbisenc=enabled \
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}
243%ninja_build -C build
244
245%install
246rm -rf $RPM_BUILD_ROOT
247install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
248 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
249 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
250
251%ninja_install -C build
252
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
256cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
257
258touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
259touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
260touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
261touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
262
263%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
264
265%clean
266rm -rf $RPM_BUILD_ROOT
267
268%pre
269%groupadd -g 204 mpd
270%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
271
272%post
273for f in mpd.log; do
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
280/sbin/chkconfig --add mpd
281%systemd_post %{name}.service %{name}.socket
282%update_icon_cache hicolor
283
284%preun
285if [ "$1" = "0" ]; then
286 %service mpd stop
287 /sbin/chkconfig --del mpd
288fi
289%systemd_preun %{name}.service %{name}.socket
290
291%postun
292if [ "$1" = "0" ]; then
293 %userremove mpd
294 %groupremove mpd
295fi
296%systemd_reload
297%update_icon_cache hicolor
298
299%triggerpostun -- %{name} < 0.16.6-1
300%systemd_trigger %{name}.service
301
302%files
303%defattr(644,root,root,755)
304%doc AUTHORS NEWS README.md doc/mpdconf.example
305%attr(755,root,root) %{_bindir}/*
306%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
307%attr(754,root,root) /etc/rc.d/init.d/mpd
308%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
309%{systemdtmpfilesdir}/%{name}.conf
310%{systemdunitdir}/mpd.service
311%{systemdunitdir}/mpd.socket
312%{systemduserunitdir}/mpd.service
313%{systemduserunitdir}/mpd.socket
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
319%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
320%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
321%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
322%{_iconsdir}/hicolor/scalable/apps/mpd.svg
323%{_mandir}/man1/mpd.1*
324%{_mandir}/man5/mpd.conf.5*
325
326%files doc
327%defattr(644,root,root,755)
328%doc build/doc/html
This page took 0.278402 seconds and 4 git commands to generate.