]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- removed default _sysconfdir definition, other cosmetics
[packages/amanda.git] / amanda.spec
1 #
2 # Conditional build:
3 # _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.4p1
9 Release:        1
10 License:        BSD
11 Group:          Networking/Utilities
12 Source0:        http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
13 # Source0-md5:  6336cd53e81877a720a5104330731e75
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}-bug18322.patch
21 Patch2:         %{name}-no_private_libtool.m4.patch
22 Patch3:         %{name}-ac25x.patch
23 Patch4:         %{name}-chg-zd-mtx-sh.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 touch COPYING
136 rm -f missing
137 %{__libtoolize}
138 %{__aclocal}
139 %{__autoconf}
140 %{__automake}
141 %configure \
142         --disable-static \
143         --enable-shared \
144         --with-index-server=localhost \
145         --with-user=amanda \
146         --with-group=amanda \
147         --with-tape-device=/dev/null \
148         --with-ftape-rawdevice=/dev/null \
149         --with-changer-device=/dev/null \
150         --with-fqdn \
151         --with-smbclient=%{_bindir}/smbclient \
152         --with-bsd-security \
153         --with-buffered-dump \
154         --with-amandahosts \
155         --with-debugging=%{_localstatedir}/amanda/debug \
156         --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \
157         --with-tmpdir=/var/tmp
158
159 %{__make}
160
161 %install
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
164         $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists \
165         $RPM_BUILD_ROOT%{_mandir}/man1
166
167 %{__make} install \
168         DESTDIR=$RPM_BUILD_ROOT \
169         SETUID_GROUP=`id -g`
170
171 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
172 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
173 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
174 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
175
176 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
177 install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
178
179 > $RPM_BUILD_ROOT%{_sysconfdir}/amandates
180
181 %clean
182 rm -rf $RPM_BUILD_ROOT
183
184 %triggerpostun -- amanda-libs < 2.4.2p2-3
185 /usr/sbin/chsh -s /bin/sh amanda
186
187 %triggerpostun -- amanda-libs < 2.4.2p2-12
188 /usr/sbin/usermod -G disk amanda
189
190 %pre libs
191 if [ -n "`/usr/bin/getgid amanda`" ]; then
192         if [ "`getgid amanda`" != "80" ]; then
193                 echo "Error: group amanda doesn't have gid=80. Correct this before installing amanda-libs." 1>&2
194                 exit 1
195         fi
196 else
197         /usr/sbin/groupadd -g 80 -r -f amanda
198 fi
199 if [ -n "`/bin/id -u amanda 2>/dev/null`" ]; then
200         if [ "`/bin/id -u amanda`" != "80" ]; then
201                 echo "Error: user amanda doesn't have uid=80. Correct this before installing amanda-libs." 1>&2
202                 exit 1
203         fi
204 else
205         /usr/sbin/useradd -u 80 -G disk -r -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda 1>&2
206 fi
207
208 %post   libs -p /sbin/ldconfig
209
210 %postun libs
211 /sbin/ldconfig
212 if [ "$1" = "0" ]; then
213         /usr/sbin/userdel amanda
214         /usr/sbin/groupdel amanda
215 fi
216
217 %post client
218 /sbin/ldconfig
219 if [ -f /var/lock/subsys/rc-inetd ]; then
220         /etc/rc.d/init.d/rc-inetd restart 1>&2
221 else
222         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server." 1>&2
223 fi
224
225 %postun client
226 /sbin/ldconfig
227 if [ -f /var/lock/subsys/rc-inetd ]; then
228         /etc/rc.d/init.d/rc-inetd restart
229 fi
230
231 %post server
232 /sbin/ldconfig
233 if [ -f /var/lock/subsys/rc-inetd ]; then
234         /etc/rc.d/init.d/rc-inetd restart 1>&2
235 else
236         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server." 1>&2
237 fi
238 echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
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,root,amanda) %dir %{_libexecdir}
251 %attr(770,root,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.078899 seconds and 4 git commands to generate.