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