]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
- release 2 (rebuild with libcdio 1.0.0)
[packages/mpd.git] / mpd.spec
1 # TODO:
2 # - add logrotate
3 #
4 # Conditional build:
5 %bcond_without  mod             # MOD support via libmikmod
6 %bcond_without  pulseaudio      # PulseAudio support
7 %bcond_without  audiofile       # Audiofile support (WAV and others)
8
9 Summary:        Music Player Daemon
10 Summary(pl.UTF-8):      Music Player Daemon - demon odtwarzający muzykę
11 Name:           mpd
12 Version:        0.20.12
13 Release:        2
14 License:        GPL v2+
15 Group:          Applications/Multimedia
16 Source0:        http://www.musicpd.org/download/mpd/0.20/%{name}-%{version}.tar.xz
17 # Source0-md5:  e622d76feb2f4eb3ffaaf8aa99b4364b
18 Source1:        %{name}.conf
19 Source2:        %{name}.init
20 Source3:        %{name}.sysconfig
21 Source4:        %{name}.tmpfiles
22 Patch0:         %{name}-mpcsv8.patch
23 URL:            http://www.musicpd.org/
24 BuildRequires:  OpenAL-devel
25 BuildRequires:  adplug-devel
26 BuildRequires:  alsa-lib-devel >= 0.9.0
27 %{?with_audiofile:BuildRequires:        audiofile-devel >= 0.3}
28 BuildRequires:  autoconf >= 2.60
29 BuildRequires:  automake >= 1:1.11
30 BuildRequires:  avahi-devel
31 BuildRequires:  boost-devel >= 1.54
32 BuildRequires:  bzip2-devel
33 BuildRequires:  curl-devel >= 7.18
34 BuildRequires:  dbus-devel
35 BuildRequires:  doxygen
36 BuildRequires:  expat-devel
37 BuildRequires:  faad2-devel >= 2.6.1-5
38 BuildRequires:  ffmpeg-devel >= 0.8.0
39 BuildRequires:  flac-devel >= 1.2.0
40 BuildRequires:  fluidsynth-devel >= 1.1
41 BuildRequires:  game-music-emu-devel
42 BuildRequires:  gcc >= 6:4.7
43 BuildRequires:  glib2-devel >= 1:2.28.0
44 BuildRequires:  jack-audio-connection-kit-devel >= 0.100
45 BuildRequires:  lame-libs-devel
46 BuildRequires:  libao-devel >= 0.8.3
47 BuildRequires:  libcdio-devel
48 BuildRequires:  libcdio-paranoia-devel
49 BuildRequires:  libcue-devel
50 BuildRequires:  libicu-devel
51 BuildRequires:  libid3tag-devel
52 BuildRequires:  libmad-devel
53 %{?with_mod:BuildRequires:      libmikmod-devel >= 3.1.7}
54 BuildRequires:  libmms-devel >= 0.4
55 BuildRequires:  libmodplug-devel
56 BuildRequires:  libmpdclient-devel >= 2.2
57 BuildRequires:  libmpg123-devel
58 BuildRequires:  libnfs-devel
59 BuildRequires:  libogg-devel
60 BuildRequires:  libsamplerate-devel >= 0.1.3
61 BuildRequires:  libshout-devel
62 BuildRequires:  libsidplay2-devel >= 2.1.1-5
63 BuildRequires:  libsmbclient-devel >= 0.2
64 BuildRequires:  libsndfile-devel
65 BuildRequires:  libstdc++-devel >= 0.2
66 BuildRequires:  libupnp-devel
67 BuildRequires:  libvorbis-devel
68 BuildRequires:  libwrap-devel
69 BuildRequires:  musepack-devel
70 BuildRequires:  opus-devel
71 BuildRequires:  pkgconfig >= 1:0.9.0
72 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel >= 0.9.16}
73 BuildRequires:  rpmbuild(macros) >= 1.629-2
74 BuildRequires:  shine-devel >= 3.1
75 BuildRequires:  soxr-devel
76 BuildRequires:  sqlite3-devel >= 3.7.3
77 BuildRequires:  systemd-devel
78 BuildRequires:  twolame-devel
79 BuildRequires:  wavpack-devel
80 BuildRequires:  wildmidi-devel
81 BuildRequires:  xmlto
82 BuildRequires:  yajl-devel >= 2.0
83 BuildRequires:  zlib-devel
84 BuildRequires:  zziplib-devel >= 0.13
85 Requires(post,preun,postun):    systemd-units >= 38
86 Requires:       alsa-lib >= 0.9.0
87 %{?with_audiofile:Requires:     audiofile >= 0.3}
88 Requires:       curl-libs >= 7.18
89 Requires:       faad2-libs >= 2.6.1-5
90 Requires:       ffmpeg-libs >= 0.8.0
91 Requires:       flac >= 1.2.0
92 Requires:       fluidsynth >= 1.1
93 Requires:       glib2 >= 1:2.28.0
94 Requires:       jack-audio-connection-kit-libs >= 0.100
95 Requires:       libao >= 0.8.3
96 %{?with_mod:Requires:   libmikmod >= 3.1.7}
97 Requires:       libmms >= 0.4
98 Requires:       libmpdclient >= 2.2
99 Requires:       libsamplerate >= 0.1.3
100 Requires:       libsidplay2 >= 2.1.1-5
101 Requires:       libsmbclient >= 0.2
102 %{?with_pulseaudio:Requires:    pulseaudio-libs >= 0.9.16}
103 Requires:       shine >= 3.1
104 Requires:       sqlite3 >= 3.7.3
105 Requires:       systemd-units >= 38
106 Requires:       yajl >= 2.0
107 Requires:       zziplib >= 0.13
108 Provides:       group(mpd)
109 Provides:       user(mpd)
110 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
111
112 %description
113 Music Player Daemon (MPD) allows remote access for playing music (MP3,
114 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
115 MPD is designed for integrating a computer into a stereo system that
116 provides control for music playback over a local network. It is also
117 makes a great desktop music player, especially if you are a console
118 junkie, like frontend options, or restart X often.
119
120 %description -l hu.UTF-8
121 Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
122 (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
123 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
124 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
125 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
126 sűrűn indítják újra az X-et.
127
128 %description -l pl.UTF-8
129 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
130 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
131 zarządzania playlistami. MPD jest zaprojektowany do integrowania
132 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
133 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
134 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
135 frontendów albo często restartujących X.
136
137 %package apidocs
138 Summary:        MPD API documentation
139 Summary(pl.UTF-8):      Dokumentacja API biblioteki API
140 Group:          Documentation
141 %if "%{_rpmversion}" >= "5"
142 BuildArch:      noarch
143 %endif
144
145 %description apidocs
146 API and internal documentation for MPD library.
147
148 %description apidocs -l pl.UTF-8
149 Dokumentacja API biblioteki MPD.
150
151 %package doc
152 Summary:        Documentation for Music Player Daemon (MPD)
153 Summary(fr.UTF-8):      Documentation pour Music Player Daemon (MPD)
154 Summary(it.UTF-8):      Documentazione di Music Player Daemon (MPD)
155 Summary(pl.UTF-8):      Podręcznik dla Music Player Daemon (MPD)
156 Group:          Documentation
157
158 %description doc
159 Documentation for Music Player Daemon (MPD).
160
161 %description doc -l fr.UTF-8
162 Documentation pour Music Player Daemon (MPD).
163
164 %description doc -l it.UTF-8
165 Documentazione di Music Player Daemon (MPD).
166
167 %description doc -l pl.UTF-8
168 Dokumentacja do Music Player Daemon (MPD).
169
170 %prep
171 %setup -q
172 %patch0 -p1
173
174 %build
175 %{__aclocal} -I m4
176 %{__autoconf}
177 %{__autoheader}
178 %{__automake}
179 # ac_cv_* hacks to avoid unwanted linking
180 GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
181 %configure \
182         ac_cv_lib_iconv_main=no \
183         ac_cv_lib_nsl_gethostbyname=no \
184         %{!?with_pulseaudio:--disable-pulse} \
185         %{?with_mod:--enable-mikmod} \
186         --enable-adplug \
187         --enable-alsa \
188         --enable-ao \
189         %{?with_audiofile:--enable-audiofile} \
190         --enable-bzip2 \
191         --enable-cdio-paranoia \
192         --enable-curl \
193         --enable-database \
194         --enable-documentation \
195         --enable-dsd \
196         --enable-expat \
197         --enable-ffmpeg \
198         --enable-fifo \
199         --enable-flac \
200         --enable-fluidsynth \
201         --enable-gme \
202         --enable-httpd-output \
203         --enable-icu \
204         --enable-id3 \
205         --enable-inotify \
206         --enable-ipv6 \
207         --enable-iso9660 \
208         --enable-jack \
209         --enable-lame-encoder \
210         --enable-libmpdclient \
211         --enable-libwrap \
212         --enable-lsr \
213         --enable-mad \
214         --enable-mikmod \
215         --enable-mms \
216         --enable-modplug \
217         --enable-mpc \
218         --enable-nfs \
219         --enable-openal \
220         --enable-opus \
221         --enable-oss \
222         --enable-pipe-output \
223         --enable-recorder-output \
224         --enable-sidplay \
225         --enable-shine-encoder \
226         --enable-shout \
227         --enable-smbclient \
228         --enable-sndfile \
229         --enable-soundcloud \
230         --enable-soxr \
231         --enable-sqlite \
232         --enable-systemd-daemon \
233         --enable-tcp \
234         --enable-twolame-encoder \
235         --enable-upnp \
236         --enable-un \
237         --enable-vorbis \
238         --enable-vorbis-encoder \
239         --enable-wave-encoder \
240         --enable-wavpack \
241         --enable-wildmidi \
242         --enable-zlib \
243         --enable-zzip \
244         --with-zeroconf=avahi \
245         --without-tremor \
246         --with-systemdsystemunitdir=%{systemdunitdir}
247 %{__make}
248
249 %install
250 rm -rf $RPM_BUILD_ROOT
251 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
252         $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
253         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
254
255 %{__make} install \
256         DESTDIR=$RPM_BUILD_ROOT
257
258 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
259 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
260 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
261 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
262
263 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
264 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
265 touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
266 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
267
268 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
269
270 %clean
271 rm -rf $RPM_BUILD_ROOT
272
273 %pre
274 %groupadd -g 204 mpd
275 %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
276
277 %post
278 for f in mpd.log; do
279         if [ ! -f /var/log/%{name}/$f ]; then
280                 touch /var/log/%{name}/$f
281                 chown mpd:mpd /var/log/%{name}/$f
282                 chmod 644 /var/log/%{name}/$f
283         fi
284 done
285 /sbin/chkconfig --add mpd
286 %systemd_post %{name}.service %{name}.socket
287
288 %preun
289 if [ "$1" = "0" ]; then
290         %service mpd stop
291         /sbin/chkconfig --del mpd
292 fi
293 %systemd_preun %{name}.service %{name}.socket
294
295 %postun
296 if [ "$1" = "0" ]; then
297         %userremove mpd
298         %groupremove mpd
299 fi
300 %systemd_reload
301
302 %triggerpostun -- %{name} < 0.16.6-1
303 %systemd_trigger %{name}.service
304
305 %files
306 %defattr(644,root,root,755)
307 %doc AUTHORS NEWS README.md doc/mpdconf.example
308 %attr(755,root,root) %{_bindir}/*
309 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
310 %attr(754,root,root) /etc/rc.d/init.d/mpd
311 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
312 %{systemdtmpfilesdir}/%{name}.conf
313 %{systemdunitdir}/mpd.service
314 %{systemdunitdir}/mpd.socket
315 %dir %attr(770,root,mpd) /var/lib/%{name}
316 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
317 %dir %attr(751,root,root) /var/log/%{name}
318 %dir %attr(770,root,mpd) /var/run/%{name}
319 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
320 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
321 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
322 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
323 %{_mandir}/man1/mpd.1*
324 %{_mandir}/man5/mpd.conf.5*
325
326 %files doc
327 %defattr(644,root,root,755)
328 %doc doc/user/*
329
330 %files apidocs
331 %defattr(644,root,root,755)
332 %doc doc/api doc/developer doc/protocol
This page took 0.067906 seconds and 3 git commands to generate.