]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
- up to 0.19.5
[packages/mpd.git] / mpd.spec
CommitLineData
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 9Summary: Music Player Daemon
31afabcf 10Summary(hu.UTF-8): Music Player Daemon
6ae29a87 11Summary(pl.UTF-8): Music Player Daemon - demon odtwarzający muzykę
c7dcdf50 12Name: mpd
37a1b5ba 13Version: 0.19.5
a8aa6145 14Release: 1
dbce58e4 15License: GPL v2+
c7dcdf50 16Group: Applications/Multimedia
a8aa6145 17Source0: http://www.musicpd.org/download/mpd/0.19/%{name}-%{version}.tar.xz
37a1b5ba 18# Source0-md5: dd3d2088205dc5f8fb4b6768ed7d9f5c
31afabcf 19Source1: %{name}.conf
fb6389fb 20Source2: %{name}.init
9cf1eba3 21Source3: %{name}.sysconfig
be963cbe 22Source4: %{name}.tmpfiles
4bdc1a1d 23Patch0: %{name}-mpcsv8.patch
c7dcdf50 24URL: http://www.musicpd.org/
4351e719 25BuildRequires: OpenAL-devel
f756cffc 26BuildRequires: adplug-devel
3523369e 27BuildRequires: alsa-lib-devel >= 0.9.0
a8aa6145 28%{?with_audiofile:BuildRequires: audiofile-devel >= 0.3}
735ff9d7 29BuildRequires: autoconf >= 2.60
a8aa6145
JP
30BuildRequires: automake >= 1:1.11
31BuildRequires: avahi-devel
32BuildRequires: boost-devel >= 1.54
5125f9d8 33BuildRequires: bzip2-devel
a8aa6145
JP
34BuildRequires: curl-devel >= 7.18
35BuildRequires: dbus-devel
5125f9d8 36BuildRequires: doxygen
a8aa6145 37BuildRequires: expat-devel
158342a8 38BuildRequires: faad2-devel >= 2.6.1-5
424f04d1 39BuildRequires: ffmpeg-devel
a8aa6145
JP
40BuildRequires: flac-devel >= 1.2.0
41BuildRequires: fluidsynth-devel >= 1.1
296a7717 42BuildRequires: game-music-emu-devel
a8aa6145
JP
43BuildRequires: glib2-devel >= 1:2.28.0
44BuildRequires: harfbuzz-icu-devel
45BuildRequires: jack-audio-connection-kit-devel >= 0.100
424f04d1 46BuildRequires: lame-libs-devel
c7dcdf50 47BuildRequires: libao-devel >= 0.8.3
5125f9d8 48BuildRequires: libcdio-devel
a8aa6145 49BuildRequires: libcdio-paranoia-devel
33e45e33 50BuildRequires: libcue-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
JP
56BuildRequires: libmpdclient-devel >= 2.2
57BuildRequires: libnfs-devel
c7dcdf50 58BuildRequires: libogg-devel
a8aa6145 59BuildRequires: libsamplerate-devel >= 0.1.3
38f95112 60BuildRequires: libshout-devel
fb2724cc 61BuildRequires: libsidplay2-devel >= 2.1.1-5
a8aa6145
JP
62BuildRequires: libsmbclient-devel >= 0.2
63BuildRequires: libsndfile-devel
64BuildRequires: libstdc++-devel >= 0.2
65BuildRequires: libupnp-devel
66BuildRequires: libwrap-devel
c7dcdf50 67BuildRequires: libvorbis-devel
735ff9d7 68BuildRequires: musepack-devel
a8aa6145 69BuildRequires: opus-devel
3523369e 70BuildRequires: pkgconfig >= 1:0.9.0
a8aa6145 71%{?with_pulseaudio:BuildRequires: pulseaudio-devel >= 0.9.16}
a8b30e82 72BuildRequires: rpmbuild(macros) >= 1.629-2
a8aa6145
JP
73BuildRequires: shine-devel >= 3.1
74BuildRequires: soxr-devel
5125f9d8 75BuildRequires: sqlite3-devel
a8aa6145 76BuildRequires: systemd-devel
4351e719 77BuildRequires: twolame-devel
5125f9d8
AF
78BuildRequires: wavpack-devel
79BuildRequires: wildmidi-devel
80BuildRequires: xmlto
f756cffc 81BuildRequires: yajl-devel >= 2.0
c7dcdf50 82BuildRequires: zlib-devel
a8aa6145 83BuildRequires: zziplib-devel >= 0.13
195b8128
JR
84Requires(post,preun,postun): systemd-units >= 38
85Requires: systemd-units >= 38
31afabcf
ZU
86Provides: group(mpd)
87Provides: user(mpd)
c7dcdf50
AF
88BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89
90%description
87d7b893
JB
91Music Player Daemon (MPD) allows remote access for playing music (MP3,
92Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
93MPD is designed for integrating a computer into a stereo system that
94provides control for music playback over a local network. It is also
95makes a great desktop music player, especially if you are a console
96junkie, like frontend options, or restart X often.
97
31afabcf
ZU
98%description -l hu.UTF-8
99Music 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
101menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
102irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
103zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
104sűrűn indítják újra az X-et.
105
f7293765
JR
106%description -l pl.UTF-8
107Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
108muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
109zarządzania playlistami. MPD jest zaprojektowany do integrowania
110komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
111w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
112komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
113frontendów albo często restartujących X.
c7dcdf50 114
5412b34a
ER
115%package apidocs
116Summary: MPD API documentation
117Summary(pl.UTF-8): Dokumentacja API biblioteki API
118Group: Documentation
119
120%description apidocs
121API and internal documentation for MPD library.
122
123%description apidocs -l pl.UTF-8
124Dokumentacja API biblioteki MPD.
125
126%package doc
127Summary: Documentation for Music Player Daemon (MPD)
128Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD)
129Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD)
130Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD)
131Group: Documentation
132
133%description doc
134Documentation for Music Player Daemon (MPD).
135
136%description doc -l fr.UTF-8
137Documentation pour Music Player Daemon (MPD).
138
139%description doc -l it.UTF-8
140Documentazione di Music Player Daemon (MPD).
141
142%description doc -l pl.UTF-8
143Dokumentacja 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 155GME_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
225rm -rf $RPM_BUILD_ROOT
9cf1eba3 226install -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
233cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
234install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
235cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
fb2724cc 236install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
c7dcdf50 237
424f04d1 238touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
239touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
240touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 241touch $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
246rm -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 253for 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
259done
fb6389fb 260/sbin/chkconfig --add mpd
a8aa6145 261%systemd_post %{name}.service %{name}.socket
fb6389fb
ZU
262
263%preun
264if [ "$1" = "0" ]; then
265 %service mpd stop
99bf80d6 266 /sbin/chkconfig --del mpd
fb6389fb 267fi
a8aa6145 268%systemd_preun %{name}.service %{name}.socket
fb6389fb 269
31afabcf
ZU
270%postun
271if [ "$1" = "0" ]; then
272 %userremove mpd
273 %groupremove mpd
274fi
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
This page took 0.675532 seconds and 4 git commands to generate.