]> git.pld-linux.org Git - packages/mpd.git/blame - mpd.spec
- add systemd tmpfiles config
[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
ea3b33dc 13Version: 0.16.5
1e8c5a68 14Release: 3
dbce58e4 15License: GPL v2+
c7dcdf50 16Group: Applications/Multimedia
25bb7e51 17Source0: http://downloads.sourceforge.net/musicpd/%{name}-%{version}.tar.bz2
ea3b33dc 18# Source0-md5: f7564cff12035f6a1112cce770655df7
31afabcf 19Source1: %{name}.conf
fb6389fb 20Source2: %{name}.init
9cf1eba3 21Source3: %{name}.sysconfig
c7dcdf50 22URL: http://www.musicpd.org/
4351e719 23BuildRequires: OpenAL-devel
3523369e 24BuildRequires: alsa-lib-devel >= 0.9.0
356a7f8f 25%{?with_audiofile:BuildRequires: audiofile-devel >= 0.1.7}
5125f9d8
AF
26BuildRequires: avahi-glib-devel
27BuildRequires: bzip2-devel
424f04d1 28BuildRequires: curl-devel
5125f9d8 29BuildRequires: doxygen
158342a8 30BuildRequires: faad2-devel >= 2.6.1-5
424f04d1 31BuildRequires: ffmpeg-devel
c7dcdf50 32BuildRequires: flac-devel >= 1.1.0
5125f9d8 33BuildRequires: fluidsynth-devel
296a7717 34BuildRequires: game-music-emu-devel
4351e719 35BuildRequires: glib2-devel >= 2.12
3523369e 36BuildRequires: jack-audio-connection-kit-devel >= 0.4
424f04d1 37BuildRequires: lame-libs-devel
c7dcdf50 38BuildRequires: libao-devel >= 0.8.3
5125f9d8 39BuildRequires: libcdio-devel
33e45e33 40BuildRequires: libcue-devel
c7dcdf50
AF
41BuildRequires: libid3tag-devel
42BuildRequires: libmad-devel
424f04d1 43%{?with_mod:BuildRequires: libmikmod-devel >= 3.1.7}
415aa00e 44BuildRequires: libmms-devel
5125f9d8 45BuildRequires: libmodplug-devel
8f2c0c52 46BuildRequires: libmpcdec-devel
c7dcdf50 47BuildRequires: libogg-devel
3523369e 48BuildRequires: libsamplerate-devel >= 0.0.15
38f95112 49BuildRequires: libshout-devel
c7dcdf50 50BuildRequires: libvorbis-devel
3523369e 51BuildRequires: pkgconfig >= 1:0.9.0
d63dca03 52%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
5125f9d8 53BuildRequires: sqlite3-devel
4351e719 54BuildRequires: twolame-devel
5125f9d8
AF
55BuildRequires: wavpack-devel
56BuildRequires: wildmidi-devel
57BuildRequires: xmlto
c7dcdf50 58BuildRequires: zlib-devel
5125f9d8 59BuildRequires: zziplib-devel
31afabcf
ZU
60Provides: group(mpd)
61Provides: user(mpd)
c7dcdf50
AF
62BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64%description
87d7b893
JB
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
31afabcf
ZU
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
f7293765
JR
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.
c7dcdf50 88
5412b34a
ER
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
c7dcdf50 119%prep
99bf80d6 120%setup -q
c7dcdf50
AF
121
122%build
3523369e 123# ac_cv_* hacks to avoid unwanted linking
296a7717 124GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
d9401207 125%configure \
3523369e
JB
126 ac_cv_lib_iconv_main=no \
127 ac_cv_lib_nsl_gethostbyname=no \
d63dca03 128 %{!?with_pulseaudio:--disable-pulse} \
5125f9d8
AF
129 %{?with_mod:--enable-mikmod} \
130 --disable-sidplay \
131 --enable-alsa \
132 --enable-ao \
356a7f8f 133 %{?with_audiofile:--enable-audiofile} \
5125f9d8 134 --enable-bzip2 \
33e45e33 135 --enable-cue \
5125f9d8
AF
136 --enable-curl \
137 --enable-documentation \
138 --enable-ffmpeg \
139 --enable-fluidsynth \
296a7717 140 --enable-gme \
5125f9d8
AF
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 \
4351e719
JP
151 --enable-openal \
152 --enable-pipe-output \
153 --enable-recorder-output \
5125f9d8
AF
154 --enable-shout \
155 --enable-sqlite \
4351e719 156 --enable-twolame-encoder \
5125f9d8 157 --enable-vorbis-encoder \
4351e719 158 --enable-wave-encoder \
5125f9d8
AF
159 --enable-wavpack \
160 --enable-wildmidi \
4351e719 161 --enable-zzip \
5125f9d8 162 --with-zeroconf=avahi \
194c7061 163 --without-tremor
c7dcdf50
AF
164%{__make}
165
166%install
167rm -rf $RPM_BUILD_ROOT
9cf1eba3 168install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
424f04d1 169 $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd}
c7dcdf50
AF
170
171%{__make} install \
172 DESTDIR=$RPM_BUILD_ROOT
fb44ab11 173
9cf1eba3
ER
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
c7dcdf50 177
424f04d1 178touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
4351e719
JP
179touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
180touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
424f04d1 181touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
424f04d1 182
1ac45cec 183%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
5125f9d8 184
c7dcdf50
AF
185%clean
186rm -rf $RPM_BUILD_ROOT
187
31afabcf
ZU
188%pre
189%groupadd -g 204 mpd
88b08939 190%useradd -u 204 -r -d /home/services/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
31afabcf 191
fb6389fb 192%post
4351e719 193for f in mpd.log; do
424f04d1
KK
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
fb6389fb
ZU
200/sbin/chkconfig --add mpd
201
202%preun
203if [ "$1" = "0" ]; then
204 %service mpd stop
99bf80d6 205 /sbin/chkconfig --del mpd
fb6389fb
ZU
206fi
207
31afabcf
ZU
208%postun
209if [ "$1" = "0" ]; then
210 %userremove mpd
211 %groupremove mpd
212fi
213
c7dcdf50
AF
214%files
215%defattr(644,root,root,755)
5412b34a 216%doc AUTHORS NEWS README doc/mpdconf.example UPGRADING
c7dcdf50 217%attr(755,root,root) %{_bindir}/*
fb44ab11
JB
218%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
219%attr(754,root,root) /etc/rc.d/init.d/mpd
9cf1eba3 220%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
424f04d1
KK
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
4351e719
JP
226%attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
227%attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
424f04d1 228%attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
c7dcdf50 229%{_mandir}/man1/mpd.1*
80d0dd8f 230%{_mandir}/man5/mpd.conf.5*
5412b34a
ER
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.078411 seconds and 4 git commands to generate.