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