]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
48328c7198d4b8a9356268d85316d16fffc78d1f
[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.7
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:  5ce7e6608289e2bc7dcda41b1fad6260
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:  harfbuzz-icu-devel
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:  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:  libwrap-devel
67 BuildRequires:  libvorbis-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
120 %description apidocs
121 API and internal documentation for MPD library.
122
123 %description apidocs -l pl.UTF-8
124 Dokumentacja API biblioteki MPD.
125
126 %package doc
127 Summary:        Documentation for Music Player Daemon (MPD)
128 Summary(fr.UTF-8):      Documentation pour Music Player Daemon (MPD)
129 Summary(it.UTF-8):      Documentazione di Music Player Daemon (MPD)
130 Summary(pl.UTF-8):      Podręcznik dla Music Player Daemon (MPD)
131 Group:          Documentation
132
133 %description doc
134 Documentation for Music Player Daemon (MPD).
135
136 %description doc -l fr.UTF-8
137 Documentation pour Music Player Daemon (MPD).
138
139 %description doc -l it.UTF-8
140 Documentazione di Music Player Daemon (MPD).
141
142 %description doc -l pl.UTF-8
143 Dokumentacja do Music Player Daemon (MPD).
144
145 %prep
146 %setup -q
147 %patch0 -p1
148
149 %build
150 %{__aclocal} -I m4
151 %{__autoconf}
152 %{__autoheader}
153 %{__automake}
154 # ac_cv_* hacks to avoid unwanted linking
155 GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
156 %configure \
157         ac_cv_lib_iconv_main=no \
158         ac_cv_lib_nsl_gethostbyname=no \
159         %{!?with_pulseaudio:--disable-pulse} \
160         %{?with_mod:--enable-mikmod} \
161         --enable-adplug \
162         --enable-alsa \
163         --enable-ao \
164         %{?with_audiofile:--enable-audiofile} \
165         --enable-bzip2 \
166         --enable-cdio-paranoia \
167         --enable-curl \
168         --enable-database \
169         --enable-documentation \
170         --enable-dsd \
171         --enable-expat \
172         --enable-ffmpeg \
173         --enable-fifo \
174         --enable-flac \
175         --enable-fluidsynth \
176         --enable-gme \
177         --enable-httpd-output \
178         --enable-icu \
179         --enable-id3 \
180         --enable-inotify \
181         --enable-ipv6 \
182         --enable-iso9660 \
183         --enable-jack \
184         --enable-lame-encoder \
185         --enable-libmpdclient \
186         --enable-libwrap \
187         --enable-lsr \
188         --enable-mad \
189         --enable-mikmod \
190         --enable-mms \
191         --enable-modplug \
192         --enable-mpc \
193         --enable-nfs \
194         --enable-openal \
195         --enable-opus \
196         --enable-oss \
197         --enable-pipe-output \
198         --enable-recorder-output \
199         --enable-sidplay \
200         --enable-shine-encoder \
201         --enable-shout \
202         --enable-smbclient \
203         --enable-sndfile \
204         --enable-soundcloud \
205         --enable-soxr \
206         --enable-sqlite \
207         --enable-systemd-daemon \
208         --enable-tcp \
209         --enable-twolame-encoder \
210         --enable-upnp \
211         --enable-un \
212         --enable-vorbis \
213         --enable-vorbis-encoder \
214         --enable-wave-encoder \
215         --enable-wavpack \
216         --enable-wildmidi \
217         --enable-zlib \
218         --enable-zzip \
219         --with-zeroconf=avahi \
220         --without-tremor \
221         --with-systemdsystemunitdir=%{systemdunitdir}
222 %{__make}
223
224 %install
225 rm -rf $RPM_BUILD_ROOT
226 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
227         $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
228         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
229
230 %{__make} install \
231         DESTDIR=$RPM_BUILD_ROOT
232
233 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
234 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
235 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
236 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
237
238 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
239 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
240 touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
241 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
242
243 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
244
245 %clean
246 rm -rf $RPM_BUILD_ROOT
247
248 %pre
249 %groupadd -g 204 mpd
250 %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
251
252 %post
253 for f in mpd.log; do
254         if [ ! -f /var/log/%{name}/$f ]; then
255                 touch /var/log/%{name}/$f
256                 chown mpd:mpd /var/log/%{name}/$f
257                 chmod 644 /var/log/%{name}/$f
258         fi
259 done
260 /sbin/chkconfig --add mpd
261 %systemd_post %{name}.service %{name}.socket
262
263 %preun
264 if [ "$1" = "0" ]; then
265         %service mpd stop
266         /sbin/chkconfig --del mpd
267 fi
268 %systemd_preun %{name}.service %{name}.socket
269
270 %postun
271 if [ "$1" = "0" ]; then
272         %userremove mpd
273         %groupremove mpd
274 fi
275 %systemd_reload
276
277 %triggerpostun -- %{name} < 0.16.6-1
278 %systemd_trigger %{name}.service
279
280 %files
281 %defattr(644,root,root,755)
282 %doc AUTHORS INSTALL NEWS README doc/mpdconf.example
283 %attr(755,root,root) %{_bindir}/*
284 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
285 %attr(754,root,root) /etc/rc.d/init.d/mpd
286 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
287 %{systemdtmpfilesdir}/%{name}.conf
288 %{systemdunitdir}/mpd.service
289 %{systemdunitdir}/mpd.socket
290 %dir %attr(770,root,mpd) /var/lib/%{name}
291 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
292 %dir %attr(751,root,root) /var/log/%{name}
293 %dir %attr(770,root,mpd) /var/run/%{name}
294 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
295 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
296 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
297 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
298 %{_mandir}/man1/mpd.1*
299 %{_mandir}/man5/mpd.conf.5*
300
301 %files doc
302 %defattr(644,root,root,755)
303 %doc doc/user/*
304
305 %files apidocs
306 %defattr(644,root,root,755)
307 %doc doc/api doc/developer doc/protocol
This page took 0.045408 seconds and 3 git commands to generate.