]>
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 |
37a1b5ba | 13 | Version: 0.19.5 |
a8aa6145 | 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 |
37a1b5ba | 18 | # Source0-md5: dd3d2088205dc5f8fb4b6768ed7d9f5c |
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 |
424f04d1 | 39 | BuildRequires: ffmpeg-devel |
a8aa6145 JP |
40 | BuildRequires: flac-devel >= 1.2.0 |
41 | BuildRequires: fluidsynth-devel >= 1.1 | |
296a7717 | 42 | BuildRequires: game-music-emu-devel |
a8aa6145 JP |
43 | BuildRequires: glib2-devel >= 1:2.28.0 |
44 | BuildRequires: harfbuzz-icu-devel | |
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 |
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 JP |
56 | BuildRequires: libmpdclient-devel >= 2.2 |
57 | BuildRequires: libnfs-devel | |
c7dcdf50 | 58 | BuildRequires: libogg-devel |
a8aa6145 | 59 | BuildRequires: libsamplerate-devel >= 0.1.3 |
38f95112 | 60 | BuildRequires: libshout-devel |
fb2724cc | 61 | BuildRequires: libsidplay2-devel >= 2.1.1-5 |
a8aa6145 JP |
62 | BuildRequires: libsmbclient-devel >= 0.2 |
63 | BuildRequires: libsndfile-devel | |
64 | BuildRequires: libstdc++-devel >= 0.2 | |
65 | BuildRequires: libupnp-devel | |
66 | BuildRequires: libwrap-devel | |
c7dcdf50 | 67 | BuildRequires: libvorbis-devel |
735ff9d7 | 68 | BuildRequires: musepack-devel |
a8aa6145 | 69 | BuildRequires: opus-devel |
3523369e | 70 | BuildRequires: pkgconfig >= 1:0.9.0 |
a8aa6145 | 71 | %{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16} |
a8b30e82 | 72 | BuildRequires: rpmbuild(macros) >= 1.629-2 |
a8aa6145 JP |
73 | BuildRequires: shine-devel >= 3.1 |
74 | BuildRequires: soxr-devel | |
5125f9d8 | 75 | BuildRequires: sqlite3-devel |
a8aa6145 | 76 | BuildRequires: systemd-devel |
4351e719 | 77 | BuildRequires: twolame-devel |
5125f9d8 AF |
78 | BuildRequires: wavpack-devel |
79 | BuildRequires: wildmidi-devel | |
80 | BuildRequires: xmlto | |
f756cffc | 81 | BuildRequires: yajl-devel >= 2.0 |
c7dcdf50 | 82 | BuildRequires: zlib-devel |
a8aa6145 | 83 | BuildRequires: zziplib-devel >= 0.13 |
195b8128 JR |
84 | Requires(post,preun,postun): systemd-units >= 38 |
85 | Requires: systemd-units >= 38 | |
31afabcf ZU |
86 | Provides: group(mpd) |
87 | Provides: user(mpd) | |
c7dcdf50 AF |
88 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
89 | ||
90 | %description | |
87d7b893 JB |
91 | Music Player Daemon (MPD) allows remote access for playing music (MP3, |
92 | Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists. | |
93 | MPD is designed for integrating a computer into a stereo system that | |
94 | provides control for music playback over a local network. It is also | |
95 | makes a great desktop music player, especially if you are a console | |
96 | junkie, like frontend options, or restart X often. | |
97 | ||
31afabcf ZU |
98 | %description -l hu.UTF-8 |
99 | Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás | |
100 | (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák | |
101 | menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet | |
102 | irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop | |
103 | zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik | |
104 | sűrűn indítják újra az X-et. | |
105 | ||
f7293765 JR |
106 | %description -l pl.UTF-8 |
107 | Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania | |
108 | muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz | |
109 | zarządzania playlistami. MPD jest zaprojektowany do integrowania | |
110 | komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki | |
111 | w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla | |
112 | komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji | |
113 | frontendów albo często restartujących X. | |
c7dcdf50 | 114 | |
5412b34a ER |
115 | %package apidocs |
116 | Summary: MPD API documentation | |
117 | Summary(pl.UTF-8): Dokumentacja API biblioteki API | |
118 | Group: Documentation | |
119 | ||
120 | %description apidocs | |
121 | API and internal documentation for MPD library. | |
122 | ||
123 | %description apidocs -l pl.UTF-8 | |
124 | Dokumentacja API biblioteki MPD. | |
125 | ||
126 | %package doc | |
127 | Summary: Documentation for Music Player Daemon (MPD) | |
128 | Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD) | |
129 | Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD) | |
130 | Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD) | |
131 | Group: Documentation | |
132 | ||
133 | %description doc | |
134 | Documentation for Music Player Daemon (MPD). | |
135 | ||
136 | %description doc -l fr.UTF-8 | |
137 | Documentation pour Music Player Daemon (MPD). | |
138 | ||
139 | %description doc -l it.UTF-8 | |
140 | Documentazione di Music Player Daemon (MPD). | |
141 | ||
142 | %description doc -l pl.UTF-8 | |
143 | Dokumentacja do Music Player Daemon (MPD). | |
144 | ||
c7dcdf50 | 145 | %prep |
99bf80d6 | 146 | %setup -q |
362076bc | 147 | %patch0 -p1 |
c7dcdf50 AF |
148 | |
149 | %build | |
735ff9d7 JP |
150 | %{__aclocal} -I m4 |
151 | %{__autoconf} | |
152 | %{__autoheader} | |
153 | %{__automake} | |
3523369e | 154 | # ac_cv_* hacks to avoid unwanted linking |
296a7717 | 155 | GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \ |
d9401207 | 156 | %configure \ |
3523369e JB |
157 | ac_cv_lib_iconv_main=no \ |
158 | ac_cv_lib_nsl_gethostbyname=no \ | |
d63dca03 | 159 | %{!?with_pulseaudio:--disable-pulse} \ |
5125f9d8 | 160 | %{?with_mod:--enable-mikmod} \ |
f756cffc | 161 | --enable-adplug \ |
5125f9d8 AF |
162 | --enable-alsa \ |
163 | --enable-ao \ | |
356a7f8f | 164 | %{?with_audiofile:--enable-audiofile} \ |
5125f9d8 | 165 | --enable-bzip2 \ |
a8aa6145 | 166 | --enable-cdio-paranoia \ |
5125f9d8 | 167 | --enable-curl \ |
a8aa6145 | 168 | --enable-database \ |
5125f9d8 | 169 | --enable-documentation \ |
a8aa6145 JP |
170 | --enable-dsd \ |
171 | --enable-expat \ | |
5125f9d8 | 172 | --enable-ffmpeg \ |
a8aa6145 JP |
173 | --enable-fifo \ |
174 | --enable-flac \ | |
5125f9d8 | 175 | --enable-fluidsynth \ |
296a7717 | 176 | --enable-gme \ |
5125f9d8 | 177 | --enable-httpd-output \ |
a8aa6145 JP |
178 | --enable-icu \ |
179 | --enable-id3 \ | |
180 | --enable-inotify \ | |
181 | --enable-ipv6 \ | |
5125f9d8 AF |
182 | --enable-iso9660 \ |
183 | --enable-jack \ | |
184 | --enable-lame-encoder \ | |
a8aa6145 JP |
185 | --enable-libmpdclient \ |
186 | --enable-libwrap \ | |
5125f9d8 AF |
187 | --enable-lsr \ |
188 | --enable-mad \ | |
a8aa6145 | 189 | --enable-mikmod \ |
5125f9d8 AF |
190 | --enable-mms \ |
191 | --enable-modplug \ | |
a8aa6145 JP |
192 | --enable-mpc \ |
193 | --enable-nfs \ | |
4351e719 | 194 | --enable-openal \ |
a8aa6145 JP |
195 | --enable-opus \ |
196 | --enable-oss \ | |
4351e719 JP |
197 | --enable-pipe-output \ |
198 | --enable-recorder-output \ | |
a8aa6145 | 199 | --enable-sidplay \ |
37a1b5ba | 200 | --enable-shine-encoder \ |
5125f9d8 | 201 | --enable-shout \ |
a8aa6145 JP |
202 | --enable-smbclient \ |
203 | --enable-sndfile \ | |
f756cffc | 204 | --enable-soundcloud \ |
a8aa6145 | 205 | --enable-soxr \ |
5125f9d8 | 206 | --enable-sqlite \ |
a8aa6145 JP |
207 | --enable-systemd-daemon \ |
208 | --enable-tcp \ | |
4351e719 | 209 | --enable-twolame-encoder \ |
a8aa6145 JP |
210 | --enable-upnp \ |
211 | --enable-un \ | |
212 | --enable-vorbis \ | |
5125f9d8 | 213 | --enable-vorbis-encoder \ |
4351e719 | 214 | --enable-wave-encoder \ |
5125f9d8 AF |
215 | --enable-wavpack \ |
216 | --enable-wildmidi \ | |
a8aa6145 | 217 | --enable-zlib \ |
4351e719 | 218 | --enable-zzip \ |
5125f9d8 | 219 | --with-zeroconf=avahi \ |
a8b30e82 AF |
220 | --without-tremor \ |
221 | --with-systemdsystemunitdir=%{systemdunitdir} | |
c7dcdf50 AF |
222 | %{__make} |
223 | ||
224 | %install | |
225 | rm -rf $RPM_BUILD_ROOT | |
9cf1eba3 | 226 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ |
be963cbe | 227 | $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \ |
fb2724cc | 228 | $RPM_BUILD_ROOT%{systemdtmpfilesdir} |
c7dcdf50 AF |
229 | |
230 | %{__make} install \ | |
231 | DESTDIR=$RPM_BUILD_ROOT | |
fb44ab11 | 232 | |
9cf1eba3 ER |
233 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} |
234 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd | |
235 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd | |
fb2724cc | 236 | install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
c7dcdf50 | 237 | |
424f04d1 | 238 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db |
4351e719 JP |
239 | touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate |
240 | touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql | |
424f04d1 | 241 | touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log |
424f04d1 | 242 | |
1ac45cec | 243 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd |
5125f9d8 | 244 | |
c7dcdf50 AF |
245 | %clean |
246 | rm -rf $RPM_BUILD_ROOT | |
247 | ||
31afabcf ZU |
248 | %pre |
249 | %groupadd -g 204 mpd | |
fb2724cc | 250 | %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd |
31afabcf | 251 | |
fb6389fb | 252 | %post |
4351e719 | 253 | for f in mpd.log; do |
424f04d1 KK |
254 | if [ ! -f /var/log/%{name}/$f ]; then |
255 | touch /var/log/%{name}/$f | |
256 | chown mpd:mpd /var/log/%{name}/$f | |
257 | chmod 644 /var/log/%{name}/$f | |
258 | fi | |
259 | done | |
fb6389fb | 260 | /sbin/chkconfig --add mpd |
a8aa6145 | 261 | %systemd_post %{name}.service %{name}.socket |
fb6389fb ZU |
262 | |
263 | %preun | |
264 | if [ "$1" = "0" ]; then | |
265 | %service mpd stop | |
99bf80d6 | 266 | /sbin/chkconfig --del mpd |
fb6389fb | 267 | fi |
a8aa6145 | 268 | %systemd_preun %{name}.service %{name}.socket |
fb6389fb | 269 | |
31afabcf ZU |
270 | %postun |
271 | if [ "$1" = "0" ]; then | |
272 | %userremove mpd | |
273 | %groupremove mpd | |
274 | fi | |
a8b30e82 AF |
275 | %systemd_reload |
276 | ||
277 | %triggerpostun -- %{name} < 0.16.6-1 | |
278 | %systemd_trigger %{name}.service | |
31afabcf | 279 | |
c7dcdf50 AF |
280 | %files |
281 | %defattr(644,root,root,755) | |
a8aa6145 | 282 | %doc AUTHORS INSTALL NEWS README doc/mpdconf.example |
c7dcdf50 | 283 | %attr(755,root,root) %{_bindir}/* |
fb44ab11 JB |
284 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf |
285 | %attr(754,root,root) /etc/rc.d/init.d/mpd | |
9cf1eba3 | 286 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd |
fb2724cc | 287 | %{systemdtmpfilesdir}/%{name}.conf |
a8b30e82 | 288 | %{systemdunitdir}/mpd.service |
a8aa6145 | 289 | %{systemdunitdir}/mpd.socket |
424f04d1 KK |
290 | %dir %attr(770,root,mpd) /var/lib/%{name} |
291 | %dir %attr(770,root,mpd) /var/lib/%{name}/playlists | |
292 | %dir %attr(751,root,root) /var/log/%{name} | |
293 | %dir %attr(770,root,mpd) /var/run/%{name} | |
294 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db | |
4351e719 JP |
295 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate |
296 | %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql | |
424f04d1 | 297 | %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log |
c7dcdf50 | 298 | %{_mandir}/man1/mpd.1* |
80d0dd8f | 299 | %{_mandir}/man5/mpd.conf.5* |
5412b34a ER |
300 | |
301 | %files doc | |
302 | %defattr(644,root,root,755) | |
303 | %doc doc/user/* | |
304 | ||
305 | %files apidocs | |
306 | %defattr(644,root,root,755) | |
307 | %doc doc/api doc/developer doc/protocol |