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