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