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