]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- added without client/server bconds
[packages/amanda.git] / amanda.spec
1 #
2 # Conditional build:
3 %bcond_with     xfs     # with support for xfsdump
4 %bcond_without  client  # without client package
5 %bcond_without  server  # without server package
6 #
7 Summary:        A network-capable tape backup solution
8 Summary(pl):    Sieciowo zorientowany system tworzenia kopii zapasowych
9 Name:           amanda
10 Version:        2.5.1p2
11 Release:        0.3
12 License:        BSD
13 Group:          Networking/Utilities
14 Source0:        http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
15 # Source0-md5:  6811f8a296650a6c0f64766b6e6abbe1
16 Source1:        %{name}-srv.crontab
17 Source2:        %{name}.inetd
18 Source3:        %{name}idx.inetd
19 Source4:        amidxtape.inetd
20 Source5:        %{name}.conf
21 Patch0:         %{name}-no_libnsl.patch
22 Patch1:         %{name}-ac25x.patch
23 Patch2:         %{name}-chg-zd-mtx-sh.patch
24 Patch3:         %{name}-tar.patch
25 URL:            http://www.amanda.org/
26 BuildRequires:  autoconf >= 2.53
27 BuildRequires:  automake
28 BuildRequires:  dump
29 BuildRequires:  flex
30 BuildRequires:  libxslt-progs
31 BuildRequires:  libtool
32 BuildRequires:  readline-devel >= 4.2
33 BuildRequires:  rpmbuild(macros) >= 1.268
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(postun):       /sbin/ldconfig
68 Requires(postun):       /usr/sbin/groupdel
69 Requires(postun):       /usr/sbin/userdel
70 Requires(pre):  /bin/id
71 Requires(pre):  /usr/bin/getgid
72 Requires(pre):  /usr/sbin/groupadd
73 Requires(pre):  /usr/sbin/useradd
74 Provides:       group(amanda)
75 Provides:       user(amanda)
76
77 %description libs
78 Amanda shared libraries.
79
80 %description libs -l pl
81 Biblioteki wspó³dzielone pakietu amanda.
82
83 %package client
84 Summary:        The client side of Amanda
85 Summary(pl):    Klient Amandy
86 Group:          Networking/Utilities
87 Requires(post,postun):  /sbin/ldconfig
88 Requires:       %{name}-libs = %{version}-%{release}
89 Requires:       rc-inetd
90 Conflicts:      tar < 1.13
91
92 %description client
93 The Amanda-client package should be installed on any machine that will
94 be backed up by AMANDA (including the server if it also needs to be
95 backed up). You will also need to install the amanda package to each
96 AMANDA client. It requires at least one of dump and GNU tar installed.
97
98 %description client -l pl
99 Ten pakiet powinien byæ zainstalowany ma maszynach, z których
100 zawarto¶ci bêd± tworzone kopie zapasowe. Wymaga zainstalowanego co
101 najmniej jednego z pakietów dump i GNU tar.
102
103 %package server
104 Summary:        The server side of Amanda
105 Summary(pl):    Serwer Amandy
106 Group:          Networking/Utilities
107 Requires(post,postun):  /sbin/ldconfig
108 Requires:       %{name}-libs = %{version}-%{release}
109 Requires:       /etc/cron.d
110 Requires:       crondaemon
111 Requires:       gnuplot
112 Requires:       mt-st
113 Requires:       mtx
114 Requires:       rc-inetd
115 Obsoletes:      amanda
116
117 %description server
118 The amanda-server package should be installed on the AMANDA server,
119 the machine attached to the device (such as a tape drive) where
120 backups will be written. You will also need to install the amanda
121 package to the AMANDA server. And, if the server is also to be backed
122 up, the server also needs to have the amanda-client package installed.
123
124 %description server -l pl
125 Ten pakiet powinien byæ zainstalowany na maszynach, na których bêd±
126 magazynowane kopie zapasowe (lub do których podpiête s± urz±dzenia
127 typu streamer).
128
129 %prep
130 %setup -q
131 %patch0 -p1
132 %patch1 -p1
133 %patch2 -p1
134 %patch3 -p1
135
136 # kill libtool.m4 copy
137 head -n 1147 acinclude.m4 > acinc.tmp
138 mv -f acinc.tmp acinclude.m4
139
140 %build
141 %{__libtoolize}
142 %{__aclocal}
143 %{__autoconf}
144 %{__automake}
145 %configure \
146         GNUPLOT=/usr/bin/gnuplot \
147         MAILER=/bin/mail \
148         PRINT=/usr/bin/lpr \
149         DUMP=/sbin/dump \
150         RESTORE=/sbin/restore \
151         %{?with_xfs:XFSDUMP=/sbin/xfsdump} \
152         %{?with_xfs:XFSRESTORE=/sbin/xfsrestore} \
153         --disable-static \
154         --enable-shared \
155         %{!?with_server:--without-server} \
156         %{!?with_client:--without-client} \
157         --with-index-server=localhost \
158         --with-user=amanda \
159         --with-group=amanda \
160         --with-tape-device=/dev/null \
161         --with-ftape-rawdevice=/dev/null \
162         --with-changer-device=/dev/null \
163         --with-fqdn \
164         --with-smbclient=%{_bindir}/smbclient \
165         --with-bsd-security \
166         --with-ssh-security \
167         --with-buffered-dump \
168         --with-amandahosts \
169         --with-debugging=%{_localstatedir}/amanda/debug \
170         --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \
171         --with-tmpdir=/var/tmp
172
173 %{__make}
174
175 %install
176 rm -rf $RPM_BUILD_ROOT
177 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
178         $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists \
179         $RPM_BUILD_ROOT%{_mandir}/man1
180
181 %{__make} install \
182         DESTDIR=$RPM_BUILD_ROOT \
183         SETUID_GROUP=`id -g`
184
185 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
186 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
187 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
188 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
189
190 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
191 install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
192 touch $RPM_BUILD_ROOT%{_localstatedir}/amanda/.amandahosts
193
194 > $RPM_BUILD_ROOT%{_sysconfdir}/amandates
195
196 %clean
197 rm -rf $RPM_BUILD_ROOT
198
199 %triggerpostun -- %{name}-libs < 2.5.1p2-1
200 /usr/sbin/usermod -G disk,backup amanda
201 /usr/sbin/chsh -s /bin/sh amanda
202
203 %pre libs
204 %groupadd -P %{name}-libs -g 80 amanda
205 %useradd -P %{name}-libs -u 80 -G disk,backup -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
206
207 %post   libs -p /sbin/ldconfig
208
209 %postun libs
210 /sbin/ldconfig
211 if [ "$1" = "0" ]; then
212         %userremove amanda
213         %groupremove amanda
214 fi
215
216 %post client
217 /sbin/ldconfig
218 %service -q rc-inetd reload
219
220 %postun client
221 /sbin/ldconfig
222 if [ "$1" = 0 ]; then
223         %service -q rc-inetd reload
224 fi
225
226 %post server
227 /sbin/ldconfig
228 %service -q rc-inetd reload
229 if [ "$1" = "1" ]; then
230         echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
231 fi
232
233 %postun server
234 /sbin/ldconfig
235 if [ "$1" = 0 ]; then
236         %service -q rc-inetd reload
237 fi
238
239 %files libs
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libamanda*.so
242 %dir %{_libexecdir}
243 %attr(770,root,amanda) %dir %{_localstatedir}/amanda
244 %attr(600,amanda,amanda) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/amanda/.amandahosts
245
246 %if %{with server}
247 %files server
248 %defattr(644,root,root,755)
249 %doc docs/*
250 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
251 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
252
253 %attr(750,root,amanda) %dir %{_sysconfdir}/amanda
254 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/*
255
256 %attr(664,root,amanda) %{_localstatedir}/amanda/*.ps
257
258 %config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
259
260 %attr(755,root,root) %{_libdir}/libamserver*.so
261 %attr(755,root,root) %{_libdir}/libamtape*.so
262 %attr(755,root,root) %{_libdir}/librestore*.so
263
264 %attr(755,root,root) %{_libexecdir}/amcat.awk
265 %attr(755,root,root) %{_libexecdir}/amcleanupdisk
266 %attr(755,root,root) %{_libexecdir}/amidxtaped
267 %attr(755,root,root) %{_libexecdir}/amindexd
268 %attr(755,root,root) %{_libexecdir}/amlogroll
269 %attr(755,root,root) %{_libexecdir}/amplot.awk
270 %attr(755,root,root) %{_libexecdir}/amplot.g
271 %attr(755,root,root) %{_libexecdir}/amplot.gp
272 %attr(755,root,root) %{_libexecdir}/amtrmidx
273 %attr(755,root,root) %{_libexecdir}/amtrmlog
274 %attr(755,root,root) %{_libexecdir}/chg-chio
275 %attr(755,root,root) %{_libexecdir}/chg-chs
276 %attr(755,root,root) %{_libexecdir}/chg-disk
277 %attr(755,root,root) %{_libexecdir}/chg-iomega
278 %attr(755,root,root) %{_libexecdir}/chg-juke
279 %attr(755,root,root) %{_libexecdir}/chg-manual
280 %attr(755,root,root) %{_libexecdir}/chg-mcutil
281 %attr(755,root,root) %{_libexecdir}/chg-mtx
282 %attr(755,root,root) %{_libexecdir}/chg-multi
283 %attr(755,root,root) %{_libexecdir}/chg-null
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}/chunker
289 %attr(755,root,root) %{_libexecdir}/driver
290 %attr(4754,root,amanda) %{_libexecdir}/dumper
291 %attr(4754,root,amanda) %{_libexecdir}/planner
292 %attr(755,root,root) %{_libexecdir}/taper
293
294 %attr(755,root,root) %{_sbindir}/amadmin
295 %attr(755,root,root) %{_sbindir}/amaespipe
296 %attr(4754,root,amanda) %{_sbindir}/amcheck
297 %attr(755,root,root) %{_sbindir}/amcheckdb
298 %attr(755,root,root) %{_sbindir}/amcleanup
299 %attr(755,root,root) %{_sbindir}/amcrypt*
300 %attr(755,root,root) %{_sbindir}/amdd
301 %attr(755,root,root) %{_sbindir}/amdump
302 %attr(755,root,root) %{_sbindir}/amfetchdump
303 %attr(755,root,root) %{_sbindir}/amflush
304 %attr(755,root,root) %{_sbindir}/amgetconf
305 %attr(755,root,root) %{_sbindir}/amlabel
306 %attr(755,root,root) %{_sbindir}/ammt
307 %attr(755,root,root) %{_sbindir}/amoverview
308 %attr(755,root,root) %{_sbindir}/amplot
309 %attr(755,root,root) %{_sbindir}/amreport
310 %attr(755,root,root) %{_sbindir}/amrestore
311 %attr(755,root,root) %{_sbindir}/amrmtape
312 %attr(755,root,root) %{_sbindir}/amstatus
313 %attr(755,root,root) %{_sbindir}/amtape
314 %attr(755,root,root) %{_sbindir}/amtapetype
315 %attr(755,root,root) %{_sbindir}/amtoc
316 %attr(755,root,root) %{_sbindir}/amverify
317 %attr(755,root,root) %{_sbindir}/amverifyrun
318 %{_mandir}/man5/amanda.conf.5*
319 %{_mandir}/man8/amadmin.8*
320 %{_mandir}/man8/amaespipe.8*
321 %{_mandir}/man8/amanda.8*
322 %{_mandir}/man8/amcheck.8*
323 %{_mandir}/man8/amcheckdb.8*
324 %{_mandir}/man8/amcleanup.8*
325 %{_mandir}/man8/amcrypt*.8*
326 %{_mandir}/man8/amdd.8*
327 %{_mandir}/man8/amdump.8*
328 %{_mandir}/man8/amfetchdump.8*
329 %{_mandir}/man8/amflush.8*
330 %{_mandir}/man8/amgetconf.8*
331 %{_mandir}/man8/amlabel.8*
332 %{_mandir}/man8/ammt.8*
333 %{_mandir}/man8/amoverview.8*
334 %{_mandir}/man8/amplot.8*
335 %{_mandir}/man8/amreport.8*
336 %{_mandir}/man8/amrestore.8*
337 %{_mandir}/man8/amrmtape.8*
338 %{_mandir}/man8/amstatus.8*
339 %{_mandir}/man8/amtape.8*
340 %{_mandir}/man8/amtapetype.8*
341 %{_mandir}/man8/amtoc.8*
342 %{_mandir}/man8/amverify.8*
343 %{_mandir}/man8/amverifyrun.8*
344 %endif
345
346 %if %{with client}
347 %files client
348 %defattr(644,root,root,755)
349 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
350 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amandates
351 %attr(755,root,root) %{_libdir}/libamclient*.so
352 %attr(755,root,root) %{_libexecdir}/amandad
353 %attr(755,root,root) %{_libexecdir}/noop
354 %attr(755,root,root) %{_libexecdir}/patch-system
355 %attr(755,root,root) %{_libexecdir}/sendbackup
356 %attr(755,root,root) %{_libexecdir}/sendsize
357 %attr(755,root,root) %{_libexecdir}/versionsuffix
358 %attr(4754,root,amanda) %{_libexecdir}/calcsize
359 %attr(4754,root,amanda) %{_libexecdir}/killpgrp
360 %attr(4754,root,amanda) %{_libexecdir}/rundump
361 %attr(4754,root,amanda) %{_libexecdir}/runtar
362 %attr(4754,root,amanda) %{_libexecdir}/selfcheck
363 %attr(755,root,root) %{_sbindir}/amoldrecover
364 %attr(755,root,root) %{_sbindir}/amrecover
365 %attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
366 %{_mandir}/man5/amanda-client.conf.5*
367 %{_mandir}/man8/amrecover.8*
368 %endif
This page took 0.084386 seconds and 4 git commands to generate.