/[packages]/cauldron/afbackup/current/SPECS/afbackup.spec
ViewVC logotype

Annotation of /cauldron/afbackup/current/SPECS/afbackup.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 345320 - (hide annotations) (download)
Fri Jan 11 02:32:09 2013 UTC (11 years, 11 months ago) by umeabot
File size: 11097 byte(s)
Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild
1 dmorgan 83020 %define name afbackup
2     %define version 3.5.3
3 umeabot 345320 %define release %mkrel 5
4 dmorgan 83020
5     %define cryptkey afbackup
6     %define clientconf afclient.conf
7     %define serverconf afserver.conf
8     %define confdir %{_sysconfdir}/afbackup
9     %define bindir %{_sbindir}
10     %define logdir %{_var}/log/afbackup
11     %define vardir %{_var}/lib/afbackup
12     %define commondir %{_libdir}/afbackup
13     %define rexecdir %{_libexecdir}/afbackup
14     %define libdir %{confdir}
15    
16     %define summary Afbackup is a client-server backup system
17    
18     Summary: %summary
19     Name: %name
20     Version: %version
21     Release: %release
22     License: GPL
23     Group: Archiving/Backup
24     URL: http://afbackup.sf.net
25     Source0: %name-%version.tar.gz
26     Source1: afbackup-xinetd.afbackup
27     Source3: afbackup-afmbackup-rc
28     Patch0: afbackup-3.3.6-configs.patch
29     #patch1 sent upstream (Kharec)
30     Patch1: afbackup-3.5.3-fix-str-fmt.patch
31 colin 231266 Patch2: afbackup-3.5.3-lsb.patch
32 dmorgan 83020 BuildRoot: %_tmppath/%name-buildroot
33     Requires: sharutils
34 dmorgan 83022 BuildRequires: libopenssl-devel zlib-devel
35 dmorgan 83020
36     %description
37     Client-Server Backup System
38     This is a client-server backup system offering several workstations a
39     centralized backup to a special backup server. Backing up only one
40     computer is easily possible, too. Any streaming device can be used
41     for writing the data to it, usually this will be a tape
42     device. Writing backups is normally done sequentially: The next
43     writing to tape goes to the end of the previous write no matter where
44     you have restored from in the meantime. This package is for server or
45     client with remote-start.
46    
47     Features:
48     - Authentication of the client is performed before it can take over control
49     - Access restriction for the streamer device -> security
50     - Client-side per-file compression -> reliability
51     - Data stream is written to tape in pieces -> fast finding of files
52     - Tape position logging for each file
53     - Tape capacity is fully used
54     - Full / incremental backups
55     - Raw partitions can be backuped
56     - Client and Server buffering for maximal throughput is done
57     - DES authentication support
58    
59     Documentation:
60     http://afbackup-doc.sourceforge.net/html/
61    
62     %package client
63     Summary: AF's backup system client
64     Group: Archiving/Backup
65     Requires: sharutils
66    
67     %description client
68     Client-Server Backup System (Client side)
69     This is a client-server backup system offering several workstations a
70     centralized backup to a special backup server. Backing up only one
71     computer is easily possible, too. Any streaming device can be used
72     for writing the data to it, usually this will be a tape
73     device. Writing backups is normally done sequentially: The next
74     writing to tape goes to the end of the previous write no matter where
75     you have restored from in the meantime. This is only the client, you
76     need to have a server running on either this or another host.
77    
78     Features:
79     - Authentication of the client is performed before it can take over control
80     - Access restriction for the streamer device -> security
81     - Client-side per-file compression -> reliability
82     - Data stream is written to tape in pieces -> fast finding of files
83     - Tape position logging for each file
84     - Tape capacity is fully used
85     - Full / incremental backups
86     - Raw partitions can be backuped
87     - Client and Server buffering for maximal throughput is done
88     - DES authentication support
89    
90     Documentation:
91     http://afbackup-doc.sourceforge.net/html/
92    
93     %prep
94     %setup -q -n %{name}-%{version}
95     %patch0 -p1 -b .cfg
96     %patch1 -p0 -b .str
97 colin 231266 %patch2 -p1 -b .lsb
98 dmorgan 83020
99     %build
100     %configure2_5x --without-prefixext \
101     --with-clientbindir=%{bindir} \
102     --with-clientconf=%{clientconf} \
103     --with-clientconfdir=%{confdir} \
104     --with-clientlibdir=%{libdir} \
105     --with-clientlogdir=%{logdir} \
106     --with-clientmandir=%{_mandir} \
107     --with-clientvardir=%{vardir} \
108     --with-commondir=%{commondir} \
109     --with-commondatadir=%{commondir} \
110     --with-commonshlibdir=%{commondir} \
111     --with-rexecdir=%{rexecdir} \
112     --with-serverbindir=%{bindir} \
113     --with-serverconf=%{serverconf} \
114     --with-serverconfdir=%{confdir} \
115     --with-serverlibdir=%{libdir} \
116     --with-serverlogdir=%{logdir} \
117     --with-servermandir=%{_mandir} \
118     --with-servervardir=%{vardir} \
119     --with-zlib \
120     --disable-nls \
121     --sysconfdir=%{confdir} \
122     --with-des --with-des-ldflag=-lcrypto --with-des-include=/usr/include/openssl
123    
124     echo %{cryptkey} | make all OPTIMIZE="$RPM_OPT_FLAGS"
125    
126     %install
127     rm -rf %buildroot
128     mkdir -p %{buildroot}%{_mandir}/man8
129     mkdir -p %{buildroot}%{logdir}
130     mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
131     mkdir -p %{buildroot}%{_initrddir}
132     install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/xinetd.d/afbackup-xinetd
133     install -m 755 %{SOURCE3} %{buildroot}%{_initrddir}/afbackup
134     make install.client install.server \
135     SERVERBINDIR=%{buildroot}%{bindir} \
136     SERVERCONFDIR=%{buildroot}%{confdir} \
137     SERVERLIBDIR=%{buildroot}%{libdir} \
138     SERVERVARDIR=%{buildroot}%{vardir} \
139     CLIENTBINDIR=%{buildroot}%{bindir} \
140     CLIENTCONFDIR=%{buildroot}%{confdir} \
141     CLIENTLIBDIR=%{buildroot}%{libdir} \
142     CLIENTVARDIR=%{buildroot}%{vardir} \
143     SERVERREXECDIR=%{buildroot}%{rexecdir} \
144     COMMONDIR=%{buildroot}%{commondir} \
145     COMMONDATADIR=%{buildroot}%{commondir} \
146     COMMONSHLIBDIR=%{buildroot}%{commondir} \
147     CLIENTMANDIR=%{buildroot}%{_mandir} \
148     SERVERMANDIR=%{buildroot}%{_mandir}
149    
150     make install.rexeclinks \
151     CLIENTBINDIR=%{bindir} \
152     SERVERREXECDIR=%{buildroot}%{rexecdir}
153    
154     # fix afbackup verify error
155     rm -f %{buildroot}%{rexecdir}/verify
156     ln -s %{bindir}/afverify %{buildroot}%{rexecdir}/verify
157     echo %{cryptkey} >%{buildroot}%{confdir}/cryptkey
158    
159     %post
160     grep -q '/usr/lib/afbackup/rexec' %{confdir}/%{serverconf} && {
161     echo "Upgrade afserver.conf"
162     sed 's,/usr/lib/afbackup/rexec,%{rexecdir},' %{confdir}/%{serverconf} >%{confdir}/%{serverconf}.%{version}
163     cat %{confdir}/%{serverconf}.%{version} >%{confdir}/%{serverconf}
164     }
165    
166     if ! grep -q ^afbackup %{_sysconfdir}/services
167     then
168     echo "afbackup 2988/tcp # Afbackup system" >>%{_sysconfdir}/services
169     fi
170    
171     if ! grep -q ^afmbackup %{_sysconfdir}/services
172     then
173     echo "afmbackup 2989/tcp # Afbackup system Multistream" >>%{_sysconfdir}/services
174     fi
175    
176     if [ -f %{_sysconfdir}/inetd.conf ]
177     then
178     if ! grep -q afbackup %{_sysconfdir}/inetd.conf
179     then
180     echo "afbackup stream tcp nowait root %{bindir}/afserver %{bindir}afserver %{confdir}/%{serverconf}" >>%{_sysconfdir}/inetd.conf
181     fi
182     fi
183    
184     /sbin/chkconfig --add afbackup
185    
186     %post client
187     grep -q '/usr/lib/afbackup/rexec' %{confdir}/%{serverconf} && {
188     echo "Upgrade afserver.conf"
189     sed 's,/usr/lib/afbackup/rexec,%{rexecdir},' %{confdir}/%{serverconf} >%{confdir}/%{serverconf}.%{version}
190     cat %{confdir}/%{serverconf}.%{version} >%{confdir}/%{serverconf}
191     }
192    
193    
194     if ! grep -q ^afbackup %{_sysconfdir}/services
195     then
196     echo "afbackup 2988/tcp # Afbackup system" >>%{_sysconfdir}/services
197     fi
198    
199     if ! grep -q ^afmbackup %{_sysconfdir}/services
200     then
201     echo "afmbackup 2989/tcp # Afbackup system Multistream" >>%{_sysconfdir}/services
202     fi
203    
204     %preun
205     if [ "$1" = "0" ]; then
206     /sbin/service afbackup stop || :
207     /sbin/chkconfig --del afbackup || :
208     fi
209    
210     %postun
211     if [ $1 -ge 1 ] ; then
212     /sbin/service afbackup condrestart 2>&1 > /dev/null || :
213     fi
214    
215     %clean
216     rm -rf %buildroot
217    
218     %files
219     %defattr(-,root,root)
220     %doc CONFIG INTRO README PROGRAMS
221     %attr(700,root,adm) %dir %{commondir}
222     %attr(700,root,adm) %dir %{rexecdir}
223     %{rexecdir}/afverify
224     %{rexecdir}/verify
225     %{rexecdir}/copy_tape
226     %{rexecdir}/full_backup
227     %{rexecdir}/incr_backup
228 pterjan 339641 %attr(750,root,adm) %{rexecdir}/update_indexes
229 dmorgan 83020 %config(noreplace) %{_sysconfdir}/xinetd.d/afbackup-xinetd
230     %config(noreplace) %{_sysconfdir}/afbackup/init.d/afbackup
231 colin 231266 %attr(755,root,root) %{_initrddir}/afbackup
232 dmorgan 83020 %attr(750,root,adm) %dir %{confdir}
233     %attr(640,root,adm) %config(noreplace) %{confdir}/%{serverconf}
234     %attr(640,root,adm) %config(noreplace) %{confdir}/changer.conf
235     %attr(640,root,adm) %config(noreplace) %{confdir}/%{clientconf}
236     %attr(600,root,adm) %config(noreplace) %{confdir}/cryptkey
237     %attr(640,root,adm) %{commondir}/aftcllib.tcl
238     %attr(711,root,adm) %dir %{vardir}
239     %attr(640,root,adm) %config(noreplace) %{vardir}/readonly_tapes
240     %attr(750,root,adm) %dir %{logdir}
241     %attr(750,root,adm) %{bindir}/afbackout
242     %attr(750,root,adm) %{bindir}/afbackup
243     %attr(750,root,adm) %{bindir}/afclient
244     %attr(750,root,adm) %{bindir}/afclientconfig
245     %attr(750,root,adm) %{bindir}/afmserver
246     %attr(750,root,adm) %{bindir}/afrestore
247     %attr(750,root,adm) %{bindir}/afserver
248     %attr(750,root,adm) %{bindir}/afserverconfig
249     %attr(750,root,adm) %{bindir}/afverify
250     %attr(750,root,adm) %{bindir}/autocptapes
251     %attr(750,root,adm) %{bindir}/cartagehandler
252     %attr(750,root,adm) %{bindir}/cart_ctl
253     %attr(750,root,adm) %{bindir}/cartis
254     %attr(750,root,adm) %{bindir}/cartready
255     %attr(750,root,adm) %{bindir}/changerready
256     %attr(750,root,adm) %{bindir}/copy_tape
257     %attr(750,root,adm) %{bindir}/full_backup
258     %attr(750,root,adm) %{bindir}/incr_backup
259     %attr(750,root,adm) %{bindir}/label_tape
260     %attr(750,root,adm) %{bindir}/serverconfig
261     %attr(750,root,adm) %{bindir}/update_indexes
262     %attr(750,root,adm) %{bindir}/xafclientconfig
263     %attr(750,root,adm) %{bindir}/xafrestore
264     %attr(750,root,adm) %{bindir}/xafserverconfig
265     %attr(750,root,adm) %{bindir}/xafserverstatus
266     %attr(750,root,adm) %{bindir}/xserverconfig
267     %attr(750,root,adm) %{bindir}/xserverstatus
268     %attr(750,root,adm) %{bindir}/__descrpt
269     %attr(750,root,adm) %{bindir}/__inc_link
270     %attr(750,root,adm) %{bindir}/__mt
271     %attr(750,root,adm) %{bindir}/__numset
272     %attr(750,root,adm) %{bindir}/__packpats
273     %attr(750,root,adm) %{bindir}/__piper
274     %attr(750,root,adm) %{bindir}/__z
275     %{_mandir}/*/*
276    
277     %files client
278     %defattr(-,root,root)
279     %doc CONFIG INTRO README PROGRAMS
280     %attr(750,root,adm) %dir %{commondir}
281 pterjan 339646 %attr(700,root,adm) %dir %{rexecdir}
282 dmorgan 83020 %attr(640,root,adm) %{commondir}/aftcllib.tcl
283 pterjan 339646 %attr(750,root,adm) %{rexecdir}/afrestore
284 dmorgan 83020 %attr(750,root,adm) %dir %{confdir}
285     %attr(640,root,adm) %config(noreplace) %{confdir}/%{clientconf}
286     %attr(600,root,adm) %config(noreplace) %{confdir}/cryptkey
287     %attr(711,root,adm) %dir %{vardir}
288     %attr(750,root,adm) %dir %{logdir}
289     %attr(750,root,adm) %{bindir}/afbackout
290     %attr(750,root,adm) %{bindir}/afbackup
291     %attr(750,root,adm) %{bindir}/afclient
292     %attr(750,root,adm) %{bindir}/afclientconfig
293     %attr(750,root,adm) %{bindir}/afrestore
294     %attr(750,root,adm) %{bindir}/afverify
295     %attr(750,root,adm) %{bindir}/autocptapes
296     %attr(750,root,adm) %{bindir}/clientconfig
297     %attr(750,root,adm) %{bindir}/copy_tape
298     %attr(750,root,adm) %{bindir}/full_backup
299     %attr(750,root,adm) %{bindir}/incr_backup
300     %attr(750,root,adm) %{bindir}/xafclientconfig
301     %attr(750,root,adm) %{bindir}/xafrestore
302     %attr(750,root,adm) %{bindir}/xclientconfig
303     %attr(750,root,adm) %{bindir}/xrestore
304     %attr(750,root,adm) %{bindir}/__descrpt
305     %attr(750,root,adm) %{bindir}/__packpats
306     %attr(750,root,adm) %{bindir}/__piper
307     %attr(750,root,adm) %{bindir}/__z
308     %{_mandir}/man8/afclient.8*
309     %{_mandir}/man8/%{clientconf}.8*
310     %{_mandir}/man8/afrestore.8*
311     %{_mandir}/man8/afverify.8*
312     %{_mandir}/man8/copy_tape.8*
313     %{_mandir}/man8/full_backup.8*
314     %{_mandir}/man8/incr_backup.8*
315     %{_mandir}/man8/xafrestore.8*
316    
317    
318    

  ViewVC Help
Powered by ViewVC 1.1.30