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