]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
- libcdio related rebuild
[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
a02ba84a 13Version: 0.18.16
064ecf96 14Release: 2
dbce58e4 15License: GPL v2+
c7dcdf50 16Group: Applications/Multimedia
735ff9d7 17Source0: http://www.musicpd.org/download/mpd/0.18/%{name}-%{version}.tar.xz
a02ba84a 18# Source0-md5: 900657ff55726f4cc09a27eb7df57015
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
356a7f8f 28%{?with_audiofile:BuildRequires: audiofile-devel >= 0.1.7}
735ff9d7 29BuildRequires: autoconf >= 2.60
5125f9d8
AF
30BuildRequires: avahi-glib-devel
31BuildRequires: bzip2-devel
424f04d1 32BuildRequires: curl-devel
5125f9d8 33BuildRequires: doxygen
158342a8 34BuildRequires: faad2-devel >= 2.6.1-5
424f04d1 35BuildRequires: ffmpeg-devel
c7dcdf50 36BuildRequires: flac-devel >= 1.1.0
5125f9d8 37BuildRequires: fluidsynth-devel
296a7717 38BuildRequires: game-music-emu-devel
4351e719 39BuildRequires: glib2-devel >= 2.12
3523369e 40BuildRequires: jack-audio-connection-kit-devel >= 0.4
424f04d1 41BuildRequires: lame-libs-devel
c7dcdf50 42BuildRequires: libao-devel >= 0.8.3
5125f9d8 43BuildRequires: libcdio-devel
33e45e33 44BuildRequires: libcue-devel
c7dcdf50
AF
45BuildRequires: libid3tag-devel
46BuildRequires: libmad-devel
424f04d1 47%{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7}
415aa00e 48BuildRequires: libmms-devel
5125f9d8 49BuildRequires: libmodplug-devel
c7dcdf50 50BuildRequires: libogg-devel
3523369e 51BuildRequires: libsamplerate-devel >= 0.0.15
38f95112 52BuildRequires: libshout-devel
fb2724cc 53BuildRequires: libsidplay2-devel >= 2.1.1-5
c7dcdf50 54BuildRequires: libvorbis-devel
735ff9d7 55BuildRequires: musepack-devel
3523369e 56BuildRequires: pkgconfig >= 1:0.9.0
d63dca03 57%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
a8b30e82 58BuildRequires: rpmbuild(macros) >= 1.629-2
5125f9d8 59BuildRequires: sqlite3-devel
4351e719 60BuildRequires: twolame-devel
5125f9d8
AF
61BuildRequires: wavpack-devel
62BuildRequires: wildmidi-devel
63BuildRequires: xmlto
f756cffc 64BuildRequires: yajl-devel >= 2.0
c7dcdf50 65BuildRequires: zlib-devel
5125f9d8 66BuildRequires: zziplib-devel
195b8128
JR
67Requires(post,preun,postun): systemd-units >= 38
68Requires: systemd-units >= 38
31afabcf
ZU
69Provides: group(mpd)
70Provides: user(mpd)
c7dcdf50
AF
71BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73%description
87d7b893
JB
74Music Player Daemon (MPD) allows remote access for playing music (MP3,
75Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
76MPD is designed for integrating a computer into a stereo system that
77provides control for music playback over a local network. It is also
78makes a great desktop music player, especially if you are a console
79junkie, like frontend options, or restart X often.
80
31afabcf
ZU
81%description -l hu.UTF-8
82Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
83(MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
84menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
85irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
86zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
87sűrűn indítják újra az X-et.
88
f7293765
JR
89%description -l pl.UTF-8
90Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
91muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
92zarządzania playlistami. MPD jest zaprojektowany do integrowania
93komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
94w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
95komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
96frontendów albo często restartujących X.
c7dcdf50 97
5412b34a
ER
98%package apidocs
99Summary: MPD API documentation
100Summary(pl.UTF-8): Dokumentacja API biblioteki API
101Group: Documentation
102
103%description apidocs
104API and internal documentation for MPD library.
105
106%description apidocs -l pl.UTF-8
107Dokumentacja API biblioteki MPD.
108
109%package doc
110Summary: Documentation for Music Player Daemon (MPD)
111Summary(fr.UTF-8): Documentation pour Music Player Daemon (MPD)
112Summary(it.UTF-8): Documentazione di Music Player Daemon (MPD)
113Summary(pl.UTF-8): Podręcznik dla Music Player Daemon (MPD)
114Group: Documentation
115
116%description doc
117Documentation for Music Player Daemon (MPD).
118
119%description doc -l fr.UTF-8
120Documentation pour Music Player Daemon (MPD).
121
122%description doc -l it.UTF-8
123Documentazione di Music Player Daemon (MPD).
124
125%description doc -l pl.UTF-8
126Dokumentacja do Music Player Daemon (MPD).
127
c7dcdf50 128%prep
99bf80d6 129%setup -q
362076bc 130%patch0 -p1
c7dcdf50
AF
131
132%build
735ff9d7
JP
133%{__aclocal} -I m4
134%{__autoconf}
135%{__autoheader}
136%{__automake}
3523369e 137# ac_cv_* hacks to avoid unwanted linking
296a7717 138GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
d9401207 139%configure \
3523369e
JB
140 ac_cv_lib_iconv_main=no \
141 ac_cv_lib_nsl_gethostbyname=no \
d63dca03 142 %{!?with_pulseaudio:--disable-pulse} \
5125f9d8 143 %{?with_mod:--enable-mikmod} \
e5c81e34 144 --enable-sidplay \
f756cffc 145 --enable-adplug \
5125f9d8
AF
146 --enable-alsa \
147 --enable-ao \
356a7f8f 148 %{?with_audiofile:--enable-audiofile} \
5125f9d8
AF
149 --enable-bzip2 \
150 --enable-curl \
151 --enable-documentation \
152 --enable-ffmpeg \
153 --enable-fluidsynth \
296a7717 154 --enable-gme \
5125f9d8
AF
155 --enable-httpd-output \
156 --enable-iso9660 \
157 --enable-jack \
158 --enable-lame-encoder \
5125f9d8
AF
159 --enable-lsr \
160 --enable-mad \
161 --enable-mms \
162 --enable-modplug \
4351e719
JP
163 --enable-openal \
164 --enable-pipe-output \
165 --enable-recorder-output \
5125f9d8 166 --enable-shout \
f756cffc 167 --enable-soundcloud \
5125f9d8 168 --enable-sqlite \
4351e719 169 --enable-twolame-encoder \
5125f9d8 170 --enable-vorbis-encoder \
4351e719 171 --enable-wave-encoder \
5125f9d8
AF
172 --enable-wavpack \
173 --enable-wildmidi \
4351e719 174 --enable-zzip \
5125f9d8 175 --with-zeroconf=avahi \
a8b30e82
AF
176 --without-tremor \
177 --with-systemdsystemunitdir=%{systemdunitdir}
c7dcdf50
AF
178%{__make}
179
180%install
181rm -rf $RPM_BUILD_ROOT
9cf1eba3 182install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
be963cbe 183 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
fb2724cc 184 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
c7dcdf50
AF
185
186%{__make} install \
187 DESTDIR=$RPM_BUILD_ROOT
fb44ab11 188
9cf1eba3
ER
189cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
190install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
191cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
fb2724cc 192install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
c7dcdf50 193
424f04d1 194touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
195touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
196touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 197touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
424f04d1 198
1ac45cec 199%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
5125f9d8 200
c7dcdf50
AF
201%clean
202rm -rf $RPM_BUILD_ROOT
203
31afabcf
ZU
204%pre
205%groupadd -g 204 mpd
fb2724cc 206%useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
31afabcf 207
fb6389fb 208%post
4351e719 209for f in mpd.log; do
424f04d1
KK
210 if [ ! -f /var/log/%{name}/$f ]; then
211 touch /var/log/%{name}/$f
212 chown mpd:mpd /var/log/%{name}/$f
213 chmod 644 /var/log/%{name}/$f
214 fi
215done
fb6389fb 216/sbin/chkconfig --add mpd
a8b30e82 217%systemd_post %{name}.service
fb6389fb
ZU
218
219%preun
220if [ "$1" = "0" ]; then
221 %service mpd stop
99bf80d6 222 /sbin/chkconfig --del mpd
fb6389fb 223fi
a8b30e82 224%systemd_preun %{name}.service
fb6389fb 225
31afabcf
ZU
226%postun
227if [ "$1" = "0" ]; then
228 %userremove mpd
229 %groupremove mpd
230fi
a8b30e82
AF
231%systemd_reload
232
233%triggerpostun -- %{name} < 0.16.6-1
234%systemd_trigger %{name}.service
31afabcf 235
c7dcdf50
AF
236%files
237%defattr(644,root,root,755)
5412b34a 238%doc AUTHORS NEWS README doc/mpdconf.example UPGRADING
c7dcdf50 239%attr(755,root,root) %{_bindir}/*
fb44ab11
JB
240%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
241%attr(754,root,root) /etc/rc.d/init.d/mpd
9cf1eba3 242%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
fb2724cc 243%{systemdtmpfilesdir}/%{name}.conf
a8b30e82 244%{systemdunitdir}/mpd.service
424f04d1
KK
245%dir %attr(770,root,mpd) /var/lib/%{name}
246%dir %attr(770,root,mpd) /var/lib/%{name}/playlists
247%dir %attr(751,root,root) /var/log/%{name}
248%dir %attr(770,root,mpd) /var/run/%{name}
249%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
4351e719
JP
250%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
251%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
424f04d1 252%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
c7dcdf50 253%{_mandir}/man1/mpd.1*
80d0dd8f 254%{_mandir}/man5/mpd.conf.5*
5412b34a
ER
255
256%files doc
257%defattr(644,root,root,755)
258%doc doc/user/*
259
260%files apidocs
261%defattr(644,root,root,755)
262%doc doc/api doc/developer doc/protocol
This page took 0.071442 seconds and 4 git commands to generate.