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