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