]> git.pld-linux.org Git - packages/mpd.git/blob - mpd.spec
- up to 0.18.5
[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.18.5
14 Release:        1
15 License:        GPL v2+
16 Group:          Applications/Multimedia
17 Source0:        http://www.musicpd.org/download/mpd/0.18/%{name}-%{version}.tar.xz
18 # Source0-md5:  63bcf6ce338caa2ae2cd6dc8e9710d5c
19 Source1:        %{name}.conf
20 Source2:        %{name}.init
21 Source3:        %{name}.sysconfig
22 Source4:        %{name}.tmpfiles
23 Patch0:         %{name}-cdio.patch
24 Patch1:         %{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.1.7}
30 BuildRequires:  autoconf >= 2.60
31 BuildRequires:  avahi-glib-devel
32 BuildRequires:  bzip2-devel
33 BuildRequires:  curl-devel
34 BuildRequires:  doxygen
35 BuildRequires:  faad2-devel >= 2.6.1-5
36 BuildRequires:  ffmpeg-devel
37 BuildRequires:  flac-devel >= 1.1.0
38 BuildRequires:  fluidsynth-devel
39 BuildRequires:  game-music-emu-devel
40 BuildRequires:  glib2-devel >= 2.12
41 BuildRequires:  jack-audio-connection-kit-devel >= 0.4
42 BuildRequires:  lame-libs-devel
43 BuildRequires:  libao-devel >= 0.8.3
44 BuildRequires:  libcdio-devel
45 BuildRequires:  libcue-devel
46 BuildRequires:  libid3tag-devel
47 BuildRequires:  libmad-devel
48 %{?with_mod:BuildRequires:      libmikmod-devel >= 3.1.7}
49 BuildRequires:  libmms-devel
50 BuildRequires:  libmodplug-devel
51 BuildRequires:  libogg-devel
52 BuildRequires:  libsamplerate-devel >= 0.0.15
53 BuildRequires:  libshout-devel
54 BuildRequires:  libsidplay2-devel >= 2.1.1-5
55 BuildRequires:  libvorbis-devel
56 BuildRequires:  musepack-devel
57 BuildRequires:  pkgconfig >= 1:0.9.0
58 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel}
59 BuildRequires:  rpmbuild(macros) >= 1.629-2
60 BuildRequires:  sqlite3-devel
61 BuildRequires:  twolame-devel
62 BuildRequires:  wavpack-devel
63 BuildRequires:  wildmidi-devel
64 BuildRequires:  xmlto
65 BuildRequires:  yajl-devel >= 2.0
66 BuildRequires:  zlib-devel
67 BuildRequires:  zziplib-devel
68 Requires(post,preun,postun):    systemd-units >= 38
69 Requires:       systemd-units >= 38
70 Provides:       group(mpd)
71 Provides:       user(mpd)
72 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74 %description
75 Music Player Daemon (MPD) allows remote access for playing music (MP3,
76 Ogg Vorbis, FLAC, AAC, Mod, and wave files) and managing playlists.
77 MPD is designed for integrating a computer into a stereo system that
78 provides control for music playback over a local network. It is also
79 makes a great desktop music player, especially if you are a console
80 junkie, like frontend options, or restart X often.
81
82 %description -l hu.UTF-8
83 Music Player Daemon (MPD)-vel lehetővé válik távoli zenelejátszás
84 (MP3, Ogg Vorbis, FLAC, AAC, Mod és wav fájlok) és lejátszási listák
85 menedzselése. Az MPD a számítógépben egy zenelejátszó, amelyet
86 irányíthatsz helyi hálózaton keresztül. Egyben egy zseniális desktop
87 zenelejátszó is, különösen a konzol-mániásoknak, vagy azoknak, akik
88 sűrűn indítják újra az X-et.
89
90 %description -l pl.UTF-8
91 Music Player Daemon (MPD) pozwala na zdalny dostęp do odtwarzania
92 muzyki (plików MP3, Ogg Vorbis, FLAC, AAC, Mod i wave) oraz
93 zarządzania playlistami. MPD jest zaprojektowany do integrowania
94 komputera w system stereo umożliwiający sterowanie odtwarzaniem muzyki
95 w sieci lokalnej. Służy także za dobry odtwarzacz muzyki dla
96 komputerów biurkowych, zwłaszcza dla miłośników konsoli, różnych opcji
97 frontendów albo często restartujących X.
98
99 %package apidocs
100 Summary:        MPD API documentation
101 Summary(pl.UTF-8):      Dokumentacja API biblioteki API
102 Group:          Documentation
103
104 %description apidocs
105 API and internal documentation for MPD library.
106
107 %description apidocs -l pl.UTF-8
108 Dokumentacja API biblioteki MPD.
109
110 %package doc
111 Summary:        Documentation for Music Player Daemon (MPD)
112 Summary(fr.UTF-8):      Documentation pour Music Player Daemon (MPD)
113 Summary(it.UTF-8):      Documentazione di Music Player Daemon (MPD)
114 Summary(pl.UTF-8):      Podręcznik dla Music Player Daemon (MPD)
115 Group:          Documentation
116
117 %description doc
118 Documentation for Music Player Daemon (MPD).
119
120 %description doc -l fr.UTF-8
121 Documentation pour Music Player Daemon (MPD).
122
123 %description doc -l it.UTF-8
124 Documentazione di Music Player Daemon (MPD).
125
126 %description doc -l pl.UTF-8
127 Dokumentacja do Music Player Daemon (MPD).
128
129 %prep
130 %setup -q
131 %patch0 -p1
132 %patch1 -p1
133
134 %build
135 %{__aclocal} -I m4
136 %{__autoconf}
137 %{__autoheader}
138 %{__automake}
139 # ac_cv_* hacks to avoid unwanted linking
140 GME_CFLAGS="-I/usr/include/gme" GME_LIBS="-lgme" \
141 %configure \
142         ac_cv_lib_iconv_main=no \
143         ac_cv_lib_nsl_gethostbyname=no \
144         %{!?with_pulseaudio:--disable-pulse} \
145         %{?with_mod:--enable-mikmod} \
146         --enable-sidplay \
147         --enable-adplug \
148         --enable-alsa \
149         --enable-ao \
150         %{?with_audiofile:--enable-audiofile} \
151         --enable-bzip2 \
152         --enable-curl \
153         --enable-documentation \
154         --enable-ffmpeg \
155         --enable-fluidsynth \
156         --enable-gme \
157         --enable-httpd-output \
158         --enable-iso9660 \
159         --enable-jack \
160         --enable-lame-encoder \
161         --enable-lsr \
162         --enable-mad \
163         --enable-mms \
164         --enable-modplug \
165         --enable-openal \
166         --enable-pipe-output \
167         --enable-recorder-output \
168         --enable-shout \
169         --enable-soundcloud \
170         --enable-sqlite \
171         --enable-twolame-encoder \
172         --enable-vorbis-encoder \
173         --enable-wave-encoder \
174         --enable-wavpack \
175         --enable-wildmidi \
176         --enable-zzip \
177         --with-zeroconf=avahi \
178         --without-tremor \
179         --with-systemdsystemunitdir=%{systemdunitdir}
180 %{__make}
181
182 %install
183 rm -rf $RPM_BUILD_ROOT
184 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
185         $RPM_BUILD_ROOT{/var/lib/mpd/playlists,/var/log/mpd,/var/run/mpd} \
186         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
187
188 %{__make} install \
189         DESTDIR=$RPM_BUILD_ROOT
190
191 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
192 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mpd
193 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/mpd
194 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
195
196 touch $RPM_BUILD_ROOT/var/lib/mpd/mpd.db
197 touch $RPM_BUILD_ROOT/var/lib/mpd/mpdstate
198 touch $RPM_BUILD_ROOT/var/lib/mpd/sticker.sql
199 touch $RPM_BUILD_ROOT/var/log/mpd/mpd.log
200
201 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mpd
202
203 %clean
204 rm -rf $RPM_BUILD_ROOT
205
206 %pre
207 %groupadd -g 204 mpd
208 %useradd -u 204 -r -d /var/lib/mpd -s /bin/false -c "Music Player Daemon (MPD) user" -G audio -g mpd mpd
209
210 %post
211 for f in mpd.log; do
212         if [ ! -f /var/log/%{name}/$f ]; then
213                 touch /var/log/%{name}/$f
214                 chown mpd:mpd /var/log/%{name}/$f
215                 chmod 644 /var/log/%{name}/$f
216         fi
217 done
218 /sbin/chkconfig --add mpd
219 %systemd_post %{name}.service
220
221 %preun
222 if [ "$1" = "0" ]; then
223         %service mpd stop
224         /sbin/chkconfig --del mpd
225 fi
226 %systemd_preun %{name}.service
227
228 %postun
229 if [ "$1" = "0" ]; then
230         %userremove mpd
231         %groupremove mpd
232 fi
233 %systemd_reload
234
235 %triggerpostun -- %{name} < 0.16.6-1
236 %systemd_trigger %{name}.service
237
238 %files
239 %defattr(644,root,root,755)
240 %doc AUTHORS NEWS README doc/mpdconf.example UPGRADING
241 %attr(755,root,root) %{_bindir}/*
242 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpd.conf
243 %attr(754,root,root) /etc/rc.d/init.d/mpd
244 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mpd
245 %{systemdtmpfilesdir}/%{name}.conf
246 %{systemdunitdir}/mpd.service
247 %dir %attr(770,root,mpd) /var/lib/%{name}
248 %dir %attr(770,root,mpd) /var/lib/%{name}/playlists
249 %dir %attr(751,root,root) /var/log/%{name}
250 %dir %attr(770,root,mpd) /var/run/%{name}
251 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpd.db
252 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/mpdstate
253 %attr(644,mpd,mpd) %ghost /var/lib/%{name}/sticker.sql
254 %attr(644,mpd,mpd) %ghost /var/log/%{name}/mpd.log
255 %{_mandir}/man1/mpd.1*
256 %{_mandir}/man5/mpd.conf.5*
257
258 %files doc
259 %defattr(644,root,root,755)
260 %doc doc/user/*
261
262 %files apidocs
263 %defattr(644,root,root,755)
264 %doc doc/api doc/developer doc/protocol
This page took 0.0653629999999999 seconds and 4 git commands to generate.