]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- build with xfs support by default
[packages/amanda.git] / amanda.spec
1 #
2 # Conditional build:
3 %bcond_without  xfs     # without (possible) support for xfsdump
4 %bcond_without  client  # without client package
5 %bcond_without  server  # without server package
6 #
7 Summary:        A network-capable tape backup solution
8 Summary(pl):    Sieciowo zorientowany system tworzenia kopii zapasowych
9 Name:           amanda
10 Version:        2.5.1p2
11 Release:        0.8
12 License:        BSD
13 Group:          Networking/Utilities
14 Source0:        http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
15 # Source0-md5:  6811f8a296650a6c0f64766b6e6abbe1
16 Source1:        %{name}-srv.crontab
17 Source2:        %{name}.inetd
18 Source3:        %{name}idx.inetd
19 Source4:        amidxtape.inetd
20 Source5:        %{name}.conf
21 Patch0:         %{name}-no_libnsl.patch
22 Patch1:         %{name}-ac25x.patch
23 Patch2:         %{name}-chg-zd-mtx-sh.patch
24 Patch3:         %{name}-tar.patch
25 URL:            http://www.amanda.org/
26 BuildRequires:  autoconf >= 2.53
27 BuildRequires:  automake
28 BuildRequires:  dump
29 BuildRequires:  flex
30 BuildRequires:  libxslt-progs
31 BuildRequires:  libtool
32 BuildRequires:  readline-devel >= 4.2
33 BuildRequires:  rpmbuild(macros) >= 1.268
34 %{?with_xfs:BuildRequires:      xfsdump}
35 Conflicts:      shadow < 1:4.0.4.1-4
36 Conflicts:      pwdutils < 3.1.2-2
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _localstatedir  /var/lib
40 %define         _libexecdir     %{_libdir}/amanda
41
42 %description
43 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
44 backup system that allows the administrator of a LAN to set up a
45 single master backup server to back up multiple hosts to a single
46 large capacity tape drive. AMANDA uses native dump and/or GNU tar
47 facilities and can back up a large number of workstations running
48 multiple versions of Unix. Newer versions of AMANDA (including this
49 version) can use SAMBA to back up Microsoft(TM) Windows95/NT hosts.
50 The amanda package contains the core AMANDA programs and will need to
51 be installed on both AMANDA clients and AMANDA servers. Note that you
52 will have to install the amanda-client and amanda-server packages as
53 well.
54
55 %description -l pl
56 AMANDA jest sieciowo zorientowanym systemem tworzenia kopii
57 zapasowych. Umo¿liwia administratorowi sieci tworzenie kopii z kilku
58 hostów na jednej maszynie wyposa¿onej w pojemny dysk lub streamer.
59 Nowsze wersje programu umo¿liwiaj± zabezpieczanie zasobów Microsoft
60 Windows 95/98/NT/2000 przy u¿yciu protoko³u Samba. Ten pakiet zawiera
61 podstawowe pliki programu i powinien byæ zainstalowany zarówno na
62 serwerze jak i na kliencie. Pamiêtaj tak¿e o instalacji pakietów
63 amanda-client i amanda-server!
64
65 %package libs
66 Summary:        Amanda shared libraries
67 Summary(pl):    Biblioteki wspó³dzielone pakietu amanda
68 Group:          Networking/Utilities
69 Requires(postun):       /sbin/ldconfig
70 Requires(postun):       /usr/sbin/groupdel
71 Requires(postun):       /usr/sbin/userdel
72 Requires(pre):  /bin/id
73 Requires(pre):  /usr/bin/getgid
74 Requires(pre):  /usr/sbin/groupadd
75 Requires(pre):  /usr/sbin/useradd
76 Provides:       group(amanda)
77 Provides:       user(amanda)
78
79 %description libs
80 Amanda shared libraries.
81
82 %description libs -l pl
83 Biblioteki wspó³dzielone pakietu amanda.
84
85 %package client
86 Summary:        The client side of Amanda
87 Summary(pl):    Klient Amandy
88 Group:          Networking/Utilities
89 Requires(post,postun):  /sbin/ldconfig
90 Requires:       %{name}-libs = %{version}-%{release}
91 Requires:       rc-inetd
92 Conflicts:      tar < 1.13
93
94 %description client
95 The Amanda-client package should be installed on any machine that will
96 be backed up by AMANDA (including the server if it also needs to be
97 backed up). You will also need to install the amanda package to each
98 AMANDA client. It requires at least one of dump and GNU tar installed.
99
100 %description client -l pl
101 Ten pakiet powinien byæ zainstalowany ma maszynach, z których
102 zawarto¶ci bêd± tworzone kopie zapasowe. Wymaga zainstalowanego co
103 najmniej jednego z pakietów dump i GNU tar.
104
105 %package server
106 Summary:        The server side of Amanda
107 Summary(pl):    Serwer Amandy
108 Group:          Networking/Utilities
109 Requires(post,postun):  /sbin/ldconfig
110 Requires:       %{name}-libs = %{version}-%{release}
111 Requires:       /etc/cron.d
112 Requires:       crondaemon
113 Requires:       gnuplot
114 Requires:       mt-st
115 Requires:       mtx
116 Requires:       rc-inetd
117 Obsoletes:      amanda
118
119 %description server
120 The amanda-server package should be installed on the AMANDA server,
121 the machine attached to the device (such as a tape drive) where
122 backups will be written. You will also need to install the amanda
123 package to the AMANDA server. And, if the server is also to be backed
124 up, the server also needs to have the amanda-client package installed.
125
126 %description server -l pl
127 Ten pakiet powinien byæ zainstalowany na maszynach, na których bêd±
128 magazynowane kopie zapasowe (lub do których podpiête s± urz±dzenia
129 typu streamer).
130
131 %prep
132 %setup -q
133 %patch0 -p1
134 %patch1 -p1
135 %patch2 -p1
136 %patch3 -p1
137
138 # kill libtool.m4 copy
139 head -n 1147 acinclude.m4 > acinc.tmp
140 mv -f acinc.tmp acinclude.m4
141
142 %build
143 %{__libtoolize}
144 %{__aclocal}
145 %{__autoconf}
146 %{__automake}
147 %configure \
148         GNUPLOT=/usr/bin/gnuplot \
149         MAILER=/bin/mail \
150         PRINT=/usr/bin/lpr \
151         DUMP=/sbin/dump \
152         RESTORE=/sbin/restore \
153         %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
154         %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
155         --disable-static \
156         --enable-shared \
157         %{!?with_server:--without-server} \
158         %{!?with_client:--without-client} \
159         --with-index-server=localhost \
160         --with-user=amanda \
161         --with-group=amanda \
162         --with-tape-device=/dev/null \
163         --with-ftape-rawdevice=/dev/null \
164         --with-changer-device=/dev/null \
165         --with-fqdn \
166         --with-smbclient=%{_bindir}/smbclient \
167         --with-bsd-security \
168         --with-ssh-security \
169         --with-buffered-dump \
170         --with-amandahosts \
171         --with-debugging=%{_localstatedir}/amanda/debug \
172         --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \
173         --with-tmpdir=/var/tmp
174
175 %{__make}
176
177 %install
178 rm -rf $RPM_BUILD_ROOT
179 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
180         $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists \
181         $RPM_BUILD_ROOT%{_mandir}/man1
182
183 %{__make} install \
184         DESTDIR=$RPM_BUILD_ROOT \
185         SETUID_GROUP=`id -g`
186
187 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
188 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
189 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
190 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
191
192 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
193 install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
194 touch $RPM_BUILD_ROOT%{_localstatedir}/amanda/.amandahosts
195
196 > $RPM_BUILD_ROOT%{_sysconfdir}/amandates
197
198 %clean
199 rm -rf $RPM_BUILD_ROOT
200
201 %triggerpostun libs -- %{name}-libs < 2.5.1p2-1
202 echo "Adding amanda to disk and backup groups"
203 /usr/sbin/usermod -G disk,backup amanda
204 echo "Setting amanda shell to /bin/sh"
205 /usr/bin/chsh -s /bin/sh amanda
206
207 %pre libs
208 %groupadd -P %{name}-libs -g 80 amanda
209 %useradd -P %{name}-libs -u 80 -G disk,backup -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
210
211 %post   libs -p /sbin/ldconfig
212
213 %postun libs
214 /sbin/ldconfig
215 if [ "$1" = "0" ]; then
216         %userremove amanda
217         %groupremove amanda
218 fi
219
220 %post client
221 /sbin/ldconfig
222 %service -q rc-inetd reload
223
224 %postun client
225 /sbin/ldconfig
226 if [ "$1" = 0 ]; then
227         %service -q rc-inetd reload
228 fi
229
230 %post server
231 /sbin/ldconfig
232 %service -q rc-inetd reload
233 if [ "$1" = "1" ]; then
234         echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
235 fi
236
237 %postun server
238 /sbin/ldconfig
239 if [ "$1" = 0 ]; then
240         %service -q rc-inetd reload
241 fi
242
243 %files libs
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libamanda*.so
246 %dir %{_libexecdir}
247 %attr(770,root,amanda) %dir %{_localstatedir}/amanda
248 %attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/amanda/.amandahosts
249
250 %if %{with server}
251 %files server
252 %defattr(644,root,root,755)
253 %doc docs/*
254 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
255 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
256
257 %attr(750,root,amanda) %dir %{_sysconfdir}/amanda
258 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/*
259
260 %attr(664,root,amanda) %{_localstatedir}/amanda/*.ps
261
262 %config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
263
264 %attr(755,root,root) %{_libdir}/libamserver*.so
265 %attr(755,root,root) %{_libdir}/libamtape*.so
266 %attr(755,root,root) %{_libdir}/librestore*.so
267
268 %attr(755,root,root) %{_libexecdir}/amcat.awk
269 %attr(755,root,root) %{_libexecdir}/amcleanupdisk
270 %attr(755,root,root) %{_libexecdir}/amidxtaped
271 %attr(755,root,root) %{_libexecdir}/amindexd
272 %attr(755,root,root) %{_libexecdir}/amlogroll
273 %attr(755,root,root) %{_libexecdir}/amplot.awk
274 %attr(755,root,root) %{_libexecdir}/amplot.g
275 %attr(755,root,root) %{_libexecdir}/amplot.gp
276 %attr(755,root,root) %{_libexecdir}/amtrmidx
277 %attr(755,root,root) %{_libexecdir}/amtrmlog
278 %attr(755,root,root) %{_libexecdir}/chg-chio
279 %attr(755,root,root) %{_libexecdir}/chg-chs
280 %attr(755,root,root) %{_libexecdir}/chg-disk
281 %attr(755,root,root) %{_libexecdir}/chg-iomega
282 %attr(755,root,root) %{_libexecdir}/chg-juke
283 %attr(755,root,root) %{_libexecdir}/chg-manual
284 %attr(755,root,root) %{_libexecdir}/chg-mcutil
285 %attr(755,root,root) %{_libexecdir}/chg-mtx
286 %attr(755,root,root) %{_libexecdir}/chg-multi
287 %attr(755,root,root) %{_libexecdir}/chg-null
288 %attr(755,root,root) %{_libexecdir}/chg-rait
289 %attr(755,root,root) %{_libexecdir}/chg-rth
290 %attr(755,root,root) %{_libexecdir}/chg-scsi
291 %attr(755,root,root) %{_libexecdir}/chg-zd-mtx
292 %attr(755,root,root) %{_libexecdir}/chunker
293 %attr(755,root,root) %{_libexecdir}/driver
294 %attr(4754,root,amanda) %{_libexecdir}/dumper
295 %attr(4754,root,amanda) %{_libexecdir}/planner
296 %attr(755,root,root) %{_libexecdir}/taper
297
298 %attr(755,root,root) %{_sbindir}/amadmin
299 %attr(755,root,root) %{_sbindir}/amaespipe
300 %attr(4754,root,amanda) %{_sbindir}/amcheck
301 %attr(755,root,root) %{_sbindir}/amcheckdb
302 %attr(755,root,root) %{_sbindir}/amcleanup
303 %attr(755,root,root) %{_sbindir}/amcrypt*
304 %attr(755,root,root) %{_sbindir}/amdd
305 %attr(755,root,root) %{_sbindir}/amdump
306 %attr(755,root,root) %{_sbindir}/amfetchdump
307 %attr(755,root,root) %{_sbindir}/amflush
308 %attr(755,root,root) %{_sbindir}/amgetconf
309 %attr(755,root,root) %{_sbindir}/amlabel
310 %attr(755,root,root) %{_sbindir}/ammt
311 %attr(755,root,root) %{_sbindir}/amoverview
312 %attr(755,root,root) %{_sbindir}/amplot
313 %attr(755,root,root) %{_sbindir}/amreport
314 %attr(755,root,root) %{_sbindir}/amrestore
315 %attr(755,root,root) %{_sbindir}/amrmtape
316 %attr(755,root,root) %{_sbindir}/amstatus
317 %attr(755,root,root) %{_sbindir}/amtape
318 %attr(755,root,root) %{_sbindir}/amtapetype
319 %attr(755,root,root) %{_sbindir}/amtoc
320 %attr(755,root,root) %{_sbindir}/amverify
321 %attr(755,root,root) %{_sbindir}/amverifyrun
322 %{_mandir}/man5/amanda.conf.5*
323 %{_mandir}/man8/amadmin.8*
324 %{_mandir}/man8/amaespipe.8*
325 %{_mandir}/man8/amanda.8*
326 %{_mandir}/man8/amcheck.8*
327 %{_mandir}/man8/amcheckdb.8*
328 %{_mandir}/man8/amcleanup.8*
329 %{_mandir}/man8/amcrypt*.8*
330 %{_mandir}/man8/amdd.8*
331 %{_mandir}/man8/amdump.8*
332 %{_mandir}/man8/amfetchdump.8*
333 %{_mandir}/man8/amflush.8*
334 %{_mandir}/man8/amgetconf.8*
335 %{_mandir}/man8/amlabel.8*
336 %{_mandir}/man8/ammt.8*
337 %{_mandir}/man8/amoverview.8*
338 %{_mandir}/man8/amplot.8*
339 %{_mandir}/man8/amreport.8*
340 %{_mandir}/man8/amrestore.8*
341 %{_mandir}/man8/amrmtape.8*
342 %{_mandir}/man8/amstatus.8*
343 %{_mandir}/man8/amtape.8*
344 %{_mandir}/man8/amtapetype.8*
345 %{_mandir}/man8/amtoc.8*
346 %{_mandir}/man8/amverify.8*
347 %{_mandir}/man8/amverifyrun.8*
348 %endif
349
350 %if %{with client}
351 %files client
352 %defattr(644,root,root,755)
353 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
354 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amandates
355 %attr(755,root,root) %{_libdir}/libamclient*.so
356 %attr(755,root,root) %{_libexecdir}/amandad
357 %attr(755,root,root) %{_libexecdir}/noop
358 %attr(755,root,root) %{_libexecdir}/patch-system
359 %attr(755,root,root) %{_libexecdir}/sendbackup
360 %attr(755,root,root) %{_libexecdir}/sendsize
361 %attr(755,root,root) %{_libexecdir}/versionsuffix
362 %attr(4754,root,amanda) %{_libexecdir}/calcsize
363 %attr(4754,root,amanda) %{_libexecdir}/killpgrp
364 %attr(4754,root,amanda) %{_libexecdir}/rundump
365 %attr(4754,root,amanda) %{_libexecdir}/runtar
366 %attr(4754,root,amanda) %{_libexecdir}/selfcheck
367 %attr(755,root,root) %{_sbindir}/amoldrecover
368 %attr(755,root,root) %{_sbindir}/amrecover
369 %attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
370 %{_mandir}/man5/amanda-client.conf.5*
371 %{_mandir}/man8/amrecover.8*
372 %endif
This page took 0.051988 seconds and 3 git commands to generate.