]>
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 |
3b2394e9 | 12 | Version: 0.22.9 |
7e427494 | 13 | Release: 1 |
dbce58e4 | 14 | License: GPL v2+ |
c7dcdf50 | 15 | Group: Applications/Multimedia |
8e4b6d99 | 16 | Source0: https://www.musicpd.org/download/mpd/0.22/%{name}-%{version}.tar.xz |
3b2394e9 | 17 | # Source0-md5: 070576445b618a65960fdfa4cdcefb55 |
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 |
4f727bb7 | 30 | BuildRequires: curl-devel >= 7.33 |
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 | |
5ce9dcc9 | 47 | BuildRequires: libicu-devel >= 50 |
c7dcdf50 AF |
48 | BuildRequires: libid3tag-devel |
49 | BuildRequires: libmad-devel | |
5ce9dcc9 | 50 | %{?with_mod:BuildRequires: libmikmod-devel >= 3.2} |
a8aa6145 | 51 | BuildRequires: libmms-devel >= 0.4 |
5125f9d8 | 52 | BuildRequires: libmodplug-devel |
5ce9dcc9 | 53 | BuildRequires: libmpdclient-devel >= 2.9 |
ad4050a4 | 54 | BuildRequires: libmpg123-devel |
5ce9dcc9 | 55 | BuildRequires: libnfs-devel >= 1.11 |
c7dcdf50 | 56 | BuildRequires: libogg-devel |
a8aa6145 | 57 | BuildRequires: libsamplerate-devel >= 0.1.3 |
38f95112 | 58 | BuildRequires: libshout-devel |
4f727bb7 | 59 | BuildRequires: libsidplayfp-devel >= 1.8 |
a8aa6145 JP |
60 | BuildRequires: libsmbclient-devel >= 0.2 |
61 | BuildRequires: libsndfile-devel | |
4f727bb7 JP |
62 | BuildRequires: libstdc++-devel |
63 | BuildRequires: libupnp-devel >= 1.8 | |
64 | BuildRequires: liburing-devel | |
c7dcdf50 | 65 | BuildRequires: libvorbis-devel |
6687ede3 | 66 | BuildRequires: meson >= 0.49.0 |
735ff9d7 | 67 | BuildRequires: musepack-devel |
5ce9dcc9 | 68 | BuildRequires: ninja |
a8aa6145 | 69 | BuildRequires: opus-devel |
4f727bb7 | 70 | BuildRequires: pcre-devel |
3523369e | 71 | BuildRequires: pkgconfig >= 1:0.9.0 |
a8aa6145 | 72 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16} |
2605800f | 73 | BuildRequires: rpmbuild(macros) >= 1.736 |
a8aa6145 JP |
74 | BuildRequires: shine-devel >= 3.1 |
75 | BuildRequires: soxr-devel | |
5ce9dcc9 | 76 | BuildRequires: sphinx-pdg |
ad4050a4 | 77 | BuildRequires: sqlite3-devel >= 3.7.3 |
a8aa6145 | 78 | BuildRequires: systemd-devel |
00831d71 | 79 | BuildRequires: tar >= 1:1.22 |
4351e719 | 80 | BuildRequires: twolame-devel |
5125f9d8 AF |
81 | BuildRequires: wavpack-devel |
82 | BuildRequires: wildmidi-devel | |
83 | BuildRequires: xmlto | |
00831d71 | 84 | BuildRequires: xz |
f756cffc | 85 | BuildRequires: yajl-devel >= 2.0 |
c7dcdf50 | 86 | BuildRequires: zlib-devel |
a8aa6145 | 87 | BuildRequires: zziplib-devel >= 0.13 |
6ba39ac6 | 88 | Requires(post,postun): gtk-update-icon-cache |
195b8128 | 89 | Requires(post,preun,postun): systemd-units >= 38 |
ad4050a4 JP |
90 | Requires: alsa-lib >= 0.9.0 |
91 | %{?with_audiofile:Requires: audiofile >= 0.3} | |
4f727bb7 | 92 | Requires: curl-libs >= 7.33 |
ad4050a4 | 93 | Requires: faad2-libs >= 2.6.1-5 |
5ce9dcc9 | 94 | Requires: ffmpeg-libs >= 2.4.0 |
ad4050a4 JP |
95 | Requires: flac >= 1.2.0 |
96 | Requires: fluidsynth >= 1.1 | |
97 | Requires: glib2 >= 1:2.28.0 | |
6ba39ac6 | 98 | Requires: hicolor-icon-theme |
ad4050a4 JP |
99 | Requires: jack-audio-connection-kit-libs >= 0.100 |
100 | Requires: libao >= 0.8.3 | |
4f727bb7 | 101 | Requires: libcdio-paranoia >= 0.93 |
5ce9dcc9 JP |
102 | Requires: libicu >= 50 |
103 | %{?with_mod:Requires: libmikmod >= 3.2} | |
ad4050a4 | 104 | Requires: libmms >= 0.4 |
5ce9dcc9 JP |
105 | Requires: libmpdclient >= 2.9 |
106 | Requires: libnfs >= 1.11 | |
ad4050a4 | 107 | Requires: libsamplerate >= 0.1.3 |
4f727bb7 | 108 | Requires: libsidplayfp >= 1.8 |
ad4050a4 | 109 | Requires: libsmbclient >= 0.2 |
4f727bb7 | 110 | Requires: libupnp >= 1.8 |
ad4050a4 JP |
111 | %{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16} |
112 | Requires: shine >= 3.1 | |
113 | Requires: sqlite3 >= 3.7.3 | |
195b8128 | 114 | Requires: systemd-units >= 38 |
ad4050a4 JP |
115 | Requires: yajl >= 2.0 |
116 | Requires: zziplib >= 0.13 | |
31afabcf ZU |
117 | Provides: group(mpd) |
118 | Provides: user(mpd) | |
c7dcdf50 AF |
119 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
120 | ||
121 | %description | |
87d7b893 JB |
122 | Music Player Daemon (MPD) allows remote access for playing music (MP3, |
123 | Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists. | |
124 | MPD is designed for integrating a computer into a stereo system that | |
125 | provides control for music playback over a local network. It is also | |
126 | makes a great desktop music player, especially if you are a console | |
127 | junkie, like frontend options, or restart X often. | |
128 | ||
31afabcf ZU |
129 | %description -l hu.UTF-8 |
130 | Music 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 | |
132 | menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet | |
133 | irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop | |
134 | zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik | |
135 | sűrűn indítják újra az X-et. | |
136 | ||
f7293765 JR |
137 | %description -l pl.UTF-8 |
138 | Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania | |
139 | muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz | |
140 | zarządzania playlistami. MPD jest zaprojektowany do integrowania | |
141 | komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki | |
142 | w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla | |
143 | komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji | |
144 | frontendów albo często restartujących X. | |
c7dcdf50 | 145 | |
5412b34a ER |
146 | %package doc |
147 | Summary: Documentation for Music Player Daemon (MPD) | |
148 | Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD) | |
149 | Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD) | |
150 | Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD) | |
151 | Group: Documentation | |
5ce9dcc9 | 152 | Obsoletes: mpd-apidocs < 0.21 |
5412b34a ER |
153 | |
154 | %description doc | |
155 | Documentation for Music Player Daemon (MPD). | |
156 | ||
157 | %description doc -l fr.UTF-8 | |
158 | Documentation pour Music Player Daemon (MPD). | |
159 | ||
160 | %description doc -l it.UTF-8 | |
161 | Documentazione di Music Player Daemon (MPD). | |
162 | ||
163 | %description doc -l pl.UTF-8 | |
164 | Dokumentacja do Music Player Daemon (MPD). | |
165 | ||
c7dcdf50 | 166 | %prep |
99bf80d6 | 167 | %setup -q |
c7dcdf50 AF |
168 | |
169 | %build | |
5ce9dcc9 JP |
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 \ | |
4f727bb7 | 178 | -Dcdio_paranoia=enabled \ |
5ce9dcc9 JP |
179 | -Dcurl=enabled \ |
180 | -Ddatabase=true \ | |
4f727bb7 | 181 | -Ddocumentation=enabled \ |
5ce9dcc9 JP |
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 \ | |
4f727bb7 | 191 | -Did3tag=enabled \ |
5ce9dcc9 | 192 | -Dinotify=true \ |
4f727bb7 | 193 | -Dio_uring=enabled \ |
5ce9dcc9 JP |
194 | -Dipv6=enabled \ |
195 | -Diso9660=enabled \ | |
196 | -Djack=enabled \ | |
4f727bb7 | 197 | -Dlame=enabled \ |
5ce9dcc9 | 198 | -Dlibmpdclient=enabled \ |
5ce9dcc9 JP |
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 \ | |
4f727bb7 | 211 | -Dshine=enabled \ |
5ce9dcc9 JP |
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 \ | |
4f727bb7 | 221 | -Dtwolame=enabled \ |
5ce9dcc9 | 222 | -Dupnp=enabled \ |
5ce9dcc9 | 223 | -Dvorbis=enabled \ |
4f727bb7 | 224 | -Dvorbisenc=enabled \ |
5ce9dcc9 JP |
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} | |
2605800f | 233 | %ninja_build -C build |
c7dcdf50 AF |
234 | |
235 | %install | |
236 | rm -rf $RPM_BUILD_ROOT | |
9cf1eba3 | 237 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ |
be963cbe | 238 | $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \ |
fb2724cc | 239 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
c7dcdf50 | 240 | |
2605800f | 241 | %ninja_install -C build |
fb44ab11 | 242 | |
9cf1eba3 ER |
243 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} |
244 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd | |
245 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd | |
387493e6 | 246 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
c7dcdf50 | 247 | |
424f04d1 | 248 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db |
4351e719 JP |
249 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate |
250 | touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql | |
424f04d1 | 251 | touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log |
424f04d1 | 252 | |
1ac45cec | 253 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd |
5125f9d8 | 254 | |
c7dcdf50 AF |
255 | %clean |
256 | rm -rf $RPM_BUILD_ROOT | |
257 | ||
31afabcf ZU |
258 | %pre |
259 | %groupadd -g 204 mpd | |
fb2724cc | 260 | %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd |
31afabcf | 261 | |
fb6389fb | 262 | %post |
4351e719 | 263 | for f in mpd.log; do |
424f04d1 KK |
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 | |
269 | done | |
fb6389fb | 270 | /sbin/chkconfig --add mpd |
a8aa6145 | 271 | %systemd_post %{name}.service %{name}.socket |
6ba39ac6 | 272 | %update_icon_cache hicolor |
fb6389fb ZU |
273 | |
274 | %preun | |
275 | if [ "$1" = "0" ]; then | |
276 | %service mpd stop | |
99bf80d6 | 277 | /sbin/chkconfig --del mpd |
fb6389fb | 278 | fi |
a8aa6145 | 279 | %systemd_preun %{name}.service %{name}.socket |
fb6389fb | 280 | |
31afabcf ZU |
281 | %postun |
282 | if [ "$1" = "0" ]; then | |
283 | %userremove mpd | |
284 | %groupremove mpd | |
285 | fi | |
a8b30e82 | 286 | %systemd_reload |
6ba39ac6 | 287 | %update_icon_cache hicolor |
a8b30e82 AF |
288 | |
289 | %triggerpostun -- %{name} < 0.16.6-1 | |
290 | %systemd_trigger %{name}.service | |
31afabcf | 291 | |
c7dcdf50 AF |
292 | %files |
293 | %defattr(644,root,root,755) | |
27045b64 | 294 | %doc AUTHORS NEWS README.md doc/mpdconf.example |
c7dcdf50 | 295 | %attr(755,root,root) %{_bindir}/* |
fb44ab11 JB |
296 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf |
297 | %attr(754,root,root) /etc/rc.d/init.d/mpd | |
9cf1eba3 | 298 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd |
fb2724cc | 299 | %{systemdtmpfilesdir}/%{name}.conf |
a8b30e82 | 300 | %{systemdunitdir}/mpd.service |
a8aa6145 | 301 | %{systemdunitdir}/mpd.socket |
711cad09 | 302 | %{systemduserunitdir}/mpd.service |
7221bed2 | 303 | %{systemduserunitdir}/mpd.socket |
424f04d1 KK |
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 | |
4351e719 JP |
309 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate |
310 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql | |
424f04d1 | 311 | %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log |
6ba39ac6 | 312 | %{_iconsdir}/hicolor/scalable/apps/mpd.svg |
c7dcdf50 | 313 | %{_mandir}/man1/mpd.1* |
80d0dd8f | 314 | %{_mandir}/man5/mpd.conf.5* |
5412b34a ER |
315 | |
316 | %files doc | |
317 | %defattr(644,root,root,755) | |
5ce9dcc9 | 318 | %doc build/doc/html |