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