5 %bcond_without mod # enable MOD support
6 %bcond_without pulseaudio # disable PulseAudio support
7 %bcond_without audiofile # Audiofile support (WAV and others)
9 Summary: Music Player Daemon
10 Summary(hu.UTF-8): Music Player Daemon
11 Summary(pl.UTF-8): Music Player Daemon - demon odtwarzający muzykę
16 Group: Applications/Multimedia
17 Source0: http://www.musicpd.org/download/mpd/0.20/%{name}-%{version}.tar.xz
18 # Source0-md5: 082bedcf2e1f7625a5dd60002d4a0d8a
21 Source3: %{name}.sysconfig
22 Source4: %{name}.tmpfiles
23 Patch0: %{name}-mpcsv8.patch
24 URL: http://www.musicpd.org/
25 BuildRequires: OpenAL-devel
26 BuildRequires: adplug-devel
27 BuildRequires: alsa-lib-devel >= 0.9.0
28 %{?with_audiofile:BuildRequires: audiofile-devel >= 0.3}
29 BuildRequires: autoconf >= 2.60
30 BuildRequires: automake >= 1:1.11
31 BuildRequires: avahi-devel
32 BuildRequires: boost-devel >= 1.54
33 BuildRequires: bzip2-devel
34 BuildRequires: curl-devel >= 7.18
35 BuildRequires: dbus-devel
36 BuildRequires: doxygen
37 BuildRequires: expat-devel
38 BuildRequires: faad2-devel >= 2.6.1-5
39 BuildRequires: ffmpeg-devel >= 0.8.0
40 BuildRequires: flac-devel >= 1.2.0
41 BuildRequires: fluidsynth-devel >= 1.1
42 BuildRequires: game-music-emu-devel
43 BuildRequires: gcc >= 6:4.7
44 BuildRequires: glib2-devel >= 1:2.28.0
45 BuildRequires: jack-audio-connection-kit-devel >= 0.100
46 BuildRequires: lame-libs-devel
47 BuildRequires: libao-devel >= 0.8.3
48 BuildRequires: libcdio-devel
49 BuildRequires: libcdio-paranoia-devel
50 BuildRequires: libcue-devel
51 BuildRequires: libicu-devel
52 BuildRequires: libid3tag-devel
53 BuildRequires: libmad-devel
54 %{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7}
55 BuildRequires: libmms-devel >= 0.4
56 BuildRequires: libmodplug-devel
57 BuildRequires: libmpdclient-devel >= 2.2
58 BuildRequires: libmpg123-devel
59 BuildRequires: libnfs-devel
60 BuildRequires: libogg-devel
61 BuildRequires: libsamplerate-devel >= 0.1.3
62 BuildRequires: libshout-devel
63 BuildRequires: libsidplay2-devel >= 2.1.1-5
64 BuildRequires: libsmbclient-devel >= 0.2
65 BuildRequires: libsndfile-devel
66 BuildRequires: libstdc++-devel >= 0.2
67 BuildRequires: libupnp-devel
68 BuildRequires: libvorbis-devel
69 BuildRequires: libwrap-devel
70 BuildRequires: musepack-devel
71 BuildRequires: opus-devel
72 BuildRequires: pkgconfig >= 1:0.9.0
73 %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16}
74 BuildRequires: rpmbuild(macros) >= 1.629-2
75 BuildRequires: shine-devel >= 3.1
76 BuildRequires: soxr-devel
77 BuildRequires: sqlite3-devel >= 3.7.3
78 BuildRequires: systemd-devel
79 BuildRequires: twolame-devel
80 BuildRequires: wavpack-devel
81 BuildRequires: wildmidi-devel
83 BuildRequires: yajl-devel >= 2.0
84 BuildRequires: zlib-devel
85 BuildRequires: zziplib-devel >= 0.13
86 Requires(post,preun,postun): systemd-units >= 38
87 Requires: alsa-lib >= 0.9.0
88 %{?with_audiofile:Requires: audiofile >= 0.3}
89 Requires: curl-libs >= 7.18
90 Requires: faad2-libs >= 2.6.1-5
91 Requires: ffmpeg-libs >= 0.8.0
92 Requires: flac >= 1.2.0
93 Requires: fluidsynth >= 1.1
94 Requires: glib2 >= 1:2.28.0
95 Requires: jack-audio-connection-kit-libs >= 0.100
96 Requires: libao >= 0.8.3
97 %{?with_mod:Requires: libmikmod >= 3.1.7}
98 Requires: libmms >= 0.4
99 Requires: libmpdclient >= 2.2
100 Requires: libsamplerate >= 0.1.3
101 Requires: libsidplay2 >= 2.1.1-5
102 Requires: libsmbclient >= 0.2
103 %{?with_pulseaudio:Requires: pulseaudio-libs >= 0.9.16}
104 Requires: shine >= 3.1
105 Requires: sqlite3 >= 3.7.3
106 Requires: systemd-units >= 38
107 Requires: yajl >= 2.0
108 Requires: zziplib >= 0.13
111 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
114 Music Player Daemon (MPD) allows remote access for playing music (MP3,
115 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
116 MPD is designed for integrating a computer into a stereo system that
117 provides control for music playback over a local network. It is also
118 makes a great desktop music player, especially if you are a console
119 junkie, like frontend options, or restart X often.
121 %description -l hu.UTF-8
122 Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
123 (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
124 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
125 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
126 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
127 sűrűn indítják újra az X-et.
129 %description -l pl.UTF-8
130 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
131 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
132 zarządzania playlistami. MPD jest zaprojektowany do integrowania
133 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
134 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
135 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
136 frontendów albo często restartujących X.
139 Summary: MPD API documentation
140 Summary(pl.UTF-8): Dokumentacja API biblioteki API
142 %if "%{_rpmversion}" >= "5"
147 API and internal documentation for MPD library.
149 %description apidocs -l pl.UTF-8
150 Dokumentacja API biblioteki MPD.
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)
160 Documentation for Music Player Daemon (MPD).
162 %description doc -l fr.UTF-8
163 Documentation pour Music Player Daemon (MPD).
165 %description doc -l it.UTF-8
166 Documentazione di Music Player Daemon (MPD).
168 %description doc -l pl.UTF-8
169 Dokumentacja do Music Player Daemon (MPD).
180 # ac_cv_* hacks to avoid unwanted linking
181 GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
183 ac_cv_lib_iconv_main=no \
184 ac_cv_lib_nsl_gethostbyname=no \
185 %{!?with_pulseaudio:--disable-pulse} \
186 %{?with_mod:--enable-mikmod} \
190 %{?with_audiofile:--enable-audiofile} \
192 --enable-cdio-paranoia \
195 --enable-documentation \
201 --enable-fluidsynth \
203 --enable-httpd-output \
210 --enable-lame-encoder \
211 --enable-libmpdclient \
223 --enable-pipe-output \
224 --enable-recorder-output \
226 --enable-shine-encoder \
230 --enable-soundcloud \
233 --enable-systemd-daemon \
235 --enable-twolame-encoder \
239 --enable-vorbis-encoder \
240 --enable-wave-encoder \
245 --with-zeroconf=avahi \
247 --with-systemdsystemunitdir=%{systemdunitdir}
251 rm -rf $RPM_BUILD_ROOT
252 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
253 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
254 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
257 DESTDIR=$RPM_BUILD_ROOT
259 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
260 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
261 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
262 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
264 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
265 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
266 touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
267 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
269 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
272 rm -rf $RPM_BUILD_ROOT
276 %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
280 if [ ! -f /var/log/%{name}/$f ]; then
281 touch /var/log/%{name}/$f
282 chown mpd:mpd /var/log/%{name}/$f
283 chmod 644 /var/log/%{name}/$f
286 /sbin/chkconfig --add mpd
287 %systemd_post %{name}.service %{name}.socket
290 if [ "$1" = "0" ]; then
292 /sbin/chkconfig --del mpd
294 %systemd_preun %{name}.service %{name}.socket
297 if [ "$1" = "0" ]; then
303 %triggerpostun -- %{name} < 0.16.6-1
304 %systemd_trigger %{name}.service
307 %defattr(644,root,root,755)
308 %doc AUTHORS NEWS README.md doc/mpdconf.example
309 %attr(755,root,root) %{_bindir}/*
310 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
311 %attr(754,root,root) /etc/rc.d/init.d/mpd
312 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
313 %{systemdtmpfilesdir}/%{name}.conf
314 %{systemdunitdir}/mpd.service
315 %{systemdunitdir}/mpd.socket
316 %dir %attr(770,root,mpd) /var/lib/%{name}
317 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
318 %dir %attr(751,root,root) /var/log/%{name}
319 %dir %attr(770,root,mpd) /var/run/%{name}
320 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
321 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
322 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
323 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
324 %{_mandir}/man1/mpd.1*
325 %{_mandir}/man5/mpd.conf.5*
328 %defattr(644,root,root,755)
332 %defattr(644,root,root,755)
333 %doc doc/api doc/developer doc/protocol