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