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