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