]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- added without_xfs bcond
[packages/amanda.git] / amanda.spec
1 # Conditional build:                                                                 
2 # _without_xfs  - without support for xfsdump
3 Summary:        A network-capable tape backup solution
4 Summary(pl):    Sieciowo zorientowany system tworzenia kopii zapasowych
5 Name:           amanda
6 Version:        2.4.2p2
7 Release:        14
8 License:        BSD
9 Group:          Networking/Utilities
10 Source0:        http://prdownloads.sourceforge.net/amanda/%{name}-%{version}.tar.gz
11 Source1:        %{name}-srv.crontab
12 Source2:        %{name}.inetd
13 Source3:        %{name}idx.inetd
14 Source4:        amidxtape.inetd
15 Source5:        %{name}.conf
16 Patch0:         %{name}-no_libnsl.patch
17 Patch1:         %{name}-am_fixes.patch
18 Patch2:         %{name}-bug18322.patch
19 Patch3:         %{name}-build_tapetype.patch
20 Patch4:         %{name}-no_private_libtool.m4.patch
21 Patch5:         %{name}-ac25x.patch
22 Patch6:         %{name}-chg-zd-mtx-sh.patch
23 URL:            http://www.amanda.org/
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 BuildRequires:  cpio
27 BuildRequires:  dump
28 %{!?_without_xfs:BuildRequires: xfsdump}
29 BuildRequires:  flex
30 BuildRequires:  gnuplot
31 BuildRequires:  libtool
32 BuildRequires:  readline-devel >= 4.2
33 BuildRequires:  tar
34 BuildRequires:  samba-client
35 Prereq:         /sbin/ldconfig
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _sysconfdir     /etc
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 Prereq:         /usr/bin/getgid
70 Prereq:         /bin/id
71 Prereq:         /usr/sbin/groupadd
72 Prereq:         /usr/sbin/useradd
73 Prereq:         /usr/sbin/groupdel
74 Prereq:         /usr/sbin/userdel
75
76 %description libs
77 Amanda shared libraries.
78
79 %description libs -l pl
80 Biblioteki wspó³dzielone pakietu amanda.
81
82 %package client
83 Summary:        The client side of Amanda
84 Summary(pl):    Klient Amandy
85 Group:          Networking/Utilities
86 Prereq:         /sbin/ldconfig
87 Prereq:         rc-inetd
88 Prereq:         %{name}-libs = %{version}
89 Conflicts:      tar < 1.13
90
91 %description client
92 The Amanda-client package should be installed on any machine that will
93 be backed up by AMANDA (including the server if it also needs to be
94 backed up). You will also need to install the amanda package to each
95 AMANDA client. It requires at least one of dump and GNU tar installed.
96
97 %description client -l pl
98 Ten pakiet powinien byæ zainstalowany ma maszynach, z których
99 zawarto¶ci bêd± tworzone kopie zapasowe. Wymaga zainstalowanego co
100 najmniej jednego z pakietów dump i GNU tar.
101
102 %package server
103 Summary:        The server side of Amanda
104 Summary(pl):    Serwer Amandy
105 Group:          Networking/Utilities
106 Prereq:         rc-inetd
107 Prereq:         /sbin/ldconfig
108 Requires:       gnuplot
109 Requires:       crondaemon
110 Requires:       /etc/cron.d
111 Requires:       mt-st
112 Requires:       mtx
113 Prereq:         rc-inetd
114 Prereq:         %{name}-libs = %{version}
115
116 %description server
117 The amanda-server package should be installed on the AMANDA server,
118 the machine attached to the device (such as a tape drive) where
119 backups will be written. You will also need to install the amanda
120 package to the AMANDA server. And, if the server is also to be backed
121 up, the server also needs to have the amanda-client package installed.
122
123 %description server -l pl
124 Ten pakiet powinien byæ zainstalowanych na maszynach, na których bêd±
125 magazynowane kopie zapasowe (lub do których podpiête s± urz±dzenia
126 typu streamer).
127
128 %prep
129 %setup -q
130 %patch0 -p1
131 %patch1 -p1
132 %patch2 -p1
133 %patch3 -p1
134 %patch4 -p1
135 %patch5 -p1
136 %patch6 -p1
137
138 %build
139 libtoolize --copy --force
140 aclocal
141 autoconf
142 touch COPYING
143 rm -f missing
144 automake -a -c -f
145 %configure \
146         --disable-static \
147         --enable-shared \
148         --with-index-server=localhost \
149         --with-user=amanda \
150         --with-group=amanda \
151         --with-tape-device=/dev/null \
152         --with-ftape-rawdevice=/dev/null \
153         --with-changer-device=/dev/null \
154         --with-fqdn \
155         --with-smbclient=%{_bindir}/smbclient \
156         --with-bsd-security \
157         --with-buffered-dump \
158         --with-amandahosts \
159         --with-debugging=%{_localstatedir}/amanda/debug \
160         --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \
161         --with-tmpdir=/var/tmp
162
163 %{__make}
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
168         $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists
169
170 %{__make} install \
171         DESTDIR=$RPM_BUILD_ROOT \
172         SETUID_GROUP=`id -g`
173
174 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
175 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
176 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
177 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
178
179 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
180 install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
181
182 > $RPM_BUILD_ROOT%{_sysconfdir}/amandates
183
184 gzip -9nf docs/*
185
186 %clean
187 rm -rf $RPM_BUILD_ROOT
188
189 %triggerpostun -- amanda-libs < 2.4.2p2-3
190 /usr/sbin/chsh -s /bin/sh amanda
191
192 %triggerpostun -- amanda-libs < 2.4.2p2-12
193 /usr/sbin/usermod -G disk amanda
194
195 %pre libs
196 if [ -n "`/usr/bin/getgid amanda`" ]; then
197         if [ "`getgid amanda`" != "80" ]; then
198                 echo "Warning: group amanda haven't gid=80. Correct this before installing amanda-libs" 1>&2
199                 exit 1
200         fi
201 else
202         /usr/sbin/groupadd -g 80 -r -f amanda
203 fi
204 if [ -n "`/bin/id -u amanda 2>/dev/null`" ]; then
205         if [ "`/bin/id -u amanda`" != "80" ]; then
206                 echo "Warning: user amanda haven't uid=80. Correct this before installing amanda-libs" 1>&2
207                 exit 1
208         fi
209 else
210         /usr/sbin/useradd -u 80 -G disk -r -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda 1>&2
211 fi
212
213 %post libs -p /sbin/ldconfig
214
215 %postun libs
216 /sbin/ldconfig
217 if [ "$1" = "0" ]; then
218         /usr/sbin/userdel amanda
219         /usr/sbin/groupdel amanda
220 fi
221
222 %post client
223 /sbin/ldconfig
224 if [ -f /var/lock/subsys/rc-inetd ]; then
225         /etc/rc.d/init.d/rc-inetd restart 1>&2
226 else
227         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
228 fi
229
230 %postun client
231 /sbin/ldconfig
232 if [ -f /var/lock/subsys/rc-inetd ]; then
233         /etc/rc.d/init.d/rc-inetd restart
234 fi
235
236 %post server
237 /sbin/ldconfig
238 if [ -f /var/lock/subsys/rc-inetd ]; then
239         /etc/rc.d/init.d/rc-inetd restart 1>&2
240 else
241         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
242 fi
243 echo "Don't forget to edit /etc/cron.d/amanda-srv" 1>&2
244
245 %postun server
246 /sbin/ldconfig
247 if [ -f /var/lock/subsys/rc-inetd ]; then
248         /etc/rc.d/init.d/rc-inetd restart
249 fi
250
251 %files libs
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{_libdir}/libamanda*.so
254 %attr(755,root,root) %{_libdir}/libamtape*.so
255 %attr(770,root,amanda) %dir %{_libexecdir}
256 %attr(770,root,amanda) %dir %{_localstatedir}/amanda
257
258
259 %files server
260 %defattr(644,root,root,755)
261 %doc docs/*.gz
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/*
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}/selfcheck
295 %attr(755,root,root) %{_libexecdir}/taper
296 %attr(755,root,root) %{_sbindir}/amadmin
297 %attr(4754,root,amanda) %{_sbindir}/amcheck
298 %attr(755,root,root) %{_sbindir}/amcheckdb
299 %attr(755,root,root) %{_sbindir}/amcleanup
300 %attr(755,root,root) %{_sbindir}/amdump
301 %attr(755,root,root) %{_sbindir}/amflush
302 %attr(755,root,root) %{_sbindir}/amgetconf
303 %attr(755,root,root) %{_sbindir}/amlabel
304 %attr(755,root,root) %{_sbindir}/amoverview
305 %attr(755,root,root) %{_sbindir}/amplot
306 %attr(755,root,root) %{_sbindir}/amrmtape
307 %attr(755,root,root) %{_sbindir}/amreport
308 %attr(755,root,root) %{_sbindir}/amstatus
309 %attr(755,root,root) %{_sbindir}/amtape
310 %attr(755,root,root) %{_sbindir}/amtoc
311 %attr(755,root,root) %{_sbindir}/amverify
312 %attr(755,root,root) %{_sbindir}/tapetype
313 %{_mandir}/man8/amadmin.8*
314 %{_mandir}/man8/amrmtape.8*
315 %{_mandir}/man8/amtape.8*
316 %{_mandir}/man8/amtoc.8*
317 %{_mandir}/man8/amanda.8*
318 %{_mandir}/man8/amcheck.8*
319 %{_mandir}/man8/amcleanup.8*
320 %{_mandir}/man8/amdump.8*
321 %{_mandir}/man8/amflush.8*
322 %{_mandir}/man8/amlabel.8*
323 %{_mandir}/man8/amplot.8*
324 %{_mandir}/man8/amreport.8*
325 %{_mandir}/man8/amstatus.8*
326
327 %files client
328 %defattr(644,root,root,755)
329 %config(noreplace) /etc/sysconfig/rc-inetd/amanda
330 %attr(664,root,amanda) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/amandates
331 %attr(755,root,root) %{_libdir}/libamclient*.so
332 %attr(755,root,root) %{_libexecdir}/versionsuffix
333 %attr(755,root,root) %{_libexecdir}/amandad
334 %attr(4754,root,amanda) %{_libexecdir}/calcsize
335 %attr(4754,root,amanda) %{_libexecdir}/rundump
336 %attr(4754,root,amanda) %{_libexecdir}/runtar
337 %attr(4754,root,amanda) %{_libexecdir}/selfcheck
338 %attr(755,root,root) %{_libexecdir}/sendbackup
339 %attr(755,root,root) %{_libexecdir}/sendsize
340 %attr(755,root,root) %{_libexecdir}/patch-system
341 %attr(4754,root,amanda) %{_libexecdir}/killpgrp
342 %attr(755,root,root) %{_sbindir}/amrecover
343 %attr(755,root,root) %{_sbindir}/amrestore
344 %attr(770,amanda,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
345 %{_mandir}/man8/amrecover.8*
346 %{_mandir}/man8/amrestore.8*
This page took 0.050233 seconds and 4 git commands to generate.