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