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