]> git.pld-linux.org Git - packages/amanda.git/blob - amanda.spec
- started update to 2.5.0p2
[packages/amanda.git] / amanda.spec
1 # TODO:
2 # - add missing files to proper subpackages
3 #
4 # Conditional build:
5 %bcond_with     xfs     # with support for xfsdump
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.0p2
11 Release:        0.1
12 License:        BSD
13 Group:          Networking/Utilities
14 Source0:        http://umn.dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
15 # Source0-md5:  073828b8b5a5c377a08f8f19b5eccf85
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:  libtool
31 BuildRequires:  readline-devel >= 4.2
32 BuildRequires:  rpmbuild(macros) >= 1.268
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(postun):       /sbin/ldconfig
67 Requires(postun):       /usr/sbin/groupdel
68 Requires(postun):       /usr/sbin/userdel
69 Requires(pre):  /bin/id
70 Requires(pre):  /usr/bin/getgid
71 Requires(pre):  /usr/sbin/groupadd
72 Requires(pre):  /usr/sbin/useradd
73 Provides:       group(amanda)
74 Provides:       user(amanda)
75
76 %description libs
77 Amanda shared libraries.
78
79 %description libs -l pl
80 Biblioteki wspó³dzielone pakietu amanda.
81
82 %package client
83 Summary:        The client side of Amanda
84 Summary(pl):    Klient Amandy
85 Group:          Networking/Utilities
86 Requires(post,postun):  /sbin/ldconfig
87 Requires:       %{name}-libs = %{version}-%{release}
88 Requires:       rc-inetd
89 Conflicts:      tar < 1.13
90
91 %description client
92 The Amanda-client package should be installed on any machine that will
93 be backed up by AMANDA (including the server if it also needs to be
94 backed up). You will also need to install the amanda package to each
95 AMANDA client. It requires at least one of dump and GNU tar installed.
96
97 %description client -l pl
98 Ten pakiet powinien byæ zainstalowany ma maszynach, z których
99 zawarto¶ci bêd± tworzone kopie zapasowe. Wymaga zainstalowanego co
100 najmniej jednego z pakietów dump i GNU tar.
101
102 %package server
103 Summary:        The server side of Amanda
104 Summary(pl):    Serwer Amandy
105 Group:          Networking/Utilities
106 Requires(post,postun):  /sbin/ldconfig
107 Requires:       %{name}-libs = %{version}-%{release}
108 Requires:       /etc/cron.d
109 Requires:       crondaemon
110 Requires:       gnuplot
111 Requires:       mt-st
112 Requires:       mtx
113 Requires:       rc-inetd
114 Obsoletes:      amanda
115
116 %description server
117 The amanda-server package should be installed on the AMANDA server,
118 the machine attached to the device (such as a tape drive) where
119 backups will be written. You will also need to install the amanda
120 package to the AMANDA server. And, if the server is also to be backed
121 up, the server also needs to have the amanda-client package installed.
122
123 %description server -l pl
124 Ten pakiet powinien byæ zainstalowany na maszynach, na których bêd±
125 magazynowane kopie zapasowe (lub do których podpiête s± urz±dzenia
126 typu streamer).
127
128 %prep
129 %setup -q
130 %patch0 -p1
131 %patch1 -p1
132 %patch2 -p1
133 %patch3 -p1
134
135 # kill libtool.m4 copy
136 head -n 1147 acinclude.m4 > acinc.tmp
137 mv -f acinc.tmp acinclude.m4
138
139 %build
140 %{__libtoolize}
141 %{__aclocal}
142 %{__autoconf}
143 %{__automake}
144 %configure \
145         GNUPLOT=/usr/bin/gnuplot \
146         MAILER=/bin/mail \
147         PRINT=/usr/bin/lpr \
148         DUMP=/sbin/dump \
149         RESTORE=/sbin/restore \
150         XFSDUMP=/sbin/xfsdump \
151         XFSRESTORE=/sbin/xfsrestore \
152         --disable-static \
153         --enable-shared \
154         --with-index-server=localhost \
155         --with-user=amanda \
156         --with-group=amanda \
157         --with-tape-device=/dev/null \
158         --with-ftape-rawdevice=/dev/null \
159         --with-changer-device=/dev/null \
160         --with-fqdn \
161         --with-smbclient=%{_bindir}/smbclient \
162         --with-bsd-security \
163         --with-buffered-dump \
164         --with-amandahosts \
165         --with-debugging=%{_localstatedir}/amanda/debug \
166         --with-gnutar-listdir=%{_localstatedir}/amanda/gnutar-lists \
167         --with-tmpdir=/var/tmp
168
169 %{__make}
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{amanda,cron.d,sysconfig/rc-inetd} \
174         $RPM_BUILD_ROOT%{_localstatedir}/amanda/gnutar-lists \
175         $RPM_BUILD_ROOT%{_mandir}/man1
176
177 %{__make} install \
178         DESTDIR=$RPM_BUILD_ROOT \
179         SETUID_GROUP=`id -g`
180
181 install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/amanda-srv
182 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE2} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amanda
183 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE3} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amandaidx
184 sed -e 's|/usr/lib|%{_libdir}|' %{SOURCE4} >$RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/amidxtape
185
186 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/amanda
187 install example/*.ps $RPM_BUILD_ROOT%{_localstatedir}/amanda
188 touch $RPM_BUILD_ROOT%{_localstatedir}/amanda/.amandahosts
189
190 > $RPM_BUILD_ROOT%{_sysconfdir}/amandates
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %triggerpostun -- amanda-libs < 2.4.2p2-3
196 /usr/sbin/chsh -s /bin/sh amanda
197
198 %triggerpostun -- amanda-libs < 2.4.2p2-12
199 /usr/sbin/usermod -G disk amanda
200
201 %pre libs
202 %groupadd -P %{name}-libs -g 80 amanda
203 %useradd -P %{name}-libs -u 80 -G disk -d /var/lib/amanda -s /bin/sh -c "Amanda Backup user" -g amanda amanda
204
205 %post   libs -p /sbin/ldconfig
206
207 %postun libs
208 /sbin/ldconfig
209 if [ "$1" = "0" ]; then
210         %userremove amanda
211         %groupremove amanda
212 fi
213
214 %post client
215 /sbin/ldconfig
216 %service -q rc-inetd reload
217
218 %postun client
219 /sbin/ldconfig
220 if [ "$1" = 0 ]; then
221         %service -q rc-inetd reload
222 fi
223
224 %post server
225 /sbin/ldconfig
226 %service -q rc-inetd reload
227 if [ "$1" = "1" ]; then
228         echo "Don't forget to edit /etc/cron.d/amanda-srv." 1>&2
229 fi
230
231 %postun server
232 /sbin/ldconfig
233 if [ "$1" = 0 ]; then
234         %service -q rc-inetd reload
235 fi
236
237 %files libs
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_libdir}/libamanda*.so
240 %attr(755,root,root) %{_libdir}/libamtape*.so
241 %dir %{_libexecdir}
242 %attr(770,root,amanda) %dir %{_localstatedir}/amanda
243 %attr(640,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_localstatedir}/amanda/.amandahosts
244
245 %files server
246 %defattr(644,root,root,755)
247 %doc docs/*
248 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amidxtape
249 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amandaidx
250
251 %attr(750,root,amanda) %dir %{_sysconfdir}/amanda
252 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,amanda) %{_sysconfdir}/amanda/*
253
254 %attr(664,root,amanda) %{_localstatedir}/amanda/*.ps
255
256 %config(noreplace) %attr(640,root,root) /etc/cron.d/amanda-srv
257
258 %attr(755,root,root) %{_libdir}/libamserver*.so
259 %attr(755,root,root) %{_libexecdir}/amindexd
260 %attr(755,root,root) %{_libexecdir}/amtrmidx
261 %attr(755,root,root) %{_libexecdir}/driver
262 %attr(4754,root,amanda) %{_libexecdir}/dumper
263 %attr(4754,root,amanda) %{_libexecdir}/planner
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}/amlogroll
268 %attr(755,root,root) %{_libexecdir}/amplot.awk
269 %attr(755,root,root) %{_libexecdir}/amplot.g
270 %attr(755,root,root) %{_libexecdir}/amplot.gp
271 %attr(755,root,root) %{_libexecdir}/amtrmlog
272 %attr(755,root,root) %{_libexecdir}/chg-chio
273 %attr(755,root,root) %{_libexecdir}/chg-chs
274 %attr(755,root,root) %{_libexecdir}/chg-disk
275 %attr(755,root,root) %{_libexecdir}/chg-iomega
276 %attr(755,root,root) %{_libexecdir}/chg-juke
277 %attr(755,root,root) %{_libexecdir}/chg-manual
278 %attr(755,root,root) %{_libexecdir}/chg-mcutil
279 %attr(755,root,root) %{_libexecdir}/chg-mtx
280 %attr(755,root,root) %{_libexecdir}/chg-multi
281 %attr(755,root,root) %{_libexecdir}/chg-null
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) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/amanda
328 %attr(664,root,amanda) %config(noreplace) %verify(not md5 mtime size) %{_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}/amqde
333 %attr(4754,root,amanda) %{_libexecdir}/calcsize
334 %attr(4754,root,amanda) %{_libexecdir}/killpgrp
335 %attr(755,root,root) %{_libexecdir}/patch-system
336 %attr(4754,root,amanda) %{_libexecdir}/rundump
337 %attr(4754,root,amanda) %{_libexecdir}/runtar
338 %attr(4754,root,amanda) %{_libexecdir}/selfcheck
339 %attr(755,root,root) %{_libexecdir}/sendbackup
340 %attr(755,root,root) %{_libexecdir}/sendsize
341 %attr(755,root,root) %{_sbindir}/amdd
342 %attr(755,root,root) %{_sbindir}/ammt
343 %attr(755,root,root) %{_sbindir}/amrecover
344 %attr(755,root,root) %{_sbindir}/amrestore
345 %attr(770,root,amanda) %dir %{_localstatedir}/amanda/gnutar-lists
346 %{_mandir}/man8/amdd.8*
347 %{_mandir}/man8/ammt.8*
348 %{_mandir}/man8/amrecover.8*
349 %{_mandir}/man8/amrestore.8*
This page took 0.122922 seconds and 4 git commands to generate.