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