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