]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
up to 0.19.20
[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
9ec70c0a 13Version: 0.19.20
e7955853 14Release: 1
dbce58e4 15License: GPL v2+
c7dcdf50 16Group: Applications/Multimedia
a8aa6145 17Source0: http://www.musicpd.org/download/mpd/0.19/%{name}-%{version}.tar.xz
9ec70c0a 18# Source0-md5: e16e936ad70ee37403c9a7f4165cc743
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
24a381c6 39BuildRequires: ffmpeg-devel >= 0.8.0
a8aa6145
JP
40BuildRequires: flac-devel >= 1.2.0
41BuildRequires: fluidsynth-devel >= 1.1
296a7717 42BuildRequires: game-music-emu-devel
24a381c6 43BuildRequires: gcc >= 6:4.7
a8aa6145 44BuildRequires: glib2-devel >= 1:2.28.0
a8aa6145 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
387493e6 51BuildRequires: libicu-devel
c7dcdf50
AF
52BuildRequires: libid3tag-devel
53BuildRequires: libmad-devel
424f04d1 54%{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7}
a8aa6145 55BuildRequires: libmms-devel >= 0.4
5125f9d8 56BuildRequires: libmodplug-devel
a8aa6145
JP
57BuildRequires: libmpdclient-devel >= 2.2
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
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
eec98461
ER
120%if "%{_rpmversion}" >= "5"
121BuildArch: noarch
122%endif
5412b34a
ER
123
124%description apidocs
125API and internal documentation for MPD library.
126
127%description apidocs -l pl.UTF-8
128Dokumentacja API biblioteki MPD.
129
130%package doc
131Summary: Documentation for Music Player Daemon (MPD)
132Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD)
133Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD)
134Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD)
135Group: Documentation
136
137%description doc
138Documentation for Music Player Daemon (MPD).
139
140%description doc -l fr.UTF-8
141Documentation pour Music Player Daemon (MPD).
142
143%description doc -l it.UTF-8
144Documentazione di Music Player Daemon (MPD).
145
146%description doc -l pl.UTF-8
147Dokumentacja 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 159GME_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
229rm -rf $RPM_BUILD_ROOT
9cf1eba3 230install -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
237cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
238install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
239cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
387493e6 240cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
c7dcdf50 241
424f04d1 242touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
243touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
244touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 245touch $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
250rm -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 257for 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
263done
fb6389fb 264/sbin/chkconfig --add mpd
a8aa6145 265%systemd_post %{name}.service %{name}.socket
fb6389fb
ZU
266
267%preun
268if [ "$1" = "0" ]; then
269 %service mpd stop
99bf80d6 270 /sbin/chkconfig --del mpd
fb6389fb 271fi
a8aa6145 272%systemd_preun %{name}.service %{name}.socket
fb6389fb 273
31afabcf
ZU
274%postun
275if [ "$1" = "0" ]; then
276 %userremove mpd
277 %groupremove mpd
278fi
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
This page took 0.111801 seconds and 4 git commands to generate.