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