]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
b0ff0a856c540c450c67ac8a6d5df27e63351b12
[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.4
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:  1f61cf76add97615600b6982a420e41f
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:  mp4v2-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
121 %description apidocs
122 API and internal documentation for MPD library.
123
124 %description apidocs -l pl.UTF-8
125 Dokumentacja API biblioteki MPD.
126
127 %package doc
128 Summary:        Documentation for Music Player Daemon (MPD)
129 Summary(fr.UTF-8):      Documentation pour Music Player Daemon (MPD)
130 Summary(it.UTF-8):      Documentazione di Music Player Daemon (MPD)
131 Summary(pl.UTF-8):      Podręcznik dla Music Player Daemon (MPD)
132 Group:          Documentation
133
134 %description doc
135 Documentation for Music Player Daemon (MPD).
136
137 %description doc -l fr.UTF-8
138 Documentation pour Music Player Daemon (MPD).
139
140 %description doc -l it.UTF-8
141 Documentazione di Music Player Daemon (MPD).
142
143 %description doc -l pl.UTF-8
144 Dokumentacja do Music Player Daemon (MPD).
145
146 %prep
147 %setup -q
148 %patch0 -p1
149
150 %build
151 %{__aclocal} -I m4
152 %{__autoconf}
153 %{__autoheader}
154 %{__automake}
155 # ac_cv_* hacks to avoid unwanted linking
156 GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
157 %configure \
158         ac_cv_lib_iconv_main=no \
159         ac_cv_lib_nsl_gethostbyname=no \
160         %{!?with_pulseaudio:--disable-pulse} \
161         %{?with_mod:--enable-mikmod} \
162         --enable-adplug \
163         --enable-alsa \
164         --enable-ao \
165         %{?with_audiofile:--enable-audiofile} \
166         --enable-bzip2 \
167         --enable-cdio-paranoia \
168         --enable-curl \
169         --enable-database \
170         --enable-documentation \
171         --enable-dsd \
172         --enable-expat \
173         --enable-ffmpeg \
174         --enable-fifo \
175         --enable-flac \
176         --enable-fluidsynth \
177         --enable-gme \
178         --enable-httpd-output \
179         --enable-icu \
180         --enable-id3 \
181         --enable-inotify \
182         --enable-ipv6 \
183         --enable-iso9660 \
184         --enable-jack \
185         --enable-lame-encoder \
186         --enable-libmpdclient \
187         --enable-libwrap \
188         --enable-lsr \
189         --enable-mad \
190         --enable-mikmod \
191         --enable-mms \
192         --enable-modplug \
193         --enable-mp4v2 \
194         --enable-mpc \
195         --enable-nfs \
196         --enable-openal \
197         --enable-opus \
198         --enable-oss \
199         --enable-pipe-output \
200         --enable-recorder-output \
201         --enable-sidplay \
202         --enable-shine \
203         --enable-shout \
204         --enable-smbclient \
205         --enable-sndfile \
206         --enable-soundcloud \
207         --enable-soxr \
208         --enable-sqlite \
209         --enable-systemd-daemon \
210         --enable-tcp \
211         --enable-twolame-encoder \
212         --enable-upnp \
213         --enable-un \
214         --enable-vorbis \
215         --enable-vorbis-encoder \
216         --enable-wave-encoder \
217         --enable-wavpack \
218         --enable-wildmidi \
219         --enable-zeroconf \
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 install %{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.092297 seconds and 3 git commands to generate.