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