]>
Commit | Line | Data |
---|---|---|
02876c51 | 1 | # TODO: |
c7dcdf50 | 2 | # - add logrotate |
424f04d1 KK |
3 | # |
4 | # Conditional build: | |
5125f9d8 | 5 | %bcond_without mod # enable MOD support |
d63dca03 | 6 | %bcond_without pulseaudio # disable PulseAudio support |
ea3b33dc | 7 | %bcond_without audiofile # Audiofile support (WAV and others) |
9cf1eba3 | 8 | |
c7dcdf50 | 9 | Summary: Music Player Daemon |
31afabcf | 10 | Summary(hu.UTF-8): Music Player Daemon |
6ae29a87 | 11 | Summary(pl.UTF-8): Music Player Daemon - demon odtwarzający muzykę |
c7dcdf50 | 12 | Name: mpd |
9ec70c0a | 13 | Version: 0.19.20 |
e7955853 | 14 | Release: 1 |
dbce58e4 | 15 | License: GPL v2+ |
c7dcdf50 | 16 | Group: Applications/Multimedia |
a8aa6145 | 17 | Source0: http://www.musicpd.org/download/mpd/0.19/%{name}-%{version}.tar.xz |
9ec70c0a | 18 | # Source0-md5: e16e936ad70ee37403c9a7f4165cc743 |
31afabcf | 19 | Source1: %{name}.conf |
fb6389fb | 20 | Source2: %{name}.init |
9cf1eba3 | 21 | Source3: %{name}.sysconfig |
be963cbe | 22 | Source4: %{name}.tmpfiles |
4bdc1a1d | 23 | Patch0: %{name}-mpcsv8.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} |
735ff9d7 | 29 | BuildRequires: autoconf >= 2.60 |
a8aa6145 JP |
30 | BuildRequires: automake >= 1:1.11 |
31 | BuildRequires: avahi-devel | |
32 | BuildRequires: boost-devel >= 1.54 | |
5125f9d8 | 33 | BuildRequires: bzip2-devel |
a8aa6145 JP |
34 | BuildRequires: curl-devel >= 7.18 |
35 | BuildRequires: dbus-devel | |
5125f9d8 | 36 | BuildRequires: doxygen |
a8aa6145 | 37 | BuildRequires: expat-devel |
158342a8 | 38 | BuildRequires: faad2-devel >= 2.6.1-5 |
24a381c6 | 39 | BuildRequires: ffmpeg-devel >= 0.8.0 |
a8aa6145 JP |
40 | BuildRequires: flac-devel >= 1.2.0 |
41 | BuildRequires: fluidsynth-devel >= 1.1 | |
296a7717 | 42 | BuildRequires: game-music-emu-devel |
24a381c6 | 43 | BuildRequires: gcc >= 6:4.7 |
a8aa6145 | 44 | BuildRequires: glib2-devel >= 1:2.28.0 |
a8aa6145 | 45 | BuildRequires: jack-audio-connection-kit-devel >= 0.100 |
424f04d1 | 46 | BuildRequires: lame-libs-devel |
c7dcdf50 | 47 | BuildRequires: libao-devel >= 0.8.3 |
5125f9d8 | 48 | BuildRequires: libcdio-devel |
a8aa6145 | 49 | BuildRequires: libcdio-paranoia-devel |
33e45e33 | 50 | BuildRequires: libcue-devel |
387493e6 | 51 | BuildRequires: libicu-devel |
c7dcdf50 AF |
52 | BuildRequires: libid3tag-devel |
53 | BuildRequires: libmad-devel | |
424f04d1 | 54 | %{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7} |
a8aa6145 | 55 | BuildRequires: libmms-devel >= 0.4 |
5125f9d8 | 56 | BuildRequires: libmodplug-devel |
a8aa6145 JP |
57 | BuildRequires: libmpdclient-devel >= 2.2 |
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 | |
5125f9d8 | 76 | BuildRequires: sqlite3-devel |
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 JR |
85 | Requires(post,preun,postun): systemd-units >= 38 |
86 | Requires: systemd-units >= 38 | |
31afabcf ZU |
87 | Provides: group(mpd) |
88 | Provides: user(mpd) | |
c7dcdf50 AF |
89 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
90 | ||
91 | %description | |
87d7b893 JB |
92 | Music Player Daemon (MPD) allows remote access for playing music (MP3, |
93 | Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists. | |
94 | MPD is designed for integrating a computer into a stereo system that | |
95 | provides control for music playback over a local network. It is also | |
96 | makes a great desktop music player, especially if you are a console | |
97 | junkie, like frontend options, or restart X often. | |
98 | ||
31afabcf ZU |
99 | %description -l hu.UTF-8 |
100 | Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás | |
101 | (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák | |
102 | menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet | |
103 | irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop | |
104 | zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik | |
105 | sűrűn indítják újra az X-et. | |
106 | ||
f7293765 JR |
107 | %description -l pl.UTF-8 |
108 | Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania | |
109 | muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz | |
110 | zarządzania playlistami. MPD jest zaprojektowany do integrowania | |
111 | komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki | |
112 | w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla | |
113 | komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji | |
114 | frontendów albo często restartujących X. | |
c7dcdf50 | 115 | |
5412b34a ER |
116 | %package apidocs |
117 | Summary: MPD API documentation | |
118 | Summary(pl.UTF-8): Dokumentacja API biblioteki API | |
119 | Group: Documentation | |
eec98461 ER |
120 | %if "%{_rpmversion}" >= "5" |
121 | BuildArch: noarch | |
122 | %endif | |
5412b34a ER |
123 | |
124 | %description apidocs | |
125 | API and internal documentation for MPD library. | |
126 | ||
127 | %description apidocs -l pl.UTF-8 | |
128 | Dokumentacja API biblioteki MPD. | |
129 | ||
130 | %package doc | |
131 | Summary: Documentation for Music Player Daemon (MPD) | |
132 | Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD) | |
133 | Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD) | |
134 | Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD) | |
135 | Group: Documentation | |
136 | ||
137 | %description doc | |
138 | Documentation for Music Player Daemon (MPD). | |
139 | ||
140 | %description doc -l fr.UTF-8 | |
141 | Documentation pour Music Player Daemon (MPD). | |
142 | ||
143 | %description doc -l it.UTF-8 | |
144 | Documentazione di Music Player Daemon (MPD). | |
145 | ||
146 | %description doc -l pl.UTF-8 | |
147 | Dokumentacja do Music Player Daemon (MPD). | |
148 | ||
c7dcdf50 | 149 | %prep |
99bf80d6 | 150 | %setup -q |
362076bc | 151 | %patch0 -p1 |
c7dcdf50 AF |
152 | |
153 | %build | |
735ff9d7 JP |
154 | %{__aclocal} -I m4 |
155 | %{__autoconf} | |
156 | %{__autoheader} | |
157 | %{__automake} | |
3523369e | 158 | # ac_cv_* hacks to avoid unwanted linking |
296a7717 | 159 | GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \ |
d9401207 | 160 | %configure \ |
3523369e JB |
161 | ac_cv_lib_iconv_main=no \ |
162 | ac_cv_lib_nsl_gethostbyname=no \ | |
d63dca03 | 163 | %{!?with_pulseaudio:--disable-pulse} \ |
5125f9d8 | 164 | %{?with_mod:--enable-mikmod} \ |
f756cffc | 165 | --enable-adplug \ |
5125f9d8 AF |
166 | --enable-alsa \ |
167 | --enable-ao \ | |
356a7f8f | 168 | %{?with_audiofile:--enable-audiofile} \ |
5125f9d8 | 169 | --enable-bzip2 \ |
a8aa6145 | 170 | --enable-cdio-paranoia \ |
5125f9d8 | 171 | --enable-curl \ |
a8aa6145 | 172 | --enable-database \ |
5125f9d8 | 173 | --enable-documentation \ |
a8aa6145 JP |
174 | --enable-dsd \ |
175 | --enable-expat \ | |
5125f9d8 | 176 | --enable-ffmpeg \ |
a8aa6145 JP |
177 | --enable-fifo \ |
178 | --enable-flac \ | |
5125f9d8 | 179 | --enable-fluidsynth \ |
296a7717 | 180 | --enable-gme \ |
5125f9d8 | 181 | --enable-httpd-output \ |
a8aa6145 JP |
182 | --enable-icu \ |
183 | --enable-id3 \ | |
184 | --enable-inotify \ | |
185 | --enable-ipv6 \ | |
5125f9d8 AF |
186 | --enable-iso9660 \ |
187 | --enable-jack \ | |
188 | --enable-lame-encoder \ | |
a8aa6145 JP |
189 | --enable-libmpdclient \ |
190 | --enable-libwrap \ | |
5125f9d8 AF |
191 | --enable-lsr \ |
192 | --enable-mad \ | |
a8aa6145 | 193 | --enable-mikmod \ |
5125f9d8 AF |
194 | --enable-mms \ |
195 | --enable-modplug \ | |
a8aa6145 JP |
196 | --enable-mpc \ |
197 | --enable-nfs \ | |
4351e719 | 198 | --enable-openal \ |
a8aa6145 JP |
199 | --enable-opus \ |
200 | --enable-oss \ | |
4351e719 JP |
201 | --enable-pipe-output \ |
202 | --enable-recorder-output \ | |
a8aa6145 | 203 | --enable-sidplay \ |
37a1b5ba | 204 | --enable-shine-encoder \ |
5125f9d8 | 205 | --enable-shout \ |
a8aa6145 JP |
206 | --enable-smbclient \ |
207 | --enable-sndfile \ | |
f756cffc | 208 | --enable-soundcloud \ |
a8aa6145 | 209 | --enable-soxr \ |
5125f9d8 | 210 | --enable-sqlite \ |
a8aa6145 JP |
211 | --enable-systemd-daemon \ |
212 | --enable-tcp \ | |
4351e719 | 213 | --enable-twolame-encoder \ |
a8aa6145 JP |
214 | --enable-upnp \ |
215 | --enable-un \ | |
216 | --enable-vorbis \ | |
5125f9d8 | 217 | --enable-vorbis-encoder \ |
4351e719 | 218 | --enable-wave-encoder \ |
5125f9d8 AF |
219 | --enable-wavpack \ |
220 | --enable-wildmidi \ | |
a8aa6145 | 221 | --enable-zlib \ |
4351e719 | 222 | --enable-zzip \ |
5125f9d8 | 223 | --with-zeroconf=avahi \ |
a8b30e82 AF |
224 | --without-tremor \ |
225 | --with-systemdsystemunitdir=%{systemdunitdir} | |
c7dcdf50 AF |
226 | %{__make} |
227 | ||
228 | %install | |
229 | rm -rf $RPM_BUILD_ROOT | |
9cf1eba3 | 230 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ |
be963cbe | 231 | $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \ |
fb2724cc | 232 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
c7dcdf50 AF |
233 | |
234 | %{__make} install \ | |
235 | DESTDIR=$RPM_BUILD_ROOT | |
fb44ab11 | 236 | |
9cf1eba3 ER |
237 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} |
238 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd | |
239 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd | |
387493e6 | 240 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
c7dcdf50 | 241 | |
424f04d1 | 242 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db |
4351e719 JP |
243 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate |
244 | touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql | |
424f04d1 | 245 | touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log |
424f04d1 | 246 | |
1ac45cec | 247 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd |
5125f9d8 | 248 | |
c7dcdf50 AF |
249 | %clean |
250 | rm -rf $RPM_BUILD_ROOT | |
251 | ||
31afabcf ZU |
252 | %pre |
253 | %groupadd -g 204 mpd | |
fb2724cc | 254 | %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd |
31afabcf | 255 | |
fb6389fb | 256 | %post |
4351e719 | 257 | for f in mpd.log; do |
424f04d1 KK |
258 | if [ ! -f /var/log/%{name}/$f ]; then |
259 | touch /var/log/%{name}/$f | |
260 | chown mpd:mpd /var/log/%{name}/$f | |
261 | chmod 644 /var/log/%{name}/$f | |
262 | fi | |
263 | done | |
fb6389fb | 264 | /sbin/chkconfig --add mpd |
a8aa6145 | 265 | %systemd_post %{name}.service %{name}.socket |
fb6389fb ZU |
266 | |
267 | %preun | |
268 | if [ "$1" = "0" ]; then | |
269 | %service mpd stop | |
99bf80d6 | 270 | /sbin/chkconfig --del mpd |
fb6389fb | 271 | fi |
a8aa6145 | 272 | %systemd_preun %{name}.service %{name}.socket |
fb6389fb | 273 | |
31afabcf ZU |
274 | %postun |
275 | if [ "$1" = "0" ]; then | |
276 | %userremove mpd | |
277 | %groupremove mpd | |
278 | fi | |
a8b30e82 AF |
279 | %systemd_reload |
280 | ||
281 | %triggerpostun -- %{name} < 0.16.6-1 | |
282 | %systemd_trigger %{name}.service | |
31afabcf | 283 | |
c7dcdf50 AF |
284 | %files |
285 | %defattr(644,root,root,755) | |
a8aa6145 | 286 | %doc AUTHORS INSTALL NEWS README doc/mpdconf.example |
c7dcdf50 | 287 | %attr(755,root,root) %{_bindir}/* |
fb44ab11 JB |
288 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf |
289 | %attr(754,root,root) /etc/rc.d/init.d/mpd | |
9cf1eba3 | 290 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd |
fb2724cc | 291 | %{systemdtmpfilesdir}/%{name}.conf |
a8b30e82 | 292 | %{systemdunitdir}/mpd.service |
a8aa6145 | 293 | %{systemdunitdir}/mpd.socket |
424f04d1 KK |
294 | %dir %attr(770,root,mpd) /var/lib/%{name} |
295 | %dir %attr(770,root,mpd) /var/lib/%{name}/playlists | |
296 | %dir %attr(751,root,root) /var/log/%{name} | |
297 | %dir %attr(770,root,mpd) /var/run/%{name} | |
298 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db | |
4351e719 JP |
299 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate |
300 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql | |
424f04d1 | 301 | %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log |
c7dcdf50 | 302 | %{_mandir}/man1/mpd.1* |
80d0dd8f | 303 | %{_mandir}/man5/mpd.conf.5* |
5412b34a ER |
304 | |
305 | %files doc | |
306 | %defattr(644,root,root,755) | |
307 | %doc doc/user/* | |
308 | ||
309 | %files apidocs | |
310 | %defattr(644,root,root,755) | |
311 | %doc doc/api doc/developer doc/protocol |