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