]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
- up to 0.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
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:  770261630e6f086bd7d5b374abf521c0
19 Source1:        %{name}.conf
20 Source2:        %{name}.init
21 Source3:        %{name}.sysconfig
22 Source4:        %{name}.tmpfiles
23 Source5:        %{name}.socket
24 Patch0:         %{name}-mpcsv8.patch
25 URL:            http://www.musicpd.org/
26 BuildRequires:  OpenAL-devel
27 BuildRequires:  adplug-devel
28 BuildRequires:  alsa-lib-devel >= 0.9.0
29 %{?with_audiofile:BuildRequires:        audiofile-devel >= 0.3}
30 BuildRequires:  autoconf >= 2.60
31 BuildRequires:  automake >= 1:1.11
32 BuildRequires:  avahi-devel
33 BuildRequires:  boost-devel >= 1.54
34 BuildRequires:  bzip2-devel
35 BuildRequires:  curl-devel >= 7.18
36 BuildRequires:  dbus-devel
37 BuildRequires:  doxygen
38 BuildRequires:  expat-devel
39 BuildRequires:  faad2-devel >= 2.6.1-5
40 BuildRequires:  ffmpeg-devel
41 BuildRequires:  flac-devel >= 1.2.0
42 BuildRequires:  fluidsynth-devel >= 1.1
43 BuildRequires:  game-music-emu-devel
44 BuildRequires:  glib2-devel >= 1:2.28.0
45 BuildRequires:  harfbuzz-icu-devel
46 BuildRequires:  jack-audio-connection-kit-devel >= 0.100
47 BuildRequires:  lame-libs-devel
48 BuildRequires:  libao-devel >= 0.8.3
49 BuildRequires:  libcdio-devel
50 BuildRequires:  libcdio-paranoia-devel
51 BuildRequires:  libcue-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:  libwrap-devel
68 BuildRequires:  libvorbis-devel
69 BuildRequires:  mp4v2-devel
70 BuildRequires:  musepack-devel
71 BuildRequires:  opus-devel
72 BuildRequires:  pkgconfig >= 1:0.9.0
73 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel >= 0.9.16}
74 BuildRequires:  rpmbuild(macros) >= 1.629-2
75 BuildRequires:  shine-devel >= 3.1
76 BuildRequires:  soxr-devel
77 BuildRequires:  sqlite3-devel
78 BuildRequires:  systemd-devel
79 BuildRequires:  twolame-devel
80 BuildRequires:  wavpack-devel
81 BuildRequires:  wildmidi-devel
82 BuildRequires:  xmlto
83 BuildRequires:  yajl-devel >= 2.0
84 BuildRequires:  zlib-devel
85 BuildRequires:  zziplib-devel >= 0.13
86 Requires(post,preun,postun):    systemd-units >= 38
87 Requires:       systemd-units >= 38
88 Provides:       group(mpd)
89 Provides:       user(mpd)
90 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91
92 %description
93 Music Player Daemon (MPD) allows remote access for playing music (MP3,
94 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
95 MPD is designed for integrating a computer into a stereo system that
96 provides control for music playback over a local network. It is also
97 makes a great desktop music player, especially if you are a console
98 junkie, like frontend options, or restart X often.
99
100 %description -l hu.UTF-8
101 Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
102 (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
103 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
104 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
105 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
106 sűrűn indítják újra az X-et.
107
108 %description -l pl.UTF-8
109 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
110 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
111 zarządzania playlistami. MPD jest zaprojektowany do integrowania
112 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
113 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
114 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
115 frontendów albo często restartujących X.
116
117 %package apidocs
118 Summary:        MPD API documentation
119 Summary(pl.UTF-8):      Dokumentacja API biblioteki API
120 Group:          Documentation
121
122 %description apidocs
123 API and internal documentation for MPD library.
124
125 %description apidocs -l pl.UTF-8
126 Dokumentacja API biblioteki MPD.
127
128 %package doc
129 Summary:        Documentation for Music Player Daemon (MPD)
130 Summary(fr.UTF-8):      Documentation pour Music Player Daemon (MPD)
131 Summary(it.UTF-8):      Documentazione di Music Player Daemon (MPD)
132 Summary(pl.UTF-8):      Podręcznik dla Music Player Daemon (MPD)
133 Group:          Documentation
134
135 %description doc
136 Documentation for Music Player Daemon (MPD).
137
138 %description doc -l fr.UTF-8
139 Documentation pour Music Player Daemon (MPD).
140
141 %description doc -l it.UTF-8
142 Documentazione di Music Player Daemon (MPD).
143
144 %description doc -l pl.UTF-8
145 Dokumentacja do Music Player Daemon (MPD).
146
147 %prep
148 %setup -q
149 %patch0 -p1
150 cp -p %{SOURCE5} systemd
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-mp4v2 \
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 \
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-zeroconf \
222         --enable-zlib \
223         --enable-zzip \
224         --with-zeroconf=avahi \
225         --without-tremor \
226         --with-systemdsystemunitdir=%{systemdunitdir}
227 %{__make}
228
229 %install
230 rm -rf $RPM_BUILD_ROOT
231 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
232         $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
233         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
234
235 %{__make} install \
236         DESTDIR=$RPM_BUILD_ROOT
237
238 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
239 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
240 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
241 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
242
243 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
244 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
245 touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
246 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
247
248 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
249
250 %clean
251 rm -rf $RPM_BUILD_ROOT
252
253 %pre
254 %groupadd -g 204 mpd
255 %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
256
257 %post
258 for f in mpd.log; do
259         if [ ! -f /var/log/%{name}/$f ]; then
260                 touch /var/log/%{name}/$f
261                 chown mpd:mpd /var/log/%{name}/$f
262                 chmod 644 /var/log/%{name}/$f
263         fi
264 done
265 /sbin/chkconfig --add mpd
266 %systemd_post %{name}.service %{name}.socket
267
268 %preun
269 if [ "$1" = "0" ]; then
270         %service mpd stop
271         /sbin/chkconfig --del mpd
272 fi
273 %systemd_preun %{name}.service %{name}.socket
274
275 %postun
276 if [ "$1" = "0" ]; then
277         %userremove mpd
278         %groupremove mpd
279 fi
280 %systemd_reload
281
282 %triggerpostun -- %{name} < 0.16.6-1
283 %systemd_trigger %{name}.service
284
285 %files
286 %defattr(644,root,root,755)
287 %doc AUTHORS INSTALL NEWS README doc/mpdconf.example
288 %attr(755,root,root) %{_bindir}/*
289 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
290 %attr(754,root,root) /etc/rc.d/init.d/mpd
291 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
292 %{systemdtmpfilesdir}/%{name}.conf
293 %{systemdunitdir}/mpd.service
294 %{systemdunitdir}/mpd.socket
295 %dir %attr(770,root,mpd) /var/lib/%{name}
296 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
297 %dir %attr(751,root,root) /var/log/%{name}
298 %dir %attr(770,root,mpd) /var/run/%{name}
299 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
300 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
301 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
302 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
303 %{_mandir}/man1/mpd.1*
304 %{_mandir}/man5/mpd.conf.5*
305
306 %files doc
307 %defattr(644,root,root,755)
308 %doc doc/user/*
309
310 %files apidocs
311 %defattr(644,root,root,755)
312 %doc doc/api doc/developer doc/protocol
This page took 0.048224 seconds and 4 git commands to generate.