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