]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
ce0697c7a007d447f2875f2cb9fcbdecc51946d6
[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.5
13 Release:        4
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:  624ff40f0f059fab58843ab90ce2bc9a
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.33
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
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
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 >= 250.1
93 Requires:       alsa-lib >= 0.9.0
94 %{?with_audiofile:Requires:     audiofile >= 0.3}
95 Requires:       curl-libs >= 7.33
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:       glib2 >= 1:2.28.0
101 Requires:       jack-audio-connection-kit-libs >= 0.100
102 Requires:       libao >= 0.8.3
103 Requires:       libcdio-paranoia >= 0.93
104 Requires:       libicu >= 50
105 %{?with_mod:Requires:   libmikmod >= 3.2}
106 Requires:       libmms >= 0.4
107 Requires:       libmpdclient >= 2.11
108 Requires:       libmpg123 >= 1.28.0
109 Requires:       libnfs >= 1.11
110 Requires:       libopenmpt >= 0.5
111 Requires:       libsamplerate >= 0.1.3
112 Requires:       libsidplayfp >= 1.8
113 Requires:       libsmbclient >= 0.2
114 Requires:       libupnp >= 1.8
115 Requires:       pipewire-libs >= 0.3
116 %{?with_pulseaudio:Requires:    pulseaudio-libs >= 0.9.16}
117 Requires:       shine >= 3.1
118 Requires:       sqlite3 >= 3.7.3
119 Requires:       systemd-units >= 250.1
120 Requires:       yajl >= 2.0
121 Requires:       zziplib >= 0.13
122 Suggests:       %{name}-icons
123 Provides:       group(mpd)
124 Provides:       user(mpd)
125 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
126
127 %description
128 Music Player Daemon (MPD) allows remote access for playing music (MP3,
129 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
130 MPD is designed for integrating a computer into a stereo system that
131 provides control for music playback over a local network. It is also
132 makes a great desktop music player, especially if you are a console
133 junkie, like frontend options, or restart X often.
134
135 %description -l hu.UTF-8
136 Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
137 (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
138 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
139 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
140 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
141 sűrűn indítják újra az X-et.
142
143 %description -l pl.UTF-8
144 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
145 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
146 zarządzania playlistami. MPD jest zaprojektowany do integrowania
147 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
148 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
149 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
150 frontendów albo często restartujących X.
151
152 %package doc
153 Summary:        Documentation for Music Player Daemon (MPD)
154 Summary(fr.UTF-8):      Documentation pour Music Player Daemon (MPD)
155 Summary(it.UTF-8):      Documentazione di Music Player Daemon (MPD)
156 Summary(pl.UTF-8):      Podręcznik dla Music Player Daemon (MPD)
157 Group:          Documentation
158 Obsoletes:      mpd-apidocs < 0.21
159
160 %description doc
161 Documentation for Music Player Daemon (MPD).
162
163 %description doc -l fr.UTF-8
164 Documentation pour Music Player Daemon (MPD).
165
166 %description doc -l it.UTF-8
167 Documentazione di Music Player Daemon (MPD).
168
169 %description doc -l pl.UTF-8
170 Dokumentacja do Music Player Daemon (MPD).
171
172 %package icons
173 Summary:        Icon files for Music Player Daemon (MPD)
174 Summary(pl.UTF-8):      Pliki ikon dla Music Player Daemon (MPD)
175 Group:          Applications
176 Requires(post,postun):  gtk-update-icon-cache
177 Requires:       hicolor-icon-theme
178 BuildArch:      noarch
179
180 %description icons
181 Documentation for Music Player Daemon (MPD).
182
183 %description icons -l pl.UTF-8
184 Pliki ikon dla Music Player Daemon (MPD).
185
186 %prep
187 %setup -q
188
189 %build
190 %meson build \
191         -Dpulse=%{?with_pulseaudio:enabled}%{!?with_pulseaudio:disabled} \
192         -Dmikmod=%{?with_mod:enabled}%{!?with_mod:disabled} \
193         -Dadplug=enabled \
194         -Dalsa=enabled \
195         -Dao=enabled \
196         -Daudiofile=%{?with_audiofile:enabled}%{!?with_audiofile:disabled} \
197         -Dbzip2=enabled \
198         -Dcdio_paranoia=enabled \
199         -Dcurl=enabled \
200         -Ddatabase=true \
201         -Ddocumentation=enabled \
202         -Ddsd=true \
203         -Dexpat=enabled \
204         -Dffmpeg=enabled \
205         -Dfifo=true \
206         -Dflac=enabled \
207         -Dfluidsynth=enabled \
208         -Dgme=enabled \
209         -Dhttpd=true \
210         -Dicu=enabled \
211         -Did3tag=enabled \
212         -Dinotify=true \
213         -Dio_uring=enabled \
214         -Dipv6=enabled \
215         -Diso9660=enabled \
216         -Djack=enabled \
217         -Dlame=enabled \
218         -Dlibmpdclient=enabled \
219         -Dmad=enabled \
220         -Dmikmod=enabled \
221         -Dmms=enabled \
222         -Dmodplug=enabled \
223         -Dmpcdec=disabled \
224         -Dnfs=enabled \
225         -Dopenal=enabled \
226         -Dopus=enabled \
227         -Doss=enabled \
228         -Dpipe=true \
229         -Drecorder=true \
230         -Dsidplay=enabled \
231         -Dshine=enabled \
232         -Dshout=enabled \
233         -Dsmbclient=enabled \
234         -Dsndfile=enabled \
235         -Dsoundcloud=enabled \
236         -Dsoxr=enabled \
237         -Dsqlite=enabled \
238         -Ddaemon=true \
239         -Dsystemd=enabled \
240         -Dtcp=true \
241         -Dtwolame=enabled \
242         -Dupnp=pupnp \
243         -Dvorbis=enabled \
244         -Dvorbisenc=enabled \
245         -Dwave_encoder=true \
246         -Dwavpack=enabled \
247         -Dwildmidi=enabled \
248         -Dzlib=enabled \
249         -Dzzip=enabled \
250         -Dzeroconf=avahi \
251         -Dsystemd_system_unit_dir=%{systemdunitdir} \
252         -Dsystemd_user_unit_dir=%{systemduserunitdir}
253 %ninja_build -C build
254
255 %install
256 rm -rf $RPM_BUILD_ROOT
257 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
258         $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
259         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
260
261 %ninja_install -C build
262
263 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
264 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
265 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
266 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
267
268 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
269 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
270 touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
271 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
272
273 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
274
275 %clean
276 rm -rf $RPM_BUILD_ROOT
277
278 %pre
279 %groupadd -g 204 mpd
280 %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
281
282 %post
283 for f in mpd.log; do
284         if [ ! -f /var/log/%{name}/$f ]; then
285                 touch /var/log/%{name}/$f
286                 chown mpd:mpd /var/log/%{name}/$f
287                 chmod 644 /var/log/%{name}/$f
288         fi
289 done
290 /sbin/chkconfig --add mpd
291 %systemd_post %{name}.service %{name}.socket
292 %systemd_user_post %{name}.service %{name}.socket
293
294 %post icons
295 %update_icon_cache hicolor
296
297 %preun
298 if [ "$1" = "0" ]; then
299         %service mpd stop
300         /sbin/chkconfig --del mpd
301 fi
302 %systemd_preun %{name}.service %{name}.socket
303 %systemd_user_preun %{name}.service %{name}.socket
304
305 %postun
306 if [ "$1" = "0" ]; then
307         %userremove mpd
308         %groupremove mpd
309 fi
310 %systemd_reload
311
312 %postun icons
313 %update_icon_cache hicolor
314
315 %triggerpostun -- %{name} < 0.16.6-1
316 %systemd_trigger %{name}.service
317
318 %files
319 %defattr(644,root,root,755)
320 %doc AUTHORS NEWS README.md doc/mpdconf.example
321 %attr(755,root,root) %{_bindir}/*
322 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
323 %attr(754,root,root) /etc/rc.d/init.d/mpd
324 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
325 %{systemdtmpfilesdir}/%{name}.conf
326 %{systemdunitdir}/mpd.service
327 %{systemdunitdir}/mpd.socket
328 %{systemduserunitdir}/mpd.service
329 %{systemduserunitdir}/mpd.socket
330 %dir %attr(770,root,mpd) /var/lib/%{name}
331 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
332 %dir %attr(751,root,root) /var/log/%{name}
333 %dir %attr(770,root,mpd) /var/run/%{name}
334 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
335 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
336 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
337 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
338 %{_mandir}/man1/mpd.1*
339 %{_mandir}/man5/mpd.conf.5*
340
341 %files doc
342 %defattr(644,root,root,755)
343 %doc build/doc/html
344
345 %files icons
346 %defattr(644,root,root,755)
347 %{_iconsdir}/hicolor/scalable/apps/mpd.svg
This page took 0.042465 seconds and 2 git commands to generate.