]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
- release 2
[packages/mpd.git] / mpd.spec
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
9 Summary:        Music Player Daemon
10 Summary(hu.UTF-8):      Music Player Daemon
11 Summary(pl.UTF-8):      Music Player Daemon - demon odtwarzający muzykę
12 Name:           mpd
13 Version:        0.16.5
14 Release:        2
15 License:        GPL v2+
16 Group:          Applications/Multimedia
17 Source0:        http://downloads.sourceforge.net/musicpd/%{name}-%{version}.tar.bz2
18 # Source0-md5:  f7564cff12035f6a1112cce770655df7
19 Source1:        %{name}.conf
20 Source2:        %{name}.init
21 Source3:        %{name}.sysconfig
22 URL:            http://www.musicpd.org/
23 BuildRequires:  OpenAL-devel
24 BuildRequires:  alsa-lib-devel >= 0.9.0
25 %{?with_audiofile:BuildRequires:        audiofile-devel >= 0.1.7}
26 BuildRequires:  avahi-glib-devel
27 BuildRequires:  bzip2-devel
28 BuildRequires:  curl-devel
29 BuildRequires:  doxygen
30 BuildRequires:  faad2-devel >= 2.6.1-5
31 BuildRequires:  ffmpeg-devel
32 BuildRequires:  flac-devel >= 1.1.0
33 BuildRequires:  fluidsynth-devel
34 BuildRequires:  game-music-emu-devel
35 BuildRequires:  glib2-devel >= 2.12
36 BuildRequires:  jack-audio-connection-kit-devel >= 0.4
37 BuildRequires:  lame-libs-devel
38 BuildRequires:  libao-devel >= 0.8.3
39 BuildRequires:  libcdio-devel
40 BuildRequires:  libcue-devel
41 BuildRequires:  libid3tag-devel
42 BuildRequires:  libmad-devel
43 %{?with_mod:BuildRequires:      libmikmod-devel >= 3.1.7}
44 BuildRequires:  libmms-devel
45 BuildRequires:  libmodplug-devel
46 BuildRequires:  libmpcdec-devel
47 BuildRequires:  libogg-devel
48 BuildRequires:  libsamplerate-devel >= 0.0.15
49 BuildRequires:  libshout-devel
50 BuildRequires:  libvorbis-devel
51 BuildRequires:  pkgconfig >= 1:0.9.0
52 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel}
53 BuildRequires:  sqlite3-devel
54 BuildRequires:  twolame-devel
55 BuildRequires:  wavpack-devel
56 BuildRequires:  wildmidi-devel
57 BuildRequires:  xmlto
58 BuildRequires:  zlib-devel
59 BuildRequires:  zziplib-devel
60 Provides:       group(mpd)
61 Provides:       user(mpd)
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 Music Player Daemon (MPD) allows remote access for playing music (MP3,
66 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
67 MPD is designed for integrating a computer into a stereo system that
68 provides control for music playback over a local network. It is also
69 makes a great desktop music player, especially if you are a console
70 junkie, like frontend options, or restart X often.
71
72 %description -l hu.UTF-8
73 Music 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
75 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
76 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
77 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
78 sűrűn indítják újra az X-et.
79
80 %description -l pl.UTF-8
81 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
82 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
83 zarządzania playlistami. MPD jest zaprojektowany do integrowania
84 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
85 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
86 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
87 frontendów albo często restartujących X.
88
89 %package apidocs
90 Summary:        MPD API documentation
91 Summary(pl.UTF-8):      Dokumentacja API biblioteki API
92 Group:          Documentation
93
94 %description apidocs
95 API and internal documentation for MPD library.
96
97 %description apidocs -l pl.UTF-8
98 Dokumentacja API biblioteki MPD.
99
100 %package doc
101 Summary:        Documentation for Music Player Daemon (MPD)
102 Summary(fr.UTF-8):      Documentation pour Music Player Daemon (MPD)
103 Summary(it.UTF-8):      Documentazione di Music Player Daemon (MPD)
104 Summary(pl.UTF-8):      Podręcznik dla Music Player Daemon (MPD)
105 Group:          Documentation
106
107 %description doc
108 Documentation for Music Player Daemon (MPD).
109
110 %description doc -l fr.UTF-8
111 Documentation pour Music Player Daemon (MPD).
112
113 %description doc -l it.UTF-8
114 Documentazione di Music Player Daemon (MPD).
115
116 %description doc -l pl.UTF-8
117 Dokumentacja do Music Player Daemon (MPD).
118
119 %prep
120 %setup -q
121
122 %build
123 # ac_cv_* hacks to avoid unwanted linking
124 GME_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
167 rm -rf $RPM_BUILD_ROOT
168 install -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
174 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
175 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
176 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
177
178 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
179 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
180 touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
181 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
182
183 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
184
185 %clean
186 rm -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
193 for 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
199 done
200 /sbin/chkconfig --add mpd
201
202 %preun
203 if [ "$1" = "0" ]; then
204         %service mpd stop
205         /sbin/chkconfig --del mpd
206 fi
207
208 %postun
209 if [ "$1" = "0" ]; then
210         %userremove mpd
211         %groupremove mpd
212 fi
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.216817 seconds and 4 git commands to generate.