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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.28