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