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