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