]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
e2f28ce73c2fc2eb363bbc177be486544c0586df
[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 echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
237
238 %postun server
239 /sbin/ldconfig
240 if [ -f /var/lock/subsys/rc-inetd ]; then
241         /etc/rc.d/init.d/rc-inetd restart
242 fi
243
244 %files libs
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/libamanda*.so
247 %attr(755,root,root) %{_libdir}/libamtape*.so
248 %attr(770,amanda,amanda) %dir %{_libexecdir}
249 %attr(770,amanda,amanda) %dir %{_localstatedir}/amanda
250
251 %files server
252 %defattr(644,root,root,755)
253 %doc docs/*
254 %config(noreplace) /etc/sysconfig/rc-inetd/amidxtape
255 %config(noreplace) /etc/sysconfig/rc-inetd/amandaidx
256
257 %attr(750,amanda,amanda) %dir %{_sysconfdir}/amanda
258 %config(noreplace) %attr(640,amanda,amanda) %{_sysconfdir}/amanda/*
259
260 %attr(664,amanda,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) %{_libexecdir}/amindexd
266 %attr(755,root,root) %{_libexecdir}/amtrmidx
267 %attr(755,root,root) %{_libexecdir}/driver
268 %attr(4754,root,amanda) %{_libexecdir}/dumper
269 %attr(4754,root,amanda) %{_libexecdir}/planner
270 %attr(755,root,root) %{_libexecdir}/amcat.awk
271 %attr(755,root,root) %{_libexecdir}/amcleanupdisk
272 %attr(755,root,root) %{_libexecdir}/amidxtaped
273 %attr(755,root,root) %{_libexecdir}/amlogroll
274 %attr(755,root,root) %{_libexecdir}/amplot.awk
275 %attr(755,root,root) %{_libexecdir}/amplot.g
276 %attr(755,root,root) %{_libexecdir}/amplot.gp
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-juke
281 %attr(755,root,root) %{_libexecdir}/chg-manual
282 %attr(755,root,root) %{_libexecdir}/chg-mtx
283 %attr(755,root,root) %{_libexecdir}/chg-multi
284 %attr(755,root,root) %{_libexecdir}/chg-rait
285 %attr(755,root,root) %{_libexecdir}/chg-rth
286 %attr(755,root,root) %{_libexecdir}/chg-scsi
287 %attr(755,root,root) %{_libexecdir}/chg-zd-mtx
288 %attr(755,root,root) %{_libexecdir}/taper
289 %attr(755,root,root) %{_sbindir}/amadmin
290 %attr(4754,root,amanda) %{_sbindir}/amcheck
291 %attr(755,root,root) %{_sbindir}/amcheckdb
292 %attr(755,root,root) %{_sbindir}/amcleanup
293 %attr(755,root,root) %{_sbindir}/amdump
294 %attr(755,root,root) %{_sbindir}/amflush
295 %attr(755,root,root) %{_sbindir}/amgetconf
296 %attr(755,root,root) %{_sbindir}/amlabel
297 %attr(755,root,root) %{_sbindir}/amoverview
298 %attr(755,root,root) %{_sbindir}/amplot
299 %attr(755,root,root) %{_sbindir}/amreport
300 %attr(755,root,root) %{_sbindir}/amrmtape
301 %attr(755,root,root) %{_sbindir}/amstatus
302 %attr(755,root,root) %{_sbindir}/amtape
303 %attr(755,root,root) %{_sbindir}/amtapetype
304 %attr(755,root,root) %{_sbindir}/amtoc
305 %attr(755,root,root) %{_sbindir}/amverify
306 %attr(755,root,root) %{_sbindir}/amverifyrun
307 %{_mandir}/man8/amadmin.8*
308 %{_mandir}/man8/amanda.8*
309 %{_mandir}/man8/amcheck.8*
310 %{_mandir}/man8/amcheckdb.8*
311 %{_mandir}/man8/amcleanup.8*
312 %{_mandir}/man8/amdump.8*
313 %{_mandir}/man8/amflush.8*
314 %{_mandir}/man8/amgetconf.8*
315 %{_mandir}/man8/amlabel.8*
316 %{_mandir}/man8/amoverview.8*
317 %{_mandir}/man8/amplot.8*
318 %{_mandir}/man8/amreport.8*
319 %{_mandir}/man8/amrmtape.8*
320 %{_mandir}/man8/amstatus.8*
321 %{_mandir}/man8/amtape.8*
322 %{_mandir}/man8/amtapetype.8*
323 %{_mandir}/man8/amtoc.8*
324 %{_mandir}/man8/amverify.8*
325 %{_mandir}/man8/amverifyrun.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}/amdd
343 %attr(755,root,root) %{_sbindir}/ammt
344 %attr(755,root,root) %{_sbindir}/amrecover
345 %attr(755,root,root) %{_sbindir}/amrestore
346 %attr(770,amanda,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
347 %{_mandir}/man8/amdd.8*
348 %{_mandir}/man8/ammt.8*
349 %{_mandir}/man8/amrecover.8*
350 %{_mandir}/man8/amrestore.8*
This page took 0.068113 seconds and 2 git commands to generate.