]>
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 |
592b8867 JP |
12 | Version: 0.20.19 |
13 | Release: 1 | |
dbce58e4 | 14 | License: GPL v2+ |
c7dcdf50 | 15 | Group: Applications/Multimedia |
ad4050a4 | 16 | Source0: http://www.musicpd.org/download/mpd/0.20/%{name}-%{version}.tar.xz |
592b8867 | 17 | # Source0-md5: 5faa4a5c6d74b9eae6777a3f88a7c533 |
31afabcf | 18 | Source1: %{name}.conf |
fb6389fb | 19 | Source2: %{name}.init |
9cf1eba3 | 20 | Source3: %{name}.sysconfig |
be963cbe | 21 | Source4: %{name}.tmpfiles |
4bdc1a1d | 22 | Patch0: %{name}-mpcsv8.patch |
c7dcdf50 | 23 | URL: http://www.musicpd.org/ |
4351e719 | 24 | BuildRequires: OpenAL-devel |
f756cffc | 25 | BuildRequires: adplug-devel |
3523369e | 26 | BuildRequires: alsa-lib-devel >= 0.9.0 |
a8aa6145 | 27 | %{?with_audiofile:BuildRequires: audiofile-devel >= 0.3} |
735ff9d7 | 28 | BuildRequires: autoconf >= 2.60 |
a8aa6145 JP |
29 | BuildRequires: automake >= 1:1.11 |
30 | BuildRequires: avahi-devel | |
31 | BuildRequires: boost-devel >= 1.54 | |
5125f9d8 | 32 | BuildRequires: bzip2-devel |
a8aa6145 JP |
33 | BuildRequires: curl-devel >= 7.18 |
34 | BuildRequires: dbus-devel | |
5125f9d8 | 35 | BuildRequires: doxygen |
a8aa6145 | 36 | BuildRequires: expat-devel |
158342a8 | 37 | BuildRequires: faad2-devel >= 2.6.1-5 |
24a381c6 | 38 | BuildRequires: ffmpeg-devel >= 0.8.0 |
a8aa6145 JP |
39 | BuildRequires: flac-devel >= 1.2.0 |
40 | BuildRequires: fluidsynth-devel >= 1.1 | |
296a7717 | 41 | BuildRequires: game-music-emu-devel |
24a381c6 | 42 | BuildRequires: gcc >= 6:4.7 |
a8aa6145 | 43 | BuildRequires: glib2-devel >= 1:2.28.0 |
a8aa6145 | 44 | BuildRequires: jack-audio-connection-kit-devel >= 0.100 |
424f04d1 | 45 | BuildRequires: lame-libs-devel |
c7dcdf50 | 46 | BuildRequires: libao-devel >= 0.8.3 |
5125f9d8 | 47 | BuildRequires: libcdio-devel |
a8aa6145 | 48 | BuildRequires: libcdio-paranoia-devel |
33e45e33 | 49 | BuildRequires: libcue-devel |
387493e6 | 50 | BuildRequires: libicu-devel |
c7dcdf50 AF |
51 | BuildRequires: libid3tag-devel |
52 | BuildRequires: libmad-devel | |
424f04d1 | 53 | %{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7} |
a8aa6145 | 54 | BuildRequires: libmms-devel >= 0.4 |
5125f9d8 | 55 | BuildRequires: libmodplug-devel |
a8aa6145 | 56 | BuildRequires: libmpdclient-devel >= 2.2 |
ad4050a4 | 57 | BuildRequires: libmpg123-devel |
a8aa6145 | 58 | BuildRequires: libnfs-devel |
c7dcdf50 | 59 | BuildRequires: libogg-devel |
a8aa6145 | 60 | BuildRequires: libsamplerate-devel >= 0.1.3 |
38f95112 | 61 | BuildRequires: libshout-devel |
fb2724cc | 62 | BuildRequires: libsidplay2-devel >= 2.1.1-5 |
a8aa6145 JP |
63 | BuildRequires: libsmbclient-devel >= 0.2 |
64 | BuildRequires: libsndfile-devel | |
65 | BuildRequires: libstdc++-devel >= 0.2 | |
66 | BuildRequires: libupnp-devel | |
c7dcdf50 | 67 | BuildRequires: libvorbis-devel |
387493e6 | 68 | BuildRequires: libwrap-devel |
735ff9d7 | 69 | BuildRequires: musepack-devel |
a8aa6145 | 70 | BuildRequires: opus-devel |
3523369e | 71 | BuildRequires: pkgconfig >= 1:0.9.0 |
a8aa6145 | 72 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16} |
a8b30e82 | 73 | BuildRequires: rpmbuild(macros) >= 1.629-2 |
a8aa6145 JP |
74 | BuildRequires: shine-devel >= 3.1 |
75 | BuildRequires: soxr-devel | |
ad4050a4 | 76 | BuildRequires: sqlite3-devel >= 3.7.3 |
a8aa6145 | 77 | BuildRequires: systemd-devel |
4351e719 | 78 | BuildRequires: twolame-devel |
5125f9d8 AF |
79 | BuildRequires: wavpack-devel |
80 | BuildRequires: wildmidi-devel | |
81 | BuildRequires: xmlto | |
f756cffc | 82 | BuildRequires: yajl-devel >= 2.0 |
c7dcdf50 | 83 | BuildRequires: zlib-devel |
a8aa6145 | 84 | BuildRequires: zziplib-devel >= 0.13 |
195b8128 | 85 | Requires(post,preun,postun): systemd-units >= 38 |
ad4050a4 JP |
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 | |
195b8128 | 105 | Requires: systemd-units >= 38 |
ad4050a4 JP |
106 | Requires: yajl >= 2.0 |
107 | Requires: zziplib >= 0.13 | |
31afabcf ZU |
108 | Provides: group(mpd) |
109 | Provides: user(mpd) | |
c7dcdf50 AF |
110 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
111 | ||
112 | %description | |
87d7b893 JB |
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. | |
119 | ||
31afabcf ZU |
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. | |
127 | ||
f7293765 JR |
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. | |
c7dcdf50 | 136 | |
5412b34a ER |
137 | %package apidocs |
138 | Summary: MPD API documentation | |
139 | Summary(pl.UTF-8): Dokumentacja API biblioteki API | |
140 | Group: Documentation | |
eec98461 ER |
141 | %if "%{_rpmversion}" >= "5" |
142 | BuildArch: noarch | |
143 | %endif | |
5412b34a ER |
144 | |
145 | %description apidocs | |
146 | API and internal documentation for MPD library. | |
147 | ||
148 | %description apidocs -l pl.UTF-8 | |
149 | Dokumentacja API biblioteki MPD. | |
150 | ||
151 | %package doc | |
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) | |
156 | Group: Documentation | |
157 | ||
158 | %description doc | |
159 | Documentation for Music Player Daemon (MPD). | |
160 | ||
161 | %description doc -l fr.UTF-8 | |
162 | Documentation pour Music Player Daemon (MPD). | |
163 | ||
164 | %description doc -l it.UTF-8 | |
165 | Documentazione di Music Player Daemon (MPD). | |
166 | ||
167 | %description doc -l pl.UTF-8 | |
168 | Dokumentacja do Music Player Daemon (MPD). | |
169 | ||
c7dcdf50 | 170 | %prep |
99bf80d6 | 171 | %setup -q |
362076bc | 172 | %patch0 -p1 |
c7dcdf50 AF |
173 | |
174 | %build | |
735ff9d7 JP |
175 | %{__aclocal} -I m4 |
176 | %{__autoconf} | |
177 | %{__autoheader} | |
178 | %{__automake} | |
3523369e | 179 | # ac_cv_* hacks to avoid unwanted linking |
296a7717 | 180 | GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \ |
d9401207 | 181 | %configure \ |
3523369e JB |
182 | ac_cv_lib_iconv_main=no \ |
183 | ac_cv_lib_nsl_gethostbyname=no \ | |
d63dca03 | 184 | %{!?with_pulseaudio:--disable-pulse} \ |
5125f9d8 | 185 | %{?with_mod:--enable-mikmod} \ |
f756cffc | 186 | --enable-adplug \ |
5125f9d8 AF |
187 | --enable-alsa \ |
188 | --enable-ao \ | |
356a7f8f | 189 | %{?with_audiofile:--enable-audiofile} \ |
5125f9d8 | 190 | --enable-bzip2 \ |
a8aa6145 | 191 | --enable-cdio-paranoia \ |
5125f9d8 | 192 | --enable-curl \ |
a8aa6145 | 193 | --enable-database \ |
5125f9d8 | 194 | --enable-documentation \ |
a8aa6145 JP |
195 | --enable-dsd \ |
196 | --enable-expat \ | |
5125f9d8 | 197 | --enable-ffmpeg \ |
a8aa6145 JP |
198 | --enable-fifo \ |
199 | --enable-flac \ | |
5125f9d8 | 200 | --enable-fluidsynth \ |
296a7717 | 201 | --enable-gme \ |
5125f9d8 | 202 | --enable-httpd-output \ |
a8aa6145 JP |
203 | --enable-icu \ |
204 | --enable-id3 \ | |
205 | --enable-inotify \ | |
206 | --enable-ipv6 \ | |
5125f9d8 AF |
207 | --enable-iso9660 \ |
208 | --enable-jack \ | |
209 | --enable-lame-encoder \ | |
a8aa6145 JP |
210 | --enable-libmpdclient \ |
211 | --enable-libwrap \ | |
5125f9d8 AF |
212 | --enable-lsr \ |
213 | --enable-mad \ | |
a8aa6145 | 214 | --enable-mikmod \ |
5125f9d8 AF |
215 | --enable-mms \ |
216 | --enable-modplug \ | |
a8aa6145 JP |
217 | --enable-mpc \ |
218 | --enable-nfs \ | |
4351e719 | 219 | --enable-openal \ |
a8aa6145 JP |
220 | --enable-opus \ |
221 | --enable-oss \ | |
4351e719 JP |
222 | --enable-pipe-output \ |
223 | --enable-recorder-output \ | |
a8aa6145 | 224 | --enable-sidplay \ |
37a1b5ba | 225 | --enable-shine-encoder \ |
5125f9d8 | 226 | --enable-shout \ |
a8aa6145 JP |
227 | --enable-smbclient \ |
228 | --enable-sndfile \ | |
f756cffc | 229 | --enable-soundcloud \ |
a8aa6145 | 230 | --enable-soxr \ |
5125f9d8 | 231 | --enable-sqlite \ |
a8aa6145 JP |
232 | --enable-systemd-daemon \ |
233 | --enable-tcp \ | |
4351e719 | 234 | --enable-twolame-encoder \ |
a8aa6145 JP |
235 | --enable-upnp \ |
236 | --enable-un \ | |
237 | --enable-vorbis \ | |
5125f9d8 | 238 | --enable-vorbis-encoder \ |
4351e719 | 239 | --enable-wave-encoder \ |
5125f9d8 AF |
240 | --enable-wavpack \ |
241 | --enable-wildmidi \ | |
a8aa6145 | 242 | --enable-zlib \ |
4351e719 | 243 | --enable-zzip \ |
5125f9d8 | 244 | --with-zeroconf=avahi \ |
a8b30e82 | 245 | --without-tremor \ |
711cad09 JP |
246 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
247 | --with-systemduserunitdir=%{systemduserunitdir} | |
c7dcdf50 AF |
248 | %{__make} |
249 | ||
250 | %install | |
251 | rm -rf $RPM_BUILD_ROOT | |
9cf1eba3 | 252 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ |
be963cbe | 253 | $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \ |
fb2724cc | 254 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
c7dcdf50 AF |
255 | |
256 | %{__make} install \ | |
257 | DESTDIR=$RPM_BUILD_ROOT | |
fb44ab11 | 258 | |
9cf1eba3 ER |
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 | |
387493e6 | 262 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
c7dcdf50 | 263 | |
424f04d1 | 264 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db |
4351e719 JP |
265 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate |
266 | touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql | |
424f04d1 | 267 | touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log |
424f04d1 | 268 | |
1ac45cec | 269 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd |
5125f9d8 | 270 | |
c7dcdf50 AF |
271 | %clean |
272 | rm -rf $RPM_BUILD_ROOT | |
273 | ||
31afabcf ZU |
274 | %pre |
275 | %groupadd -g 204 mpd | |
fb2724cc | 276 | %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd |
31afabcf | 277 | |
fb6389fb | 278 | %post |
4351e719 | 279 | for f in mpd.log; do |
424f04d1 KK |
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 | |
284 | fi | |
285 | done | |
fb6389fb | 286 | /sbin/chkconfig --add mpd |
a8aa6145 | 287 | %systemd_post %{name}.service %{name}.socket |
fb6389fb ZU |
288 | |
289 | %preun | |
290 | if [ "$1" = "0" ]; then | |
291 | %service mpd stop | |
99bf80d6 | 292 | /sbin/chkconfig --del mpd |
fb6389fb | 293 | fi |
a8aa6145 | 294 | %systemd_preun %{name}.service %{name}.socket |
fb6389fb | 295 | |
31afabcf ZU |
296 | %postun |
297 | if [ "$1" = "0" ]; then | |
298 | %userremove mpd | |
299 | %groupremove mpd | |
300 | fi | |
a8b30e82 AF |
301 | %systemd_reload |
302 | ||
303 | %triggerpostun -- %{name} < 0.16.6-1 | |
304 | %systemd_trigger %{name}.service | |
31afabcf | 305 | |
c7dcdf50 AF |
306 | %files |
307 | %defattr(644,root,root,755) | |
27045b64 | 308 | %doc AUTHORS NEWS README.md doc/mpdconf.example |
c7dcdf50 | 309 | %attr(755,root,root) %{_bindir}/* |
fb44ab11 JB |
310 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf |
311 | %attr(754,root,root) /etc/rc.d/init.d/mpd | |
9cf1eba3 | 312 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd |
fb2724cc | 313 | %{systemdtmpfilesdir}/%{name}.conf |
a8b30e82 | 314 | %{systemdunitdir}/mpd.service |
a8aa6145 | 315 | %{systemdunitdir}/mpd.socket |
711cad09 | 316 | %{systemduserunitdir}/mpd.service |
424f04d1 KK |
317 | %dir %attr(770,root,mpd) /var/lib/%{name} |
318 | %dir %attr(770,root,mpd) /var/lib/%{name}/playlists | |
319 | %dir %attr(751,root,root) /var/log/%{name} | |
320 | %dir %attr(770,root,mpd) /var/run/%{name} | |
321 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db | |
4351e719 JP |
322 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate |
323 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql | |
424f04d1 | 324 | %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log |
c7dcdf50 | 325 | %{_mandir}/man1/mpd.1* |
80d0dd8f | 326 | %{_mandir}/man5/mpd.conf.5* |
5412b34a ER |
327 | |
328 | %files doc | |
329 | %defattr(644,root,root,755) | |
330 | %doc doc/user/* | |
331 | ||
332 | %files apidocs | |
333 | %defattr(644,root,root,755) | |
334 | %doc doc/api doc/developer doc/protocol |