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