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