]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/mandrake/bacula.spec.in
Add support for install to /opt/bacula
[bacula/bacula] / bacula / platforms / mandrake / bacula.spec.in
1 # Bacula RPM spec file
2 # Copyright (C) 2000-2008 Kern Sibbald
3
4 # Platform Build Configuration
5
6 # basic defines for every build
7 %define _version @VERSION@
8 %define _release 1
9 %define depkgs_version 22Feb08
10 %define _rescuever @VERSION@
11 %define docs_version @VERSION@
12
13 # any patches for this release
14 # be sure to check the setup section for patch macros
15
16 #--------------------------------------------------------------------------
17 # it should not be necessary to change anything below here for a release
18 # except for patch macros in the setup section
19 #--------------------------------------------------------------------------
20
21 %define single_dir 0
22 %{?single_dir_install:%define single_dir 1}
23 %if %{single_dir}
24 %define _prefix /opt/bacula
25 %else
26 %define _prefix /usr
27 %endif
28
29 # third party packagers
30 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
31 %{?contrib_packager:%define _packager %{contrib_packager}}
32
33 Summary: Bacula - The Network Backup Solution
34 Name: bacula
35 Version: %{_version}
36 Release: %{_release}
37 Group: System Environment/Daemons
38 License: GPL v2
39 Source0: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
40 Source1: http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
41 Source2: Release_Notes-%{version}-%{release}.tar.gz
42 Source3: http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{docs_version}.tar.gz
43 Source4: http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
44 Source5: bacula-2.2.7-postgresql.patch
45 BuildRoot: %{_tmppath}/%{name}-root
46 URL: http://www.bacula.org/
47 Vendor: The Bacula Team
48 Packager: %{_packager}
49 Prefix: %{_prefix}
50
51 # define the basic package description
52 %define blurb Bacula - It comes by night and sucks the vital essence from your computers.
53 %define blurb2 Bacula is a set of computer programs that permit you (or the system
54 %define blurb3 administrator) to manage backup, recovery, and verification of computer
55 %define blurb4 data across a network of computers of different kinds. In technical terms,
56 %define blurb5 it is a network client/server based backup program. Bacula is relatively
57 %define blurb6 easy to use and efficient, while offering many advanced storage management
58 %define blurb7 features that make it easy to find and recover lost or damaged files.
59 %define blurb8 Bacula source code has been released under the GPL version 2 license.
60
61 # source directory locations
62 %define _docsrc ../%{name}-docs-%{docs_version}
63 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
64 %define depkgs ../depkgs
65
66 # directory locations
67 %if %{single_dir}
68 %define _sbindir /opt/bacula
69 %define _subsysdir /opt/bacula/working
70 %define sqlite_bindir /opt/bacula/sqlite
71 %define _mandir /opt/bacula
72 %define sysconf_dir /opt/bacula
73 %define script_dir /opt/bacula
74 %define working_dir /opt/bacula/working
75 %define pid_dir /opt/bacula/working
76 %else
77 %define _sbindir %_prefix/sbin
78 %define _subsysdir /var/lock/subsys
79 %define sqlite_bindir %_libdir/bacula/sqlite
80 %define _mandir %_prefix/share/man
81 %define sysconf_dir /etc/bacula
82 %define script_dir %_libdir/bacula
83 %define working_dir /var/lib/bacula
84 %define pid_dir /var/run
85 %endif
86
87 # NOTE these defines are used in some rather complex useradd and groupadd
88 # commands. If you change them examine the post scripts for consequences.
89 %define director_daemon_user bacula
90 %define storage_daemon_user bacula
91 %define file_daemon_user root
92 %define daemon_group bacula
93 # group that has write access to tape devices, usually disk on Linux
94 %define storage_daemon_group disk
95 %define user_file /etc/passwd
96 %define group_file /etc/group
97
98 # program locations
99 %define useradd /usr/sbin/useradd
100 %define groupadd /usr/sbin/groupadd
101 %define usermod /usr/sbin/usermod
102
103 # platform defines - set one below or define the build_xxx on the command line
104 # RedHat builds
105 %define rh7 0
106 %{?build_rh7:%define rh7 1}
107 %define rh8 0
108 %{?build_rh8:%define rh8 1}
109 %define rh9 0
110 %{?build_rh9:%define rh9 1}
111 # Fedora Core build
112 %define fc1 0
113 %{?build_fc1:%define fc1 1}
114 %define fc3 0
115 %{?build_fc3:%define fc3 1}
116 %define fc4 0
117 %{?build_fc4:%define fc4 1}
118 %define fc5 0
119 %{?build_fc5:%define fc5 1}
120 %define fc6 0
121 %{?build_fc6:%define fc6 1}
122 %define fc7 0
123 %{?build_fc7:%define fc7 1}
124 %define fc8 0
125 %{?build_fc8:%define fc8 1}
126 %define fc9 0
127 %{?build_fc9:%define fc9 1}
128 # Whitebox Enterprise build
129 %define wb3 0
130 %{?build_wb3:%define wb3 1}
131 # RedHat Enterprise builds
132 %define rhel3 0
133 %{?build_rhel3:%define rhel3 1}
134 %{?build_rhel3:%define wb3 1}
135 %define rhel4 0
136 %{?build_rhel4:%define rhel4 1}
137 %{?build_rhel4:%define fc3 1}
138 %define rhel5 0
139 %{?build_rhel5:%define rhel5 1}
140 %{?build_rhel5:%define fc6 1}
141 # CentOS build
142 %define centos3 0
143 %{?build_centos3:%define centos3 1}
144 %{?build_centos3:%define wb3 1}
145 %define centos4 0
146 %{?build_centos4:%define centos4 1}
147 %{?build_centos4:%define fc3 1}
148 %define centos5 0
149 %{?build_centos5:%define centos5 1}
150 %{?build_centos5:%define fc6 1}
151 # SL build
152 %define sl3 0
153 %{?build_sl3:%define sl3 1}
154 %{?build_sl3:%define wb3 1}
155 %define sl4 0
156 %{?build_sl4:%define sl4 1}
157 %{?build_sl4:%define fc3 1}
158 %define sl5 0
159 %{?build_sl5:%define sl5 1}
160 %{?build_sl5:%define fc6 1}
161 # SuSE build
162 %define su9 0
163 %{?build_su9:%define su9 1}
164 %define su10 0
165 %{?build_su10:%define su10 1}
166 %define su102 0
167 %{?build_su102:%define su102 1}
168 %define su103 0
169 %{?build_su103:%define su103 1}
170 %define su110 0
171 %{?build_su110:%define su110 1}
172 # Mandrake builds
173 %define mdk 0
174 %{?build_mdk:%define mdk 1}
175 %define mdv 0
176 %{?build_mdv:%define mdv 1}
177 %{?build_mdv:%define mdk 1}
178
179 # client only build
180 %define client_only 0
181 %{?build_client_only:%define client_only 1}
182
183 # test for a platform definition
184 %if !%{rh7} && !%{rh8} && !%{rh9} && !%{fc1} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9} && !%{wb3} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{mdk}
185 %{error: You must specify a platform. Please examine the spec file.}
186 exit 1
187 %endif
188
189 # database defines
190 # set for database support desired or define the build_xxx on the command line
191 %define mysql 0
192 %{?build_mysql:%define mysql 1}
193 # if using mysql 4.x define this and mysql above
194 # currently: Mandrake 10.1, SuSE 9.x & 10.0, RHEL4 and Fedora Core 4
195 %define mysql4 0
196 %{?build_mysql4:%define mysql4 1}
197 %{?build_mysql4:%define mysql 1}
198 # if using mysql 5.x define this and mysql above
199 # currently: SuSE 10.1 and Fedora Core 5
200 %define mysql5 0
201 %{?build_mysql5:%define mysql5 1}
202 %{?build_mysql5:%define mysql 1}
203 %define sqlite 0
204 %{?build_sqlite:%define sqlite 1}
205 %define postgresql 0
206 %{?build_postgresql:%define postgresql 1}
207
208 # test for a database definition
209 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{client_only}
210 %{error: You must specify database support. Please examine the spec file.}
211 exit 1
212 %endif
213
214 %if %{mysql}
215 %define db_backend mysql
216 %endif
217 %if %{sqlite}
218 %define db_backend sqlite3
219 %endif
220 %if %{postgresql}
221 %define db_backend postgresql
222 %endif
223
224 # 64 bit support
225 %define x86_64 0
226 %{?build_x86_64:%define x86_64 1}
227
228 # check what distribution we are
229 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4} || %{rhel5}
230 %define _dist %(grep Red /etc/redhat-release)
231 %endif
232 %if %{fc1} || %{fc4} || %{fc5} || %{fc7} || %{fc8} || %{fc9}
233 %define _dist %(grep Fedora /etc/redhat-release)
234 %endif
235 %if %{centos5} || %{centos4} || %{centos3}
236 %define _dist %(grep CentOS /etc/redhat-release)
237 %endif
238 %if %{sl5} ||%{sl4} || %{sl3}
239 %define _dist %(grep 'Scientific Linux' /etc/redhat-release)
240 %endif
241 %if %{fc3} && ! %{rhel4} && ! %{centos4} && ! %{sl4}
242 %define _dist %(grep Fedora /etc/redhat-release)
243 %endif
244 %if %{fc6} && ! %{rhel5} && ! %{centos5} && ! %{sl5}
245 %define _dist %(grep Fedora /etc/redhat-release)
246 %endif
247 %if %{wb3} && ! %{rhel3} && ! %{centos3} && ! %{sl3}
248 %define _dist %(grep White /etc/whitebox-release)
249 %endif
250 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
251 %define _dist %(grep -i SuSE /etc/SuSE-release)
252 %endif
253 %if %{mdk}
254 %define _dist %(grep Mand /etc/mandrake-release)
255 %endif
256 Distribution: %{_dist}
257
258 # Should we build gconsole, possible only if gtk= >= 2.4 available.
259 # leaving all the BuildRequires and Requires in place below for now.
260 # su10, fc3 and fc4 now nobuild, tray monitor fails to build as of 2.2.1 
261 # release as it needs 2.10
262
263 %define gconsole 1
264 %if %{rh7} || %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{su9} || %{su10}
265 %define gconsole 0
266 %endif
267 %if %{mdk} && ! %{mdv}
268 %define gconsole 0
269 %endif
270
271 # specifically disallow gconsole if desired
272 %{?nobuild_gconsole:%define gconsole 0}
273
274 # Should we build wxconsole, only wxWidgets >=2.6 is supported
275 # SuSE 10 and FC4 and newer
276 %define wxconsole 0
277 %{?build_wxconsole:%define wxconsole 1}
278
279 # Should we build bat
280 # requires >= Qt-4.2
281 %define bat 0
282 %{?build_bat:%define bat 1}
283
284 # should we turn on python support
285 %define python 0
286 %{?build_python:%define python 1}
287
288 # specifically disallow build of mtx package if desired
289 %define mtx 1
290 %{?nobuild_mtx:%define mtx 0}
291
292 # do we need to patch for old postgresql version?
293 %define old_pgsql 0
294 %{?build_old_pgsql:%define old_pgsql 1}
295
296 # Mandriva somehow forces the manpage file extension to bz2 rather than gz
297 %if %{mdk}
298 %define manpage_ext bz2
299 %else
300 %define manpage_ext gz
301 %endif
302
303 # for client only build
304 %if %{client_only}
305 %define mysql 0
306 %define mysql4 0
307 %define mysql5 0
308 %define postgresql 0
309 %define sqlite 0
310 %define gconsole 0
311 %define wxconsole 0
312 %endif
313
314 %{expand: %%define gccver %(rpm -q --queryformat %%{version} gcc)}
315 %{expand: %%define gccrel %(rpm -q --queryformat %%{release} gcc)}
316
317 BuildRequires: gcc, gcc-c++, make, autoconf
318 BuildRequires: ncurses-devel, perl
319 BuildRequires: libstdc++-devel = %{gccver}-%{gccrel}, libxml2-devel, zlib-devel
320 BuildRequires: openssl-devel
321 %if %{python}
322 BuildRequires: python, python-devel
323 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
324 %endif
325 %if %{gconsole}
326 BuildRequires: pkgconfig, pango-devel, atk-devel
327 %endif
328
329 # Rh qt4 packages don't have a provide for, guess what, qt!
330 # still broken in fc8, ok in fc9
331 # so fix for broken rh
332 %define broken_rh 0
333 %if %{rhel5} || %{centos5} || %{sl5} || %{fc5} || %{fc6} || %{fc7} || %{fc8}
334 %define broken_rh 1
335 %endif
336 %if %{bat} && ! %{broken_rh}
337 BuildRequires: qt-devel >= 4.2
338 %endif
339 %if %{bat} && %{broken_rh}
340 BuildRequires: qt4-devel >= 4.2
341 %endif
342
343 %if %{rh7}
344 BuildRequires: libtermcap-devel
345 BuildRequires: glibc-devel >= 2.2
346 %endif
347 %if %{su9}
348 BuildRequires: termcap
349 BuildRequires: glibc-devel >= 2.3
350 %endif
351 %if %{su9} && %{gconsole}
352 BuildRequires: libgnome >= 2.0
353 BuildRequires: gtk2-devel >= 2.0
354 BuildRequires: libgnomeui-devel >= 2.0
355 BuildRequires: ORBit2-devel
356 BuildRequires: libart_lgpl-devel >= 2.0
357 BuildRequires: libbonobo-devel >= 2.0
358 BuildRequires: libbonoboui-devel >= 2.0
359 BuildRequires: bonobo-activation-devel
360 BuildRequires: gconf2-devel
361 BuildRequires: linc-devel
362 BuildRequires: freetype2-devel
363 %endif
364 %if %{su10}
365 BuildRequires: termcap
366 BuildRequires: glibc-devel >= 2.3
367 %endif
368 %if %{su10} && %{gconsole}
369 BuildRequires: libgnome >= 2.12
370 BuildRequires: gtk2-devel >= 2.8
371 BuildRequires: libgnomeui-devel >= 2.12
372 BuildRequires: ORBit2-devel
373 BuildRequires: libart_lgpl-devel >= 2.3
374 BuildRequires: libbonobo-devel >= 2.10
375 BuildRequires: libbonoboui-devel >= 2.10
376 BuildRequires: bonobo-activation-devel
377 BuildRequires: gconf2-devel
378 BuildRequires: freetype2-devel
379 BuildRequires: cairo-devel
380 BuildRequires: fontconfig-devel >= 2.3
381 BuildRequires: gnome-vfs2-devel >= 2.12
382 BuildRequires: libpng-devel
383 %endif
384 %if %{su102}
385 BuildRequires: termcap
386 BuildRequires: glibc-devel >= 2.5
387 %endif
388 %if %{su102} && %{gconsole}
389 BuildRequires: libgnome >= 2.16
390 BuildRequires: gtk2-devel >= 2.10
391 BuildRequires: libgnomeui-devel >= 2.16
392 BuildRequires: ORBit2-devel
393 BuildRequires: libart_lgpl-devel >= 2.3
394 BuildRequires: libbonobo-devel >= 2.16
395 BuildRequires: libbonoboui-devel >= 2.16
396 BuildRequires: bonobo-activation-devel
397 BuildRequires: gconf2-devel
398 BuildRequires: freetype2-devel
399 BuildRequires: cairo-devel
400 BuildRequires: fontconfig-devel >= 2.4
401 BuildRequires: gnome-vfs2-devel >= 2.16
402 BuildRequires: libpng-devel
403 %endif
404 %if %{su103}
405 BuildRequires: termcap
406 BuildRequires: glibc-devel >= 2.6
407 %endif
408 %if %{su103} && %{gconsole}
409 BuildRequires: libgnome >= 2.20
410 BuildRequires: gtk2-devel >= 2.12
411 BuildRequires: libgnomeui-devel >= 2.20
412 BuildRequires: ORBit2-devel
413 BuildRequires: libart_lgpl-devel >= 2.3
414 BuildRequires: libbonobo-devel >= 2.20
415 BuildRequires: libbonoboui-devel >= 2.20
416 BuildRequires: bonobo-activation-devel
417 BuildRequires: gconf2-devel
418 BuildRequires: freetype2-devel
419 BuildRequires: cairo-devel
420 BuildRequires: fontconfig-devel >= 2.4
421 BuildRequires: gnome-vfs2-devel >= 2.20
422 BuildRequires: libpng-devel
423 %endif
424 %if %{su110}
425 BuildRequires: termcap
426 BuildRequires: glibc-devel >= 2.8
427 %endif
428 %if %{su110} && %{gconsole}
429 BuildRequires: libgnome >= 2.22
430 BuildRequires: gtk2-devel >= 2.12
431 BuildRequires: libgnomeui-devel >= 2.22
432 BuildRequires: ORBit2-devel
433 BuildRequires: libart_lgpl-devel >= 2.3
434 BuildRequires: libbonobo-devel >= 2.22
435 BuildRequires: libbonoboui-devel >= 2.22
436 BuildRequires: bonobo-activation-devel
437 BuildRequires: gconf2-devel
438 BuildRequires: freetype2-devel
439 BuildRequires: cairo-devel
440 BuildRequires: fontconfig-devel >= 2.4
441 BuildRequires: gnome-vfs2-devel >= 2.22
442 BuildRequires: libpng-devel
443 %endif
444 %if %{mdk}
445 BuildRequires: libtermcap-devel
446 BuildRequires: libstdc++-static-devel
447 BuildRequires: glibc-static-devel
448 BuildRequires: glibc-devel >= 2.3
449 %endif
450 %if %{mdk} && !%{mdv} && %{gconsole}
451 BuildRequires: gtk2-devel >= 2.0
452 BuildRequires: libgnomeui2-devel >= 2.0
453 BuildRequires: libORBit2-devel
454 BuildRequires: libart_lgpl-devel >= 2.0
455 BuildRequires: libbonobo2_0-devel
456 BuildRequires: libbonoboui2_0-devel
457 BuildRequires: libbonobo-activation-devel
458 BuildRequires: libGConf2-devel
459 BuildRequires: freetype2-devel
460 %endif
461 %if %{mdv} && %{gconsole}
462 BuildRequires: gtk2-devel >= 2.8
463 BuildRequires: libgnomeui2-devel >= 2.10
464 BuildRequires: libORBit2-devel
465 BuildRequires: libart_lgpl-devel >= 2.3
466 BuildRequires: libbonobo2_0-devel
467 BuildRequires: libbonoboui2_0-devel
468 BuildRequires: libbonobo-activation-devel
469 BuildRequires: libGConf2-devel
470 BuildRequires: freetype2-devel
471 %endif
472 %if %{fc3}
473 BuildRequires: libtermcap-devel
474 BuildRequires: glibc-devel >= 2.3
475 %endif
476 %if %{fc3} && %{gconsole}
477 BuildRequires: gtk2-devel >= 2.4
478 BuildRequires: libgnomeui-devel >= 2.8
479 BuildRequires: ORBit2-devel
480 BuildRequires: libart_lgpl-devel >= 2.3
481 BuildRequires: libbonobo-devel >= 2.8
482 BuildRequires: libbonoboui-devel >= 2.8
483 BuildRequires: bonobo-activation-devel
484 BuildRequires: GConf2-devel
485 BuildRequires: freetype-devel
486 %endif
487 %if %{fc4}
488 BuildRequires: libtermcap-devel
489 BuildRequires: glibc-devel >= 2.3
490 %endif
491 %if %{fc4} && %{gconsole}
492 BuildRequires: gtk2-devel >= 2.6
493 BuildRequires: libgnomeui-devel >= 2.10
494 BuildRequires: ORBit2-devel
495 BuildRequires: libart_lgpl-devel >= 2.3
496 BuildRequires: libbonobo-devel >= 2.8
497 BuildRequires: libbonoboui-devel >= 2.8
498 BuildRequires: bonobo-activation-devel
499 BuildRequires: GConf2-devel
500 BuildRequires: freetype-devel
501 %endif
502 %if %{fc5}
503 BuildRequires: libtermcap-devel
504 BuildRequires: glibc-devel >= 2.4
505 %endif
506 %if %{fc5} && %{gconsole}
507 BuildRequires: gtk2-devel >= 2.8
508 BuildRequires: libgnomeui-devel >= 2.14
509 BuildRequires: ORBit2-devel
510 BuildRequires: libart_lgpl-devel >= 2.3
511 BuildRequires: libbonobo-devel >= 2.14
512 BuildRequires: libbonoboui-devel >= 2.14
513 BuildRequires: GConf2-devel
514 BuildRequires: freetype-devel
515 %endif
516 %if %{fc6}
517 BuildRequires: libtermcap-devel
518 BuildRequires: glibc-devel >= 2.5
519 %endif
520 %if %{fc6} && %{gconsole}
521 BuildRequires: gtk2-devel >= 2.10
522 BuildRequires: libgnomeui-devel >= 2.16
523 BuildRequires: ORBit2-devel
524 BuildRequires: libart_lgpl-devel >= 2.3
525 BuildRequires: libbonobo-devel >= 2.16
526 BuildRequires: libbonoboui-devel >= 2.16
527 BuildRequires: GConf2-devel
528 BuildRequires: freetype-devel
529 %endif
530 %if %{fc7}
531 BuildRequires: libtermcap-devel
532 BuildRequires: glibc-devel >= 2.5
533 %endif
534 %if %{fc7} && %{gconsole}
535 BuildRequires: gtk2-devel >= 2.10
536 BuildRequires: libgnomeui-devel >= 2.18
537 BuildRequires: ORBit2-devel
538 BuildRequires: libart_lgpl-devel >= 2.3
539 BuildRequires: libbonobo-devel >= 2.18
540 BuildRequires: libbonoboui-devel >= 2.18
541 BuildRequires: GConf2-devel
542 BuildRequires: freetype-devel
543 %endif
544 %if %{fc8}
545 BuildRequires: libtermcap-devel
546 BuildRequires: glibc-devel >= 2.7
547 %endif
548 %if %{fc8} && %{gconsole}
549 BuildRequires: gtk2-devel >= 2.12
550 BuildRequires: libgnomeui-devel >= 2.20
551 BuildRequires: ORBit2-devel
552 BuildRequires: libart_lgpl-devel >= 2.3
553 BuildRequires: libbonobo-devel >= 2.20
554 BuildRequires: libbonoboui-devel >= 2.20
555 BuildRequires: GConf2-devel
556 BuildRequires: freetype-devel
557 %endif
558 %if %{fc9}
559 BuildRequires: glibc-devel >= 2.8
560 BuildRequires: zlib-static
561 %endif
562 %if %{fc9} && %{gconsole}
563 BuildRequires: gtk2-devel >= 2.12
564 BuildRequires: libgnomeui-devel >= 2.22
565 BuildRequires: ORBit2-devel
566 BuildRequires: libart_lgpl-devel >= 2.3
567 BuildRequires: libbonobo-devel >= 2.22
568 BuildRequires: libbonoboui-devel >= 2.22
569 BuildRequires: GConf2-devel
570 BuildRequires: freetype-devel
571 %endif
572 %if !%{rh7} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{mdk} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9}
573 BuildRequires: libtermcap-devel
574 BuildRequires: glibc-devel >= 2.3
575 %endif
576 %if !%{rh7} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{mdk} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9} && %{gconsole}
577 BuildRequires: gtk2-devel >= 2.0
578 BuildRequires: libgnomeui-devel >= 2.0
579 BuildRequires: ORBit2-devel
580 BuildRequires: libart_lgpl-devel >= 2.0
581 BuildRequires: libbonobo-devel >= 2.0
582 BuildRequires: libbonoboui-devel >= 2.0
583 BuildRequires: bonobo-activation-devel
584 BuildRequires: GConf2-devel
585 BuildRequires: linc-devel
586 BuildRequires: freetype-devel
587 %endif
588
589 %if %{mysql} && ! %{mysql4} && ! %{mysql5}
590 BuildRequires: mysql-devel >= 3.23
591 %endif
592
593 %if %{mysql} && %{mysql4}
594 BuildRequires: mysql-devel >= 4.0
595 %endif
596
597 %if %{mysql} && %{mysql5}
598 BuildRequires: mysql-devel >= 5.0
599 %endif
600
601 %if %{postgresql} && %{wb3}
602 BuildRequires: rh-postgresql-devel >= 7
603 %endif
604
605 %if %{postgresql} && ! %{wb3}
606 BuildRequires: postgresql-devel >= 7
607 %endif
608
609 %if %{wxconsole}
610 BuildRequires: wxGTK-devel >= 2.6
611 %endif
612
613 %description
614 %{blurb}
615
616 %{blurb2}
617 %{blurb3}
618 %{blurb4}
619 %{blurb5}
620 %{blurb6}
621 %{blurb7}
622 %{blurb8}
623
624 %if %{mysql}
625 %package mysql
626 %endif
627 %if %{sqlite}
628 %package sqlite
629 %endif
630 %if %{postgresql}
631 %package postgresql
632 %endif
633
634 Summary: Bacula - The Network Backup Solution
635 Group: System Environment/Daemons
636 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
637 Conflicts: bacula-client
638 Obsoletes: bacula-rescue
639
640 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
641 Conflicts: bacula
642 %endif
643
644 Requires: ncurses, libstdc++, zlib, openssl, mtx
645
646 %if %{rh7}
647 Requires: glibc >= 2.2
648 Requires: libtermcap
649 %endif
650 %if %{su9} || %{su10}
651 Requires: glibc >= 2.3
652 Requires: termcap
653 %endif
654 %if %{su102}
655 Requires: glibc >= 2.5
656 Requires: termcap
657 %endif
658 %if %{su103}
659 Requires: glibc >= 2.6
660 Requires: termcap
661 %endif
662 %if %{su110}
663 Requires: glibc >= 2.8
664 Requires: termcap
665 %endif
666 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{fc8} && ! %{fc9}
667 Requires: glibc >= 2.3
668 Requires: libtermcap
669 %endif
670 %if %{fc5}
671 Requires: glibc >= 2.4
672 Requires: libtermcap
673 %endif
674 %if %{fc6} || %{fc7}
675 Requires: glibc >= 2.5
676 Requires: libtermcap
677 %endif
678 %if %{fc8}
679 Requires: glibc >= 2.7
680 Requires: libtermcap
681 %endif
682 %if %{fc9}
683 Requires: glibc >= 2.8
684 %endif
685
686 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4} && ! %{mysql5}
687 Requires: mysql >= 3.23
688 Requires: mysql-server >= 3.23
689 %endif
690 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{mdk} && %{mysql4}
691 Requires: mysql >= 4.0
692 Requires: mysql-server >= 4.0
693 %endif
694 %if %{mysql} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{mdk} && %{mysql5}
695 Requires: mysql >= 5.0
696 Requires: mysql-server >= 5.0
697 %endif
698
699 %if %{mysql} && %{su9} && ! %{mysql4}
700 Requires: mysql >= 3.23
701 Requires: mysql-client >= 3.23
702 %endif
703 %if %{mysql} && %{su9} && %{mysql4}
704 Requires: mysql >= 4.0
705 Requires: mysql-client >= 4.0
706 %endif
707 %if %{mysql} && %{su10} && %{mysql4}
708 Requires: mysql >= 4.0
709 Requires: mysql-client >= 4.0
710 %endif
711 %if %{mysql} && %{su10} && %{mysql5}
712 Requires: mysql >= 5.0
713 Requires: mysql-client >= 5.0
714 %endif
715 %if %{mysql} && %{su102} && %{mysql5}
716 Requires: mysql >= 5.0
717 Requires: mysql-client >= 5.0
718 %endif
719 %if %{mysql} && %{su103} && %{mysql5}
720 Requires: mysql >= 5.0
721 Requires: mysql-client >= 5.0
722 %endif
723 %if %{mysql} && %{su110} && %{mysql5}
724 Requires: mysql >= 5.0
725 Requires: mysql-client >= 5.0
726 %endif
727
728 %if %{mysql} && %{mdk} && ! %{mysql4}
729 Requires: mysql >= 3.23
730 Requires: mysql-client >= 3.23
731 %endif
732 %if %{mysql} && %{mdk} && %{mysql4}
733 Requires: mysql >= 4.0
734 Requires: mysql-client >= 4.0
735 %endif
736
737 %if %{postgresql} && %{wb3}
738 Requires: rh-postgresql >= 7
739 Requires: rh-postgresql-server >= 7
740 %endif
741 %if %{postgresql} && ! %{wb3}
742 Requires: postgresql >= 7
743 Requires: postgresql-server >= 7
744 %endif
745
746 %if %{mysql}
747 %description mysql
748 %endif
749 %if %{sqlite}
750 %description sqlite
751 %endif
752 %if %{postgresql}
753 %description postgresql
754 %endif
755
756 %if %{python}
757 Requires: python >= %{pyver}
758 %endif
759
760 %{blurb}
761
762 %{blurb2}
763 %{blurb3}
764 %{blurb4}
765 %{blurb5}
766 %{blurb6}
767 %{blurb7}
768 %{blurb8}
769
770 %if %{mysql}
771 This build requires MySQL to be installed separately as the catalog database.
772 %endif
773 %if %{postgresql}
774 This build requires PostgreSQL to be installed separately as the catalog database.
775 %endif
776 %if %{sqlite}
777 This build incorporates sqlite3 as the catalog database, statically compiled.
778 %endif
779 %if %{python}
780 This build includes python scripting support.
781 %endif
782
783 %if ! %{client_only} && %{mtx}
784 %package mtx
785 Summary: Bacula - The Network Backup Solution
786 Group: System Environment/Daemons
787 Provides: mtx
788
789 %description mtx
790 This is Bacula's version of mtx tape utilities for Linux distributions that
791 do not provide their own mtx package
792 %endif
793
794 %package client
795 Summary: Bacula - The Network Backup Solution
796 Group: System Environment/Daemons
797 Provides: bacula-fd
798 Conflicts: bacula-mysql
799 Conflicts: bacula-sqlite
800 Conflicts: bacula-postgresql
801 Obsoletes: bacula-rescue
802
803 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
804 Provides: bacula
805 %endif
806
807 Requires: libstdc++, zlib, openssl
808
809 %if %{rh7}
810 Requires: glibc >= 2.2
811 Requires: libtermcap
812 %endif
813 %if %{su9} || %{su10}
814 Requires: glibc >= 2.3
815 Requires: termcap
816 %endif
817 %if %{su102}
818 Requires: glibc >= 2.5
819 Requires: termcap
820 %endif
821 %if %{su103}
822 Requires: glibc >= 2.6
823 Requires: termcap
824 %endif
825 %if %{su110}
826 Requires: glibc >= 2.8
827 Requires: termcap
828 %endif
829 %if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{fc5} && ! %{fc6} && ! %{fc7} && ! %{fc8} && ! %{fc9}
830 Requires: glibc >= 2.3
831 Requires: libtermcap
832 %endif
833 %if %{fc5}
834 Requires: glibc >= 2.4
835 Requires: libtermcap
836 %endif
837 %if %{fc6} || %{fc7}
838 Requires: glibc >= 2.5
839 Requires: libtermcap
840 %endif
841 %if %{fc8}
842 Requires: glibc >= 2.7
843 Requires: libtermcap
844 %endif
845 %if %{fc9}
846 Requires: glibc >= 2.8
847 %endif
848
849 %if %{python}
850 Requires: python >= %{pyver}
851 %endif
852
853 %description client
854 %{blurb}
855
856 %{blurb2}
857 %{blurb3}
858 %{blurb4}
859 %{blurb5}
860 %{blurb6}
861 %{blurb7}
862 %{blurb8}
863
864 This is the File daemon (Client) only package. It includes the command line 
865 console program.
866 %if %{python}
867 This build includes python scripting support.
868 %endif
869
870 %if ! %{client_only}
871 %package updatedb
872
873 Summary: Bacula - The Network Backup Solution
874 Group: System Environment/Daemons
875
876 %description updatedb
877 %{blurb}
878
879 %{blurb2}
880 %{blurb3}
881 %{blurb4}
882 %{blurb5}
883 %{blurb6}
884 %{blurb7}
885 %{blurb8}
886
887 This package installs scripts for updating older versions of the bacula
888 database.
889 %endif
890
891 %if %{gconsole}
892 %package gconsole
893 Summary: Bacula - The Network Backup Solution
894 Group: System Environment/Daemons
895 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd, openssl
896 %endif
897
898 %if %{gconsole} && %{su9}
899 Requires: gtk2 >= 2.0
900 Requires: libgnome >= 2.0
901 Requires: libgnomeui >= 2.0
902 Requires: glibc >= 2.3
903 Requires: ORBit2
904 Requires: libart_lgpl >= 2.0
905 Requires: libbonobo >= 2.0
906 Requires: libbonoboui >= 2.0
907 Requires: bonobo-activation
908 Requires: gconf2
909 Requires: linc
910 Requires: freetype2
911 %endif
912 %if %{gconsole} && %{su10}
913 Requires: gtk2 >= 2.8
914 Requires: libgnome >= 2.12
915 Requires: libgnomeui >= 2.12
916 Requires: glibc >= 2.3
917 Requires: ORBit2
918 Requires: libart_lgpl >= 2.3
919 Requires: libbonobo >= 2.10
920 Requires: libbonoboui >= 2.10
921 Requires: bonobo-activation
922 Requires: gconf2
923 Requires: freetype2
924 Requires: cairo
925 Requires: fontconfig >= 2.3
926 Requires: gnome-vfs2 >= 2.12
927 Requires: libpng
928 %endif
929 %if %{gconsole} && %{su102}
930 Requires: gtk2 >= 2.10
931 Requires: libgnome >= 2.16
932 Requires: libgnomeui >= 2.16
933 Requires: glibc >= 2.5
934 Requires: ORBit2
935 Requires: libart_lgpl >= 2.3
936 Requires: libbonobo >= 2.16
937 Requires: libbonoboui >= 2.16
938 Requires: bonobo-activation
939 Requires: gconf2
940 Requires: freetype2
941 Requires: cairo
942 Requires: fontconfig >= 2.4
943 Requires: gnome-vfs2 >= 2.16
944 Requires: libpng
945 %endif
946 %if %{gconsole} && %{su103}
947 Requires: gtk2 >= 2.12
948 Requires: libgnome >= 2.20
949 Requires: libgnomeui >= 2.20
950 Requires: glibc >= 2.6
951 Requires: ORBit2
952 Requires: libart_lgpl >= 2.3
953 Requires: libbonobo >= 2.20
954 Requires: libbonoboui >= 2.20
955 Requires: bonobo-activation
956 Requires: gconf2
957 Requires: freetype2
958 Requires: cairo
959 Requires: fontconfig >= 2.4
960 Requires: gnome-vfs2 >= 2.20
961 Requires: libpng
962 %endif
963 %if %{gconsole} && %{su110}
964 Requires: gtk2 >= 2.12
965 Requires: libgnome >= 2.22
966 Requires: libgnomeui >= 2.22
967 Requires: glibc >= 2.8
968 Requires: ORBit2
969 Requires: libart_lgpl >= 2.3
970 Requires: libbonobo >= 2.22
971 Requires: libbonoboui >= 2.22
972 Requires: bonobo-activation
973 Requires: gconf2
974 Requires: freetype2
975 Requires: cairo
976 Requires: fontconfig >= 2.4
977 Requires: gnome-vfs2 >= 2.22
978 Requires: libpng
979 %endif
980 %if %{gconsole} && %{mdk} && !%{mdv}
981 Requires: gtk2 >= 2.0
982 Requires: libgnomeui2
983 Requires: glibc >= 2.3
984 Requires: ORBit2
985 Requires: libart_lgpl >= 2.0
986 Requires: libbonobo >= 2.0
987 Requires: libbonoboui >= 2.0
988 Requires: GConf2
989 Requires: freetype2
990 %endif
991 %if %{gconsole} && %{mdv}
992 Requires: gtk2 >= 2.8
993 Requires: libgnomeui2
994 Requires: glibc >= 2.3
995 Requires: ORBit2
996 Requires: libart_lgpl >= 2.3
997 Requires: libbonobo >= 2.10
998 Requires: libbonoboui >= 2.10
999 Requires: GConf2
1000 Requires: freetype2
1001 %endif
1002 %if %{gconsole} && %{fc3}  
1003 Requires: gtk2 >= 2.4
1004 Requires: libgnomeui >= 2.8
1005 Requires: glibc >= 2.3
1006 Requires: ORBit2
1007 Requires: libart_lgpl >= 2.3
1008 Requires: libbonobo >= 2.8
1009 Requires: libbonoboui >= 2.8
1010 Requires: bonobo-activation
1011 Requires: GConf2
1012 Requires: freetype
1013 %endif
1014 %if %{gconsole} && %{fc4}  
1015 Requires: gtk2 >= 2.6
1016 Requires: libgnomeui >= 2.10
1017 Requires: glibc >= 2.3
1018 Requires: ORBit2
1019 Requires: libart_lgpl >= 2.3
1020 Requires: libbonobo >= 2.8
1021 Requires: libbonoboui >= 2.8
1022 Requires: bonobo-activation
1023 Requires: GConf2
1024 Requires: freetype
1025 %endif
1026 %if %{gconsole} && %{fc5}  
1027 Requires: gtk2 >= 2.8
1028 Requires: libgnomeui >= 2.14
1029 Requires: glibc >= 2.4
1030 Requires: ORBit2
1031 Requires: libart_lgpl >= 2.3
1032 Requires: libbonobo >= 2.14
1033 Requires: libbonoboui >= 2.14
1034 Requires: GConf2
1035 Requires: freetype
1036 %endif
1037 %if %{gconsole} && %{fc6}  
1038 Requires: gtk2 >= 2.10
1039 Requires: libgnomeui >= 2.16
1040 Requires: glibc >= 2.5
1041 Requires: ORBit2
1042 Requires: libart_lgpl >= 2.3
1043 Requires: libbonobo >= 2.16
1044 Requires: libbonoboui >= 2.16
1045 Requires: GConf2
1046 Requires: freetype
1047 %endif
1048 %if %{gconsole} && %{fc7}  
1049 Requires: gtk2 >= 2.10
1050 Requires: libgnomeui >= 2.18
1051 Requires: glibc >= 2.5
1052 Requires: ORBit2
1053 Requires: libart_lgpl >= 2.3
1054 Requires: libbonobo >= 2.18
1055 Requires: libbonoboui >= 2.18
1056 Requires: GConf2
1057 Requires: freetype
1058 %endif
1059 %if %{gconsole} && %{fc8}  
1060 Requires: gtk2 >= 2.12
1061 Requires: libgnomeui >= 2.20
1062 Requires: glibc >= 2.7
1063 Requires: ORBit2
1064 Requires: libart_lgpl >= 2.3
1065 Requires: libbonobo >= 2.20
1066 Requires: libbonoboui >= 2.20
1067 Requires: GConf2
1068 Requires: freetype
1069 %endif
1070 %if %{gconsole} && %{fc9}  
1071 Requires: gtk2 >= 2.12
1072 Requires: libgnomeui >= 2.22
1073 Requires: glibc >= 2.8
1074 Requires: ORBit2
1075 Requires: libart_lgpl >= 2.3
1076 Requires: libbonobo >= 2.22
1077 Requires: libbonoboui >= 2.22
1078 Requires: GConf2
1079 Requires: freetype
1080 %endif
1081 %if %{gconsole} && !%{su9} && !%{su10} && !%{su102} && !%{su103} && !%{su110} && !%{mdk} && !%{fc3} && !%{fc4} && !%{fc5} && !%{fc6} && !%{fc7} && !%{fc8} && !%{fc9}
1082 Requires: gtk2 >= 2.0
1083 Requires: libgnomeui >= 2.0
1084 Requires: glibc >= 2.3
1085 Requires: ORBit2
1086 Requires: libart_lgpl >= 2.0
1087 Requires: libbonobo >= 2.0
1088 Requires: libbonoboui >= 2.0
1089 Requires: bonobo-activation
1090 Requires: GConf2
1091 Requires: linc
1092 Requires: freetype
1093 %endif
1094 %if %{gconsole} && %{su9}
1095 Requires: xsu
1096 %endif
1097 %if %{gconsole} && %{su10}
1098 Requires: xsu
1099 %endif
1100 %if %{gconsole} && %{su102}
1101 Requires: xsu
1102 %endif
1103 %if %{gconsole} && %{su103}
1104 Requires: xsu
1105 %endif
1106 %if %{gconsole} && %{su110}
1107 Requires: xsu
1108 %endif
1109 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110}
1110 Requires: usermode
1111 %endif
1112
1113 %if %{gconsole}
1114 %description gconsole
1115 %{blurb}
1116
1117 %{blurb2}
1118 %{blurb3}
1119 %{blurb4}
1120 %{blurb5}
1121 %{blurb6}
1122 %{blurb7}
1123 %{blurb8}
1124
1125 This is the Gnome Console package. It is an add-on to the client or
1126 server packages.
1127 %endif
1128
1129 %if %{wxconsole}
1130 %package wxconsole
1131 Summary: Bacula - The Network Backup Solution
1132 Group: System Environment/Daemons
1133 Requires: wxGTK >= 2.6, libstdc++, openssl
1134 %endif
1135
1136 %if %{wxconsole} && %{su10}
1137 Requires: gtk2 >= 2.8
1138 %endif
1139
1140 %if %{wxconsole} && %{su102}
1141 Requires: gtk2 >= 2.10
1142 %endif
1143
1144 %if %{wxconsole} && %{su103}
1145 Requires: gtk2 >= 2.12
1146 %endif
1147
1148 %if %{wxconsole} && %{su110}
1149 Requires: gtk2 >= 2.12
1150 %endif
1151
1152 %if %{wxconsole} && %{fc3}  
1153 Requires: gtk2 >= 2.4
1154 %endif
1155
1156 %if %{wxconsole} && %{fc4}  
1157 Requires: gtk2 >= 2.6
1158 %endif
1159
1160 %if %{wxconsole} && %{fc5}  
1161 Requires: gtk2 >= 2.8
1162 %endif
1163
1164 %if %{wxconsole} && %{fc6}  
1165 Requires: gtk2 >= 2.10
1166 %endif
1167
1168 %if %{wxconsole} && %{fc7}  
1169 Requires: gtk2 >= 2.10
1170 %endif
1171
1172 %if %{wxconsole} && %{fc8}  
1173 Requires: gtk2 >= 2.12
1174 %endif
1175
1176 %if %{wxconsole} && %{fc9}  
1177 Requires: gtk2 >= 2.12
1178 %endif
1179
1180 %if %{wxconsole}
1181 %description wxconsole
1182 %{blurb}
1183
1184 %{blurb2}
1185 %{blurb3}
1186 %{blurb4}
1187 %{blurb5}
1188 %{blurb6}
1189 %{blurb7}
1190 %{blurb8}
1191
1192 This is the WXWindows Console package. It is an add-on to the client or
1193 server packages.
1194 %endif
1195
1196 %if %{bat}
1197 %package bat
1198 Summary: Bacula - The Network Backup Solution
1199 Group: System Environment/Daemons
1200 %endif
1201
1202 %if %{bat} && %{su10}
1203 Requires: openssl
1204 Requires: glibc >= 2.4
1205 Requires: fontconfig
1206 Requires: freetype2
1207 Requires: libgcc
1208 Requires: libpng
1209 Requires: qt >= 4.2
1210 Requires: libstdc++
1211 Requires: zlib
1212 %endif
1213
1214 %if %{bat} && %{su102}
1215 Requires: openssl
1216 Requires: glibc >= 2.5
1217 Requires: fontconfig
1218 Requires: freetype2
1219 Requires: libgcc
1220 Requires: libpng
1221 Requires: qt >= 4.2
1222 Requires: libstdc++
1223 Requires: zlib
1224 %endif
1225
1226 %if %{bat} && %{su103}
1227 Requires: openssl
1228 Requires: glibc >= 2.6
1229 Requires: fontconfig
1230 Requires: freetype2
1231 Requires: libgcc
1232 Requires: libpng
1233 Requires: qt >= 4.2
1234 Requires: libstdc++
1235 Requires: zlib
1236 %endif
1237
1238 %if %{bat} && %{su110}
1239 Requires: openssl
1240 Requires: glibc >= 2.8
1241 Requires: fontconfig
1242 Requires: freetype2
1243 Requires: libgcc
1244 Requires: libpng
1245 Requires: qt >= 4.2
1246 Requires: libstdc++
1247 Requires: zlib
1248 %endif
1249
1250 %if %{bat} && %{fc5}
1251 Requires: openssl
1252 Requires: glibc >= 2.4
1253 Requires: fontconfig
1254 Requires: freetype
1255 Requires: libgcc
1256 Requires: libpng
1257 Requires: qt4 >= 4.2
1258 Requires: libstdc++
1259 Requires: zlib
1260 %endif
1261
1262 %if %{bat} && %{fc6}
1263 Requires: openssl
1264 Requires: glibc >= 2.5
1265 Requires: fontconfig
1266 Requires: freetype
1267 Requires: libgcc
1268 Requires: libpng
1269 Requires: qt4 >= 4.2
1270 Requires: libstdc++
1271 Requires: zlib
1272 %endif
1273
1274 %if %{bat} && %{fc7}
1275 Requires: openssl
1276 Requires: glibc >= 2.5
1277 Requires: fontconfig
1278 Requires: freetype
1279 Requires: libgcc
1280 Requires: libpng
1281 Requires: qt4 >= 4.2
1282 Requires: libstdc++
1283 Requires: zlib
1284 %endif
1285
1286 %if %{bat} && %{fc8}
1287 Requires: openssl
1288 Requires: glibc >= 2.7
1289 Requires: fontconfig
1290 Requires: freetype
1291 Requires: libgcc
1292 Requires: libpng
1293 Requires: qt4 >= 4.2
1294 Requires: libstdc++
1295 Requires: zlib
1296 %endif
1297
1298 %if %{bat} && %{fc9}
1299 Requires: openssl
1300 Requires: glibc >= 2.8
1301 Requires: fontconfig
1302 Requires: freetype
1303 Requires: libgcc
1304 Requires: libpng
1305 Requires: qt4 >= 4.3
1306 Requires: libstdc++
1307 Requires: zlib
1308 %endif
1309
1310 %if %{bat}
1311 %description bat
1312 %{blurb}
1313
1314 %{blurb2}
1315 %{blurb3}
1316 %{blurb4}
1317 %{blurb5}
1318 %{blurb6}
1319 %{blurb7}
1320 %{blurb8}
1321
1322 This is the Bacula Administration Tool package. It is an add-on to 
1323 the client or server packages.
1324 %endif
1325
1326 # SuSE turns off stripping of binaries by default. In order to get
1327 # stripped packages we must generate debug package. RedHat and Mandriva
1328 # turn debug packages on by default but strip binaries regardless.
1329 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
1330 %debug_package
1331 %endif
1332
1333 %prep
1334
1335 %setup
1336 %setup -T -D -b 1
1337 %setup -T -D -b 2
1338 %setup -T -D -b 3
1339 %setup -T -D -b 4
1340
1341 %build
1342
1343 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
1344 export LDFLAGS="${LDFLAGS} -L/usr/lib/termcap"
1345 %endif
1346
1347 cwd=${PWD}
1348 cd %{depkgs}
1349 %if %{sqlite}
1350 make sqlite3
1351 %endif
1352 %if ! %{client_only} && %{mtx}
1353 make mtx
1354 %endif
1355 %if %{bat}
1356 make qwt
1357 %endif
1358 cd ${cwd}
1359
1360 %if %{wb3} || %{old_pgsql}
1361 patch -p3 src/cats/postgresql.c < %SOURCE5
1362 %endif
1363
1364 # patches for the bundled sqlite scripts
1365
1366 # patch the make_sqlite_tables script for installation bindir
1367 #patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
1368 patch src/cats/make_sqlite3_tables.in src/cats/make_sqlite3_tables.in.patch
1369
1370 # patch the create_sqlite_database script for installation bindir
1371 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
1372 patch src/cats/create_sqlite3_database.in src/cats/create_sqlite3_database.in.patch
1373
1374 # patch the make_catalog_backup script for installation bindir
1375 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
1376
1377 # patch the update_sqlite_tables script for installation bindir
1378 #patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
1379 patch src/cats/update_sqlite3_tables.in src/cats/update_sqlite3_tables.in.patch
1380
1381 # patch the bacula-dir init script to remove sqlite service
1382 %if %{sqlite} && %{su9}
1383 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1384 %endif
1385 %if %{sqlite} && %{su10}
1386 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1387 %endif
1388 %if %{sqlite} && %{su102}
1389 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1390 %endif
1391 %if %{sqlite} && %{su103}
1392 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1393 %endif
1394 %if %{sqlite} && %{su110}
1395 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
1396 %endif
1397
1398 # 64 bit lib location hacks
1399 # as of 1.39.18 it should not be necessary to enable x86_64 as configure is
1400 # reported to be fixed to properly detect lib locations.
1401 %if %{x86_64}
1402 export LDFLAGS="${LDFLAGS} -L/usr/lib64"
1403 %endif
1404 %if %{mysql} && %{x86_64}
1405 export LDFLAGS="${LDFLAGS} -L/usr/lib64/mysql"
1406 %endif
1407 %if %{python} && %{x86_64}
1408 export LDFLAGS="${LDFLAGS} -L/usr/lib64/python%{pyver}"
1409 %endif
1410
1411 # Red Hat's 64 bit installation of QT4 appears to be broken so:
1412 %define qt_path 0
1413 %if %{rhel5} || %{centos5} || %{sl5}
1414 %define qt_path 1
1415 %endif
1416 %if %{bat} && %{qt_path} && %{x86_64}
1417 export PATH=/usr/lib64/qt4/bin/:$PATH
1418 export QTDIR=/usr/lib64/qt4/
1419 export QTINC=/usr/lib64/qt4/include/
1420 export QTLIB=/usr/lib64/qt4/
1421 %endif
1422
1423 %configure \
1424         --prefix=%{_prefix} \
1425         --sbindir=%{_sbindir} \
1426         --sysconfdir=%{sysconf_dir} \
1427         --with-scriptdir=%{script_dir} \
1428         --with-working-dir=%{working_dir} \
1429         --with-pid-dir=%{pid_dir} \
1430         --enable-smartalloc \
1431         --enable-client-only \
1432         %if %{mdk}
1433         --disable-nls \
1434         %endif
1435         --enable-static-fd
1436
1437 make
1438
1439 %configure \
1440         --prefix=%{_prefix} \
1441         --sbindir=%{_sbindir} \
1442         --sysconfdir=%{sysconf_dir} \
1443         --with-scriptdir=%{script_dir} \
1444         --with-working-dir=%{working_dir} \
1445         --with-pid-dir=%{pid_dir} \
1446         --enable-smartalloc \
1447 %if %{gconsole}
1448         --enable-gnome \
1449 %endif
1450 %if %{gconsole} && ! %{rh8}
1451         --enable-tray-monitor \
1452 %endif
1453 %if %{mysql}
1454         --with-mysql \
1455 %endif
1456 %if %{sqlite}
1457         --with-sqlite3=${cwd}/%{depkgs}/sqlite3 \
1458 %endif
1459 %if %{postgresql}
1460         --with-postgresql \
1461 %endif
1462 %if %{wxconsole}
1463         --enable-bwx-console \
1464 %endif
1465 %if %{bat}
1466         --enable-bat \
1467         --with-qwt=${cwd}/%{depkgs}/qwt \
1468 %endif
1469 %if %{python}
1470         --with-python \
1471 %endif
1472 %if %{client_only}
1473         --enable-client-only \
1474 %endif
1475 %if %{rh7} || %{rh8} || %{rh9} || %{fc1} || %{fc3} || %{wb3} 
1476         --disable-batch-insert \
1477 %endif
1478         --mandir=%{_mandir} \
1479         --with-subsys-dir=%{_subsysdir} \
1480         --with-dir-user=%{director_daemon_user} \
1481         --with-dir-group=%{daemon_group} \
1482         --with-sd-user=%{storage_daemon_user} \
1483         --with-sd-group=%{storage_daemon_group} \
1484         --with-fd-user=%{file_daemon_user} \
1485         --with-fd-group=%{daemon_group} \
1486         --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" \
1487         --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" \
1488         --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" \
1489         --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" \
1490         --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" \
1491         --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" \
1492         --with-openssl
1493
1494 make
1495
1496 %install
1497  
1498 cwd=${PWD}
1499 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1500 mkdir -p $RPM_BUILD_ROOT/etc/init.d
1501 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
1502 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
1503 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
1504 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
1505 mkdir -p $RPM_BUILD_ROOT%{script_dir}/updatedb
1506
1507 %if %{gconsole} || %{wxconsole} || %{bat}
1508 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
1509 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
1510 %endif
1511
1512 %if %{gconsole} || %{wxconsole} || %{bat}
1513 %define usermode_iftrick 1
1514 %else
1515 %define usermode_iftrick 0
1516 %endif
1517
1518 %if %{usermode_iftrick} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110}
1519 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
1520 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
1521 mkdir -p $RPM_BUILD_ROOT/usr/bin
1522 %endif
1523
1524 %if %{sqlite}
1525 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
1526 %endif
1527
1528 make \
1529         prefix=$RPM_BUILD_ROOT%{_prefix} \
1530         sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1531         sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1532         scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1533         working_dir=$RPM_BUILD_ROOT%{working_dir} \
1534         piddir=$RPM_BUILD_ROOT%{pid_dir} \
1535         mandir=$RPM_BUILD_ROOT%{_mandir} \
1536         install
1537
1538 %if ! %{client_only} && %{mtx}
1539 cd %{depkgs}
1540 make \
1541         prefix=$RPM_BUILD_ROOT%{_prefix} \
1542         sbindir=$RPM_BUILD_ROOT%{_sbindir} \
1543         sysconfdir=$RPM_BUILD_ROOT%{sysconf_dir} \
1544         scriptdir=$RPM_BUILD_ROOT%{script_dir} \
1545         working_dir=$RPM_BUILD_ROOT%{working_dir} \
1546         piddir=$RPM_BUILD_ROOT%{pid_dir} \
1547         mandir=$RPM_BUILD_ROOT%{_mandir} \
1548         mtx-install
1549 cd ${cwd}
1550 %endif
1551
1552 # make install in manpages installs _everything_ shotgun style
1553 # so now delete what we will not be packaging
1554 %if ! %{wxconsole}
1555 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
1556 %endif
1557 %if ! %{bat}
1558 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bat.1.%{manpage_ext}
1559 %endif
1560 %if ! %{gconsole}
1561 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
1562 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
1563 %endif
1564 %if %{client_only}
1565 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
1566 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1567 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1568 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bcopy.8.%{manpage_ext}
1569 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bextract.8.%{manpage_ext}
1570 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bls.8.%{manpage_ext}
1571 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bscan.8.%{manpage_ext}
1572 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/btape.8.%{manpage_ext}
1573 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
1574 %endif
1575
1576 # fixme - make installs the mysql scripts for sqlite build
1577 %if %{sqlite}
1578 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1579 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1580 rm -f $RPM_BUILD_ROOT%{script_dir}/grant_mysql_privileges
1581 %endif
1582
1583 # fixme - make installs the mysql scripts for postgresql build
1584 %if %{postgresql}
1585 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1586 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1587 %endif
1588
1589 # fixme - make installs gconsole script for build without gconsole
1590 %if ! %{gconsole}
1591 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
1592 %endif
1593
1594 rm -f $RPM_BUILD_ROOT%{_sbindir}/static-bacula-fd
1595
1596 # install the init scripts
1597 %if %{su9} || %{su10} || %{su102} || %{su103} || %{su110}
1598 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1599 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1600 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1601 %endif
1602 %if %{mdk}
1603 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1604 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1605 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1606 %endif
1607 %if ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110} && ! %{mdk}
1608 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1609 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
1610 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1611 %endif
1612 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
1613 %if %{client_only}
1614 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
1615 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
1616 %endif
1617
1618 # install the menu stuff
1619 %if %{gconsole} && %{su9}
1620 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1621 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1622 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1623 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1624 %endif
1625 %if %{gconsole} && %{su10}
1626 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1627 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1628 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1629 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1630 %endif
1631 %if %{gconsole} && %{su102}
1632 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1633 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1634 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1635 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1636 %endif
1637 %if %{gconsole} && %{su103}
1638 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1639 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1640 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1641 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1642 %endif
1643 %if %{gconsole} && %{su110}
1644 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1645 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1646 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1647 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1648 %endif
1649 %if %{wxconsole} && %{su10}
1650 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1651 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1652 %endif
1653 %if %{wxconsole} && %{su102}
1654 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1655 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1656 %endif
1657 %if %{wxconsole} && %{su103}
1658 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1659 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1660 %endif
1661 %if %{wxconsole} && %{su110}
1662 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1663 cp -p scripts/wxconsole.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1664 %endif
1665 %if %{bat} && %{su102}
1666 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1667 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1668 %endif
1669 %if %{bat} && %{su103}
1670 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1671 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1672 %endif
1673 %if %{bat} && %{su110}
1674 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1675 cp -p scripts/bat.desktop.xsu $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1676 %endif
1677 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{fc5} || %{fc6} || %{fc7} || %{fc8} || %{fc9} || %{mdk}
1678 %define iftrick 1
1679 %else
1680 %define iftrick 0
1681 %endif
1682 %if %{gconsole} && %{iftrick}
1683 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
1684 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
1685 cp -p scripts/bgnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bgnome-console
1686 cp -p scripts/bgnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/bgnome-console
1687 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bgnome-console
1688 %endif
1689 %if %{gconsole} && ! %{rh8}
1690 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
1691 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
1692 %endif
1693 %if %{wxconsole} && %{iftrick}
1694 cp -p src/wx-console/wxwin16x16.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/wxwin16x16.xpm
1695 cp -p scripts/wxconsole.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/wxconsole.desktop
1696 cp -p scripts/wxconsole.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bwx-console
1697 cp -p scripts/wxconsole.pamd $RPM_BUILD_ROOT/etc/pam.d/bwx-console
1698 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bwx-console
1699 %endif
1700 %if %{bat} && %{iftrick}
1701 cp -p src/qt-console/images/bat_icon.png $RPM_BUILD_ROOT/usr/share/pixmaps/bat_icon.png
1702 cp -p scripts/bat.desktop.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bat.desktop
1703 cp -p scripts/bat.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/bat
1704 cp -p scripts/bat.pamd $RPM_BUILD_ROOT/etc/pam.d/bat
1705 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/bat
1706 %endif
1707
1708 # install sqlite
1709 %if %{sqlite}
1710 cp -p %{depkgs}/sqlite3/sqlite3 $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite3
1711 cp -p %{depkgs}/sqlite3/sqlite3.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite3.h
1712 cp -p %{depkgs}/sqlite3/libsqlite3.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite3.a
1713 %endif
1714
1715 # install the logrotate file
1716 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
1717
1718 # install the updatedb scripts
1719 cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
1720
1721 # install the logwatch scripts
1722 %if ! %{client_only}
1723 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1724 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1725 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1726 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
1727 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
1728 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
1729 %endif
1730
1731 # install the rescue files
1732 mkdir $RPM_BUILD_ROOT%{script_dir}/rescue
1733 mkdir $RPM_BUILD_ROOT%{script_dir}/rescue/freebsd
1734 mkdir $RPM_BUILD_ROOT%{script_dir}/rescue/solaris
1735 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT%{script_dir}/rescue/
1736 cp -p %{_rescuesrc}/freebsd/Makefile* $RPM_BUILD_ROOT%{script_dir}/rescue/freebsd/
1737 cp -p %{_rescuesrc}/solaris/Makefile* $RPM_BUILD_ROOT%{script_dir}/rescue/solaris/
1738 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT%{script_dir}/rescue/
1739 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT%{script_dir}/rescue/
1740 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT%{script_dir}/rescue/
1741 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT%{script_dir}/rescue/
1742 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT%{script_dir}/rescue/
1743 cp -pr %{_rescuesrc}/knoppix $RPM_BUILD_ROOT%{script_dir}/rescue/
1744 touch $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/rpm_release
1745 cp -p src/filed/static-bacula-fd $RPM_BUILD_ROOT%{script_dir}/rescue/linux/cdrom/bacula/bin/bacula-fd
1746 rm -f src/filed/static-bacula-fd
1747
1748 # install bat since make doesn't at the moment
1749 %if %{bat}
1750 cp -p src/qt-console/bat $RPM_BUILD_ROOT%{_sbindir}/bat
1751 cp -p src/qt-console/bat.conf $RPM_BUILD_ROOT%{sysconf_dir}/bat.conf
1752 %endif
1753
1754 # install docs for single dir installation
1755 %if %{single_dir}
1756 mkdir $RPM_BUILD_ROOT%{_prefix}/doc
1757 cp COPYING $RPM_BUILD_ROOT%{_prefix}/doc/
1758 cp ChangeLog $RPM_BUILD_ROOT%{_prefix}/doc/
1759 cp ReleaseNotes $RPM_BUILD_ROOT%{_prefix}/doc/
1760 cp VERIFYING $RPM_BUILD_ROOT%{_prefix}/doc/
1761 cp kernstodo $RPM_BUILD_ROOT%{_prefix}/doc/
1762 cp %{_docsrc}/manual/bacula.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
1763 cp %{_docsrc}/developers/developers.pdf $RPM_BUILD_ROOT%{_prefix}/doc/
1764 cp -r %{_docsrc}/manual/bacula $RPM_BUILD_ROOT%{_prefix}/doc/
1765 cp ../Release_Notes-%{version}-%{release}.txt $RPM_BUILD_ROOT%{_prefix}/doc/
1766 %endif
1767
1768 # now clean up permissions that are left broken by the install
1769 chmod o-rwx $RPM_BUILD_ROOT%{working_dir}
1770 %if %{gconsole} && ! %{rh8}
1771 chmod 755 $RPM_BUILD_ROOT%{_sbindir}/bacula-tray-monitor
1772 chmod 644 $RPM_BUILD_ROOT%{sysconf_dir}/tray-monitor.conf
1773 %endif
1774
1775 # fix me - building enable-client-only installs files not included in bacula-client package
1776 %if %{client_only}
1777 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
1778 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
1779 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-sd
1780 rm -f $RPM_BUILD_ROOT%{script_dir}/disk-changer
1781 rm -f $RPM_BUILD_ROOT%{script_dir}/dvd-handler
1782 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer
1783 rm -f $RPM_BUILD_ROOT%{script_dir}/startmysql
1784 rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
1785 rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
1786 %endif
1787
1788 %clean
1789 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
1790 rm -rf $RPM_BUILD_DIR/%{name}-docs-%{docs_version}
1791 rm -rf $RPM_BUILD_DIR/%{name}-rescue-%{_rescuever}
1792 rm -rf $RPM_BUILD_DIR/depkgs
1793 rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
1794
1795 %if %{mysql}
1796 # MySQL specific files
1797 %files mysql
1798 %defattr(-, root, root)
1799 %attr(-, root, %{daemon_group}) %{script_dir}/create_mysql_database
1800 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_database
1801 %attr(-, root, %{daemon_group}) %{script_dir}/make_mysql_tables
1802 %attr(-, root, %{daemon_group}) %{script_dir}/drop_mysql_tables
1803 %attr(-, root, %{daemon_group}) %{script_dir}/update_mysql_tables
1804 %attr(-, root, %{daemon_group}) %{script_dir}/grant_mysql_privileges
1805 %attr(-, root, %{daemon_group}) %{script_dir}/startmysql
1806 %attr(-, root, %{daemon_group}) %{script_dir}/stopmysql
1807 %endif
1808
1809 %if %{sqlite}
1810 %files sqlite
1811 %defattr(-,root,root)
1812 %attr(-, root, %{daemon_group}) %{script_dir}/create_sqlite3_database
1813 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite3_database
1814 %attr(-, root, %{daemon_group}) %{script_dir}/grant_sqlite3_privileges
1815 %attr(-, root, %{daemon_group}) %{script_dir}/make_sqlite3_tables
1816 %attr(-, root, %{daemon_group}) %{script_dir}/drop_sqlite3_tables
1817 %attr(-, root, %{daemon_group}) %{script_dir}/update_sqlite3_tables
1818 %{sqlite_bindir}/libsqlite3.a
1819 %{sqlite_bindir}/sqlite3.h
1820 %{sqlite_bindir}/sqlite3
1821 %endif
1822
1823 %if %{postgresql}
1824 %files postgresql
1825 %defattr(-,root,root)
1826 %attr(-, root, %{daemon_group}) %{script_dir}/create_postgresql_database
1827 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_database
1828 %attr(-, root, %{daemon_group}) %{script_dir}/make_postgresql_tables
1829 %attr(-, root, %{daemon_group}) %{script_dir}/drop_postgresql_tables
1830 %attr(-, root, %{daemon_group}) %{script_dir}/update_postgresql_tables
1831 %attr(-, root, %{daemon_group}) %{script_dir}/grant_postgresql_privileges
1832 %endif
1833
1834 # The rest is DB backend independent
1835 %if ! %{client_only}
1836 %attr(-, root, %{daemon_group}) %dir %{script_dir}
1837 %attr(-, root, %{daemon_group}) %{script_dir}/bacula
1838 %attr(-, root, %{daemon_group}) %{script_dir}/bconsole
1839 %attr(-, root, %{daemon_group}) %{script_dir}/create_bacula_database
1840 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_database
1841 %attr(-, root, %{daemon_group}) %{script_dir}/grant_bacula_privileges
1842 %attr(-, root, %{daemon_group}) %{script_dir}/make_bacula_tables
1843 %attr(-, root, %{daemon_group}) %{script_dir}/drop_bacula_tables
1844 %attr(-, root, %{daemon_group}) %{script_dir}/update_bacula_tables
1845 %attr(-, root, %{daemon_group}) %{script_dir}/make_catalog_backup
1846 %attr(-, root, %{daemon_group}) %{script_dir}/delete_catalog_backup
1847 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
1848 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
1849 %attr(-, root, %{daemon_group}) %{script_dir}/rescue
1850 %attr(-, root, %{daemon_group}) %{script_dir}/disk-changer
1851 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-dir
1852 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
1853 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
1854 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
1855 %attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
1856 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
1857 %attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
1858 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
1859
1860 /etc/logrotate.d/bacula
1861 /etc/log.d/scripts/services/bacula
1862 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-dir.conf
1863 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
1864 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-sd.conf
1865 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
1866 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
1867 %attr(-, root, %{daemon_group}) %config(noreplace) /etc/log.d/conf/services/bacula.conf
1868 %attr(-, root, %{daemon_group}) %config(noreplace) %{script_dir}/query.sql
1869
1870 %attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{working_dir}
1871
1872 %{_sbindir}/bacula-dir
1873 %{_sbindir}/bacula-fd
1874 %{_sbindir}/bacula-sd
1875 %{_sbindir}/bcopy
1876 %{_sbindir}/bextract
1877 %{_sbindir}/bls
1878 %{_sbindir}/bscan
1879 %{_sbindir}/btape
1880 %{_sbindir}/btraceback
1881 %{_sbindir}/bconsole
1882 %{_sbindir}/dbcheck
1883 %{_sbindir}/bsmtp
1884 %{_sbindir}/bregex
1885 %{_sbindir}/bwild
1886 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
1887 %{_mandir}/man8/bacula-dir.8.%{manpage_ext}
1888 %{_mandir}/man8/bacula-sd.8.%{manpage_ext}
1889 %{_mandir}/man8/bacula.8.%{manpage_ext}
1890 %{_mandir}/man8/bconsole.8.%{manpage_ext}
1891 %{_mandir}/man8/bcopy.8.%{manpage_ext}
1892 %{_mandir}/man8/bextract.8.%{manpage_ext}
1893 %{_mandir}/man8/bls.8.%{manpage_ext}
1894 %{_mandir}/man8/bscan.8.%{manpage_ext}
1895 %{_mandir}/man8/btape.8.%{manpage_ext}
1896 %{_mandir}/man8/btraceback.8.%{manpage_ext}
1897 %{_mandir}/man8/dbcheck.8.%{manpage_ext}
1898 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
1899 %endif
1900
1901 %if ! %{client_only} && ! %{single_dir}
1902 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
1903 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1904 %endif
1905
1906 %if %{single_dir}
1907 %{_prefix}/doc
1908 %endif
1909
1910 %if %{mysql}
1911 %pre mysql
1912 # test for bacula database older than version 9
1913 # note: this ASSUMES no password has been set for bacula database
1914 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
1915 %endif
1916
1917 %if %{sqlite}
1918 %pre sqlite
1919 # are we upgrading from sqlite to sqlite3?
1920 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
1921         echo "This version of bacula-sqlite involves an upgrade to sqlite3."
1922         echo "Your catalog database file is not compatible with sqlite3, thus"
1923         echo "you will need to dump the data, delete the old file, and re-run"
1924         echo "this rpm upgrade."
1925         echo ""
1926         echo "Backing up your current database..."
1927         echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db > %{working_dir}/bacula_backup.sql
1928         mv %{working_dir}/bacula.db %{working_dir}/bacula.db.old
1929         echo "Your catalog data has been saved in %{working_dir}/bacula_backup.sql and your"
1930         echo "catalog file has been renamed %{working_dir}/bacula.db.old."
1931         echo ""
1932         echo "Please re-run this rpm package upgrade."
1933         echo "After the upgrade is complete, restore your catalog"
1934         echo "with the following commands:"
1935         echo "%{script_dir}/drop_sqlite3_tables"
1936         echo "cd %{working_dir}"
1937         echo "%{sqlite_bindir}/sqlite3 $* bacula.db < bacula_backup.sql"
1938         echo "chown bacula.bacula bacula.db"
1939         exit 1
1940 fi
1941 # test for bacula database older than version 9 and sqlite3
1942 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite3 ];then
1943         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
1944 %endif
1945
1946 %if %{postgresql}
1947 %pre postgresql
1948 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1949 %endif
1950
1951 %if ! %{client_only}
1952 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "9" ]; then
1953         echo "This bacula upgrade will update a bacula database from version 9 to 10."
1954         echo "You appear to be running database version $DB_VER. You must first update"
1955         echo "your database to version 9 and then install this upgrade. The alternative"
1956         echo "is to use %{script_dir}/drop_%{db_backend}_tables to delete all your your current"
1957         echo "catalog information, then do the upgrade. Information on updating a"
1958         echo "database older than version 9 can be found in the release notes."
1959         exit 1
1960 fi
1961 %endif
1962
1963 %if %{sqlite}
1964 fi
1965 %endif
1966
1967 %if ! %{client_only}
1968 # check for and copy %{sysconf_dir}/console.conf to bconsole.conf
1969 if [ -s %{sysconf_dir}/console.conf ];then
1970         cp -p %{sysconf_dir}/console.conf %{sysconf_dir}/bconsole.conf
1971 fi
1972
1973 # create the daemon users and groups
1974 # first create the groups if they don't exist
1975 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1976 if [ -z "$HAVE_BACULA" ]; then
1977         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1978         echo "The group %{daemon_group} has been added to %{group_file}."
1979         echo "See the manual chapter \"Running Bacula\" for details."
1980 fi
1981 HAVE_BACULA=`grep %{storage_daemon_group} %{group_file} 2>/dev/null`
1982 if [ -z "$HAVE_BACULA" ]; then
1983         %{groupadd} -r %{storage_daemon_group} > /dev/null 2>&1
1984         echo "The group %{storage_daemon_group} has been added to %{group_file}."
1985         echo "See the manual chapter \"Running Bacula\" for details."
1986 fi
1987 # now create the users if they do not exist
1988 # we do not use the -g option allowing the primary group to be set to system default
1989 # this will be a unique group on redhat type systems or the group users on some systems
1990 HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
1991 if [ -z "$HAVE_BACULA" ]; then
1992         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
1993         echo "The user %{storage_daemon_user} has been added to %{user_file}."
1994         echo "See the manual chapter \"Running Bacula\" for details."
1995 fi
1996 HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
1997 if [ -z "$HAVE_BACULA" ]; then
1998         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
1999         echo "The user %{director_daemon_user} has been added to %{user_file}."
2000         echo "See the manual chapter \"Running Bacula\" for details."
2001 fi
2002 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
2003 if [ -z "$HAVE_BACULA" ]; then
2004         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
2005         echo "The user %{file_daemon_user} has been added to %{user_file}."
2006         echo "See the manual chapter \"Running Bacula\" for details."
2007 fi
2008 # now we add the supplementary groups, this is ok to call even if the users already exist
2009 # we only do this if the user is NOT root
2010 IS_ROOT=%{director_daemon_user}
2011 if [ "$IS_ROOT" != "root" ]; then
2012 %{usermod} -G %{daemon_group} %{director_daemon_user}
2013 fi
2014 IS_ROOT=%{storage_daemon_user}
2015 if [ "$IS_ROOT" != "root" ]; then
2016 %{usermod} -G %{daemon_group},%{storage_daemon_group} %{storage_daemon_user}
2017 fi
2018 IS_ROOT=%{file_daemon_user}
2019 if [ "$IS_ROOT" != "root" ]; then
2020 %{usermod} -G %{daemon_group} %{file_daemon_user}
2021 fi
2022 %endif
2023
2024 %if %{mysql}
2025 %post mysql
2026 %endif
2027 %if %{sqlite}
2028 %post sqlite
2029 %endif
2030 %if %{postgresql}
2031 %post postgresql
2032 %endif
2033
2034 %if ! %{client_only}
2035 # add our links
2036 if [ "$1" -ge 1 ] ; then
2037 /sbin/chkconfig --add bacula-dir
2038 /sbin/chkconfig --add bacula-fd
2039 /sbin/chkconfig --add bacula-sd
2040 fi
2041 %endif
2042
2043 %if %{mysql}
2044 # test for an existing database
2045 # note: this ASSUMES no password has been set for bacula database
2046 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
2047
2048 # grant privileges and create tables if they do not exist
2049 if [ -z "$DB_VER" ]; then
2050         echo "Hmm, doesn't look like you have an existing database."
2051         echo "Granting privileges for MySQL user bacula..."
2052         %{script_dir}/grant_mysql_privileges
2053         echo "Creating MySQL bacula database..."
2054         %{script_dir}/create_mysql_database
2055         echo "Creating bacula tables..."
2056         %{script_dir}/make_mysql_tables
2057
2058 # check to see if we need to upgrade a 1.38 or lower database
2059 elif [ "$DB_VER" -lt "10" ]; then
2060         echo "This release requires an upgrade to your bacula database."
2061         echo "Backing up your current database..."
2062         mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
2063         echo "Upgrading bacula database ..."
2064         %{script_dir}/update_mysql_tables
2065         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
2066
2067 fi
2068 %endif
2069
2070 %if %{sqlite}
2071 # test for an existing database
2072 if [ -s %{working_dir}/bacula.db ]; then
2073         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite3 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
2074         # check to see if we need to upgrade a 1.38 or lower database
2075         if [ "$DB_VER" -lt "10" ] && [ "$DB_VER" -ge "9" ]; then
2076                 echo "This release requires an upgrade to your bacula database."
2077                 echo "Backing up your current database..."
2078                 echo ".dump" | %{sqlite_bindir}/sqlite3 %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
2079                 echo "Upgrading bacula database ..."
2080                 %{script_dir}/update_sqlite3_tables
2081                 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
2082         fi
2083 else
2084         # create the database and tables
2085         echo "Hmm, doesn't look like you have an existing database."
2086         echo "Creating SQLite database..."
2087         %{script_dir}/create_sqlite3_database
2088         chown %{director_daemon_user}.%{daemon_group} %{working_dir}/bacula.db
2089         echo "Creating the SQLite tables..."
2090         %{script_dir}/make_sqlite3_tables
2091 fi
2092 %endif
2093
2094 %if %{postgresql}
2095 # test for an existing database
2096 # note: this ASSUMES no password has been set for bacula database
2097 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
2098
2099 # grant privileges and create tables if they do not exist
2100 if [ -z "$DB_VER" ]; then
2101         echo "Hmm, doesn't look like you have an existing database."
2102         echo "Creating PostgreSQL bacula database..."
2103         %{script_dir}/create_postgresql_database
2104         echo "Creating bacula tables..."
2105         %{script_dir}/make_postgresql_tables
2106         echo "Granting privileges for PostgreSQL user bacula..."
2107         %{script_dir}/grant_postgresql_privileges
2108
2109 # check to see if we need to upgrade a 1.38 or lower database
2110 elif [ "$DB_VER" -lt "10" ]; then
2111         echo "This release requires an upgrade to your bacula database."
2112         echo "Backing up your current database..."
2113         pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
2114         echo "Upgrading bacula database ..."
2115         %{script_dir}/update_postgresql_tables
2116         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
2117         
2118 fi
2119 %endif
2120
2121 %if ! %{client_only}
2122 # generate passwords if needed
2123 if [ -d %{sysconf_dir} ]; then
2124         cd %{sysconf_dir}
2125         for file in *.conf; do
2126                 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2127                         need_password=`grep $string $file 2>/dev/null`
2128                         if [ -n "$need_password" ]; then
2129                                 pass=`openssl rand -base64 33`
2130                                 sed "s-$string-$pass-g" $file > $file.new
2131                                 cp -f $file.new $file; rm -f $file.new
2132                         fi
2133                 done
2134         done
2135 fi
2136 %endif
2137
2138 %if %{mysql}
2139 %preun mysql
2140 %endif
2141 %if %{sqlite}
2142 %preun sqlite
2143 %endif
2144 %if %{postgresql}
2145 %preun postgresql
2146 %endif
2147
2148 %if ! %{client_only}
2149 # delete our links
2150 if [ $1 = 0 ]; then
2151 /sbin/chkconfig --del bacula-dir
2152 /sbin/chkconfig --del bacula-fd
2153 /sbin/chkconfig --del bacula-sd
2154 fi
2155 %endif
2156
2157
2158 %if ! %{client_only} && %{mtx} && ! %{single_dir}
2159 %files mtx
2160 %defattr(-,root,root)
2161 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/loaderinfo
2162 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/mtx
2163 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsitape
2164 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/tapeinfo
2165 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/nsmhack
2166 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsieject
2167 %{_mandir}/man1/loaderinfo.1.%{manpage_ext}
2168 %{_mandir}/man1/mtx.1.%{manpage_ext}
2169 %{_mandir}/man1/scsitape.1.%{manpage_ext}
2170 %{_mandir}/man1/tapeinfo.1.%{manpage_ext}
2171 %{_mandir}/man1/scsieject.1.%{manpage_ext}
2172 %endif
2173
2174 %if ! %{client_only} && %{mtx} && %{single_dir}
2175 %files mtx
2176 %defattr(-,root,root)
2177 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/loaderinfo
2178 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/mtx
2179 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsitape
2180 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/tapeinfo
2181 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/nsmhack
2182 %attr(-, root, %{storage_daemon_group}) %{_sbindir}/scsieject
2183 %{_mandir}/man1/loaderinfo.1
2184 %{_mandir}/man1/mtx.1
2185 %{_mandir}/man1/scsitape.1
2186 %{_mandir}/man1/tapeinfo.1
2187 %{_mandir}/man1/scsieject.1
2188 %endif
2189
2190 %files client
2191 %defattr(-,root,root)
2192 %attr(-, root, %{daemon_group}) %dir %{script_dir}
2193 %{script_dir}/bacula-ctl-fd
2194 /etc/init.d/bacula-fd
2195 %attr(-, root, %{daemon_group}) %{script_dir}/rescue
2196
2197 %if ! %{single_dir}
2198 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
2199 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
2200 %else
2201 %{_prefix}/doc
2202 %endif
2203
2204 /etc/logrotate.d/bacula
2205
2206 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bacula-fd.conf
2207 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bconsole.conf
2208
2209 %attr(-, root, %{daemon_group}) %dir %{working_dir}
2210
2211 %{_sbindir}/bacula-fd
2212 %{_sbindir}/btraceback
2213 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.gdb
2214 %attr(-, root, %{daemon_group}) %{script_dir}/btraceback.dbx
2215 %{_sbindir}/bconsole
2216 %{_mandir}/man8/bacula-fd.8.%{manpage_ext}
2217 %{_mandir}/man8/bacula.8.%{manpage_ext}
2218 %{_mandir}/man8/bconsole.8.%{manpage_ext}
2219 %{_mandir}/man8/btraceback.8.%{manpage_ext}
2220
2221
2222 %pre client
2223 # create the daemon group and user
2224 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2225 if [ -z "$HAVE_BACULA" ]; then
2226         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2227         echo "The group %{daemon_group} has been added to %{group_file}."
2228         echo "See the manual chapter \"Running Bacula\" for details."
2229 fi
2230 # we do not use the -g option allowing the primary group to be set to system default
2231 # this will be a unique group on redhat type systems or the group users on some systems
2232 HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
2233 if [ -z "$HAVE_BACULA" ]; then
2234         %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
2235         echo "The user %{file_daemon_user} has been added to %{user_file}."
2236         echo "See the manual chapter \"Running Bacula\" for details."
2237 fi
2238 # now we add the supplementary group, this is ok to call even if the user already exists
2239 # we only do this if the user is NOT root
2240 IS_ROOT=%{file_daemon_user}
2241 if [ "$IS_ROOT" != "root" ]; then
2242 %{usermod} -G %{daemon_group} %{file_daemon_user}
2243 fi
2244
2245 %post client
2246 # add our link
2247 if [ "$1" -ge 1 ] ; then
2248 /sbin/chkconfig --add bacula-fd
2249 fi
2250
2251 # generate passwords if needed
2252 if [ -d %{sysconf_dir} ]; then
2253         cd %{sysconf_dir}
2254         for file in *.conf; do
2255                 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2256                         need_password=`grep $string $file 2>/dev/null`
2257                         if [ -n "$need_password" ]; then
2258                                 pass=`openssl rand -base64 33`
2259                                 sed "s-$string-$pass-g" $file > $file.new
2260                                 cp -f $file.new $file; rm -f $file.new
2261                         fi
2262                 done
2263         done
2264 fi
2265
2266 %preun client
2267 # delete our link
2268 if [ $1 = 0 ]; then
2269 /sbin/chkconfig --del bacula-fd
2270 fi
2271
2272 %if ! %{client_only}
2273 %files updatedb
2274 %defattr(-,root,%{daemon_group})
2275 %{script_dir}/updatedb/*
2276
2277 %pre updatedb
2278 # create the daemon group
2279 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2280 if [ -z "$HAVE_BACULA" ]; then
2281         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2282         echo "The group %{daemon_group} has been added to %{group_file}."
2283         echo "See the manual chapter \"Running Bacula\" for details."
2284 fi
2285
2286 %post updatedb
2287 echo "The database update scripts were installed to %{script_dir}/updatedb"
2288 %endif
2289
2290 %if %{gconsole}
2291 %files gconsole
2292 %defattr(-,root,root)
2293 %{_sbindir}/bgnome-console
2294 %attr(-, root, %{daemon_group}) %dir %{script_dir}
2295 %attr(-, root, %{daemon_group}) %{script_dir}/gconsole
2296 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bgnome-console.conf
2297 /usr/share/pixmaps/bacula.png
2298 /usr/share/applications/bacula.desktop
2299 %{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
2300 %endif
2301
2302 %if %{gconsole} && ! %{rh8}
2303 %{_sbindir}/bacula-tray-monitor
2304 %config(noreplace) %{sysconf_dir}/tray-monitor.conf
2305 /usr/share/pixmaps/bacula-tray-monitor.xpm
2306 /usr/share/applications/bacula-tray-monitor.desktop
2307 %{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
2308 %endif
2309
2310 %if %{gconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110}
2311 # add the console helper files
2312 %config(noreplace,missingok) /etc/pam.d/bgnome-console
2313 %config(noreplace,missingok) /etc/security/console.apps/bgnome-console
2314 /usr/bin/bgnome-console
2315 %endif
2316
2317 %if %{gconsole}
2318 %pre gconsole
2319 # create the daemon group
2320 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2321 if [ -z "$HAVE_BACULA" ]; then
2322         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2323         echo "The group %{daemon_group} has been added to %{group_file}."
2324         echo "See the manual chapter \"Running Bacula\" for details."
2325 fi
2326
2327 %post gconsole
2328 # generate passwords if needed
2329 if [ -d %{sysconf_dir} ]; then
2330         cd %{sysconf_dir}
2331         for file in *.conf; do
2332                 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2333                         need_password=`grep $string $file 2>/dev/null`
2334                         if [ -n "$need_password" ]; then
2335                                 pass=`openssl rand -base64 33`
2336                                 sed "s-$string-$pass-g" $file > $file.new
2337                                 cp -f $file.new $file; rm -f $file.new
2338                         fi
2339                 done
2340         done
2341 fi
2342 %endif
2343
2344 %if %{wxconsole}
2345 %files wxconsole
2346 %defattr(-,root,root)
2347 %{_sbindir}/bwx-console
2348 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2349 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bwx-console.conf
2350 /usr/share/pixmaps/wxwin16x16.xpm
2351 /usr/share/applications/wxconsole.desktop
2352 %{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
2353 %endif
2354
2355 %if %{wxconsole} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110}
2356 # add the console helper files
2357 %config(noreplace,missingok) /etc/pam.d/bwx-console
2358 %config(noreplace,missingok) /etc/security/console.apps/bwx-console
2359 /usr/bin/bwx-console
2360 %endif
2361
2362 %if %{wxconsole}
2363 %pre wxconsole
2364 # create the daemon group
2365 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2366 if [ -z "$HAVE_BACULA" ]; then
2367         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2368         echo "The group %{daemon_group} has been added to %{group_file}."
2369         echo "See the manual chapter \"Running Bacula\" for details."
2370 fi
2371
2372 %post wxconsole
2373 # generate passwords if needed
2374 if [ -d %{sysconf_dir} ]; then
2375         cd %{sysconf_dir}
2376         for file in *.conf; do
2377                 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2378                         need_password=`grep $string $file 2>/dev/null`
2379                         if [ -n "$need_password" ]; then
2380                                 pass=`openssl rand -base64 33`
2381                                 sed "s-$string-$pass-g" $file > $file.new
2382                                 cp -f $file.new $file; rm -f $file.new
2383                         fi
2384                 done
2385         done
2386 fi
2387 %endif
2388
2389 %if %{bat}
2390 %files bat
2391 %defattr(-,root,root)
2392 %{_sbindir}/bat
2393 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
2394 %attr(-, root, %{daemon_group}) %config(noreplace) %{sysconf_dir}/bat.conf
2395 /usr/share/pixmaps/bat_icon.png
2396 /usr/share/applications/bat.desktop
2397 %{_mandir}/man1/bat.1.%{manpage_ext}
2398 %endif
2399
2400 %if %{bat} && ! %{su9} && ! %{su10} && ! %{su102} && ! %{su103} && ! %{su110}
2401 # add the console helper files
2402 %config(noreplace,missingok) /etc/pam.d/bat
2403 %config(noreplace,missingok) /etc/security/console.apps/bat
2404 /usr/bin/bat
2405 %endif
2406
2407 %if %{bat}
2408 %pre bat
2409 # create the daemon group
2410 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
2411 if [ -z "$HAVE_BACULA" ]; then
2412         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
2413         echo "The group %{daemon_group} has been added to %{group_file}."
2414         echo "See the manual chapter \"Running Bacula\" for details."
2415 fi
2416
2417 %post bat
2418 # generate passwords if needed
2419 if [ -d %{sysconf_dir} ]; then
2420         cd %{sysconf_dir}
2421         for file in *.conf; do
2422                 for string in XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX; do
2423                         need_password=`grep $string $file 2>/dev/null`
2424                         if [ -n "$need_password" ]; then
2425                                 pass=`openssl rand -base64 33`
2426                                 sed "s-$string-$pass-g" $file > $file.new
2427                                 cp -f $file.new $file; rm -f $file.new
2428                         fi
2429                 done
2430         done
2431 fi
2432 %endif
2433
2434 %changelog
2435 * Sun Aug 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2436 - add support for install to /opt/bacula
2437 * Sun Aug 17 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2438 - remove libtermcap dependancy for FC9
2439 * Mon Aug 04 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2440 - fix bat dependencies
2441 * Sat Jun 28 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2442 - add su110 target
2443 * Sat May 24 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2444 - add fc9 target
2445 * Sun Mar 30 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2446 - FHS compatibility changes
2447 * Sat Feb 16 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2448 - remove fix for false buffer overflow detection with glibc >= 2.7
2449 * Sat Feb 09 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2450 - fix for false buffer overflow detection with glibc >= 2.7
2451 * Sun Jan 27 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2452 - 2.2.8 release
2453 - add debug package for SuSE
2454 * Sat Jan 12 2008 D. Scott Barninger <barninger@fairfieldcomputers.com>
2455 - 2.2.8 beta release  
2456 - fix bug 1037
2457 - add fc8 target
2458 * Sun Dec 30 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2459 - fix typo on su103 client package requirements
2460 * Fri Dec 28 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2461 - add nobuild_mtx switch
2462 - add patch for postgresql.c for old postgresql versions
2463 * Sat Nov 17 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2464 - switch to sqlite3
2465 * Sun Nov 11 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2466 - add new files required by rescue makefile
2467 * Sat Nov 10 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2468 - add su103 build target
2469 * Sun Nov 04 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2470 - fix dist defines for rhel5 and clones
2471 - fix rhel broken 64 bit QT4 paths
2472 - rh qt4 packages don't provide qt so fix that too
2473 * Mon Oct 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2474 - correct ownership when creating sqlite db file in post script
2475 * Sun Sep 16 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2476 - fix disable-batch-insert
2477 * Fri Sep 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2478 - 2.2.4 release
2479 - turn off gconsole build for fc3, tray monitor fails to build
2480 - add new files for mtx package (09Sep07 depkgs update)
2481 * Sat Sep 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2482 - add --disable-batch-insert for older platforms
2483 - add build targets for rhel5 and clones
2484 * Mon Sep 03 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2485 - 2.2.1 release
2486 - turn off gconsole build for su10 & fc4, tray monitor fails to build
2487 * Sat Jul 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2488 - 2.1.26 add make of qwt in depkgs for bat
2489 * Sat Jun 02 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2490 - upgrade Qt requirement for bat to 4.2
2491 * Sun May 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2492 - add fc7 build target
2493 * Sun Apr 29 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2494 - 2.1.8
2495 - gnome-console now bgnome-console
2496 - wxconsole now bwx-console
2497 - add build option for bat
2498 * Sat Apr 08 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2499 - merge Otto Mueller's patch but keep script dir set to /etc/bacula
2500 - add build tag for Scientific Linux per Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
2501 * Tue Mar 27 2007 Otto Mueller <otto.mueller@bundestag.de>
2502 - adjust directory locations for FHS-compatibility
2503   sysconf_dir (/etc/bacula), script_dir (/usr/lib/bacula),
2504   working_dir (/var/lib/bacula) and pid_dir (/var/run)
2505 * Mon Feb 26 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2506 - add SuSE 10.2 target
2507 * Sat Jan 20 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2508 - correct bug 752
2509 - set query.sql as config file
2510 - correct bug 754
2511 * Sun Jan 14 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2512 - 2.0.1 release
2513 - change determination of gcc version per patch from Marc Hennes
2514 - move BuildRequire for atk-devel to gnome only builds
2515 - add fc6 build tag
2516 * Sat Jan 06 2007 D. Scott Barninger <barninger@fairfieldcomputers.com>
2517 - 2.0.0 release
2518 * Sun Oct 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2519 - 1.39.26 remove create_sqlite_database.in.patch
2520 * Sun Sep 24 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2521 - change ownership of working_dir on server packages to bacula.bacula so that
2522 - bacula-sd can create bootstrap files
2523 * Sat Sep 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2524 - 1.39.22 remove separate cd and make of manpages the main Makefile does it now
2525 * Sun Aug 06 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2526 - fix manpages file extension for mdk
2527 * Sat Aug 05 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2528 - bug 648 re-enable and update sqlite patches
2529 - 1.39.18 changes
2530 - updatedb 9 to 10
2531 - install man pages
2532 - lock out gconsole build for gtk+ < 2.4
2533 * Mon Jul 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2534 - move pango-devel BuildRequires into gconsole only build
2535 * Sat Jul 15 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2536 - add provides and conflicts for standard suse packages
2537 - add third party packager tag support
2538 - add build_client_only tag
2539 - remove bsmtp from client package
2540 - add bacula-ctl-fd to client package
2541 * Thu Jul 13 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2542 - fix directory creation when wxconsole and not gconsole
2543 * Tue Jul 04 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2544 - add check to buildrequires to make sure libstdc++ version matches gcc
2545 * Mon Jul 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2546 - add python build support
2547 - fix LDFLAGS declarations
2548 * Sun Jul 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2549 - add requires for standard compiler toolchain
2550 - move version and release tags up
2551 - move patches up
2552 - add docs_version tag
2553 * Sat Jul 01 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2554 - update rescuever to 1.8.6
2555 * Sun Jun 25 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2556 - update depkgs to 25Jun06
2557 - add mysql5 build tag
2558 * Mon Jun 12 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2559 - 1.38.10 bump rescue version
2560 * Sun Jun 03 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2561 - fix usermod statements
2562 - add fc5 target
2563 * Thu Apr 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2564 - add -g param back to useradd statements Bug 605
2565 * Mon Apr 17 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2566 - redundant code cleanup
2567 * Sun Apr 16 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2568 - add wxconsole package
2569 * Fri Apr 14 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2570 - 1.38.8 release
2571 - dependency update for Mandriva
2572 * Sun Apr 08 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2573 - 1.38.7 release
2574 - remove -n option from useradd scripts
2575 * Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2576 - 1.38.6 release
2577 - fix problem specifying more than one primary group for user bacula
2578 - add build switch to not build gconsole regardless of platform
2579 * Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2580 - add centos3 build tag
2581 - fix link error of static-fd on Mandrake with --disable-nls
2582 * Fri Jan 27 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2583 - add fc4 dependencies
2584 * Mon Jan 23 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2585 - add SuSE 10.0 build
2586 - remove specific permission in attrib macros
2587 * Sat Jan 21 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
2588 - 1.38.5 release
2589 - fix usermode required on suse, suse doesn't have usermode (xsu instead)
2590 - refix compat for _dist on SLES9 which seems to have been removed
2591 - added note regarding Aleksandar's use of specific permissions in attrib macros
2592 - need to review and add specific fc4 build currently using fc3 Requires
2593 * Wed Dec 14 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2594 - 1.38.2 release
2595 - Reorganize files and pre/post sections to remove repetitions
2596 - Always build separate mtx package
2597 - Fix file ownerships for /etc/bacula and Bacula's working dir
2598 * Wed Nov 23 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2599 - Disable GNOME on RH7
2600 * Fri Nov 18 2005 Aleksandar Milivojevic <alex@milivojevic.org>
2601 - Red Hat and look alikes have mtx RPM, do not build/package our version
2602 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2603 - minor edit to _dist for SLES9 compatibility
2604 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2605 - 1.38.0 release
2606 - kern changed location of pdf files and html manual in docs package
2607 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2608 - 1.38.0 release
2609 - add docs (from prebuilt tarball) and rescue packages back in
2610 - remove dvd-freespace and dvd-writepart files, add dvd-handler
2611 - remove 3 of 4 sqlite script patches as not needed
2612 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2613 - changes for 1.38
2614 - remove docs and rescue sections (remove static fd)
2615 - add dvd-freespace and dvd-writepart files
2616 - update depkgs to 22Jun05
2617 - change database update to 8 to 9
2618 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2619 - minor cleanups before 1.38 changes
2620 - add popt and popt-devel build dependencies
2621 - add tetex and tetex-dvips dependencies for doc build
2622 - replace deprecated Copyright tag with License
2623 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2624 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
2625 - conflict with sqlite packages. remove readline dependency.
2626 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2627 - release 1.36.3 update docs
2628 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2629 - add centos4 build tag
2630 - add x86_64 build tag
2631 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2632 - add rhel4 build tag
2633 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
2634 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2635 - add rhel3 build tag
2636 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2637 - fix tray-monitor.conf for noreplace
2638 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2639 - fix distribution check for Fedora and Whitebox
2640 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2641 - add logwatch script
2642 - add dvd scripts
2643 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2644 - add build for Fedora Core 3 (linc now included in ORDit2)
2645 - add mysql4 define for Mandrake 10.1
2646 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
2647 - fix {group_file} variable in post scripts
2648 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
2649 - add distribution checking and custom Distribution tag
2650 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2651 - ASSIGNMENT OF COPYRIGHT
2652 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and 
2653 - assigns unto Kern Sibbald, his successors, assigns and personal representatives, 
2654 - all right, title and interest in and to the copyright in this software RPM
2655 - spec file. D. Scott Barninger warrants good title to said copyright, that it is 
2656 - free of all liens, encumbrances or any known claims against said copyright.
2657 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2658 - bug 183 fixes
2659 - thanks to Daniel Widyono
2660 - update description for rescue package to describe cdrom creation
2661 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2662 - update depkgs to 29Oct04
2663 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2664 - add cdrom rescue to bacula-rescue package
2665 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2666 - misc fixes from 1.36.0 suse feedback
2667 - fix situation where sqlite database exists but sqlite has been removed.
2668 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2669 - remove tray-monitor from RH8 build
2670 - fix permissions on tray-monitor files
2671 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2672 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
2673 - change database update to 7 to 8 upgrade,
2674 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
2675 - build in 30Jul04, add freetype dependancy to gnome package.
2676 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2677 - add documentation to console for groupadd
2678 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2679 - add support for running daemons as root.bacula
2680 - correct for change in location of floppy rescue files in 1.35.2
2681 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
2682 - updated depgkgs to 30Jul04
2683 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2684 - really, really fix symlink creation for gconsole
2685 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2686 - fix symlink creation in gconsole post install
2687 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2688 - fixed error in gconsole post script
2689 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2690 - add check for gconsole symlink before trying to create it
2691 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2692 - fix some minor permissions issues on doc files that CVS won't let us fix
2693 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2694 - add pkgconfig to BuildRequires
2695 - clean up gnome1/2 menu entries for appropriate packages
2696 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2697 - tightened up doc distribution
2698 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2699 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
2700 - rpm's horrible bug that prevents nested conditional macros prevents me
2701 - from implementing these 2 separate approaches within the conditionals which
2702 - create the separate server packages.
2703 - the solution adopted is to remove the gnome-console files from the server packages
2704 - so bacula-gconsole is now an add on for both client and server packages.
2705 - this also now allows the server packages to be install on machines without
2706 - an X-server and we can still maintain a single spec file.
2707 - added tests to make sure we have defined platform and database macros.
2708 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2709 - corrected mysql prerequisites for suse
2710 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2711 - replaced all cp commands with cp -p
2712 - removed addition of a+x permissions on gnome-console
2713 - corrected permissions on init scripts
2714 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2715 - corrected creation of sqlite_bindir in install from !mysql to sqlite
2716 -
2717 - various cleanup patches from Michael K. Johnson:
2718 - corrected post install routines for nicer chkconfig
2719 - removed chmod changes in post routines and moved to install section
2720 - removed interactive nature of post routine for rescue package
2721 - added description of building rescue disks to the description of rescue package
2722 - added clean of build root to beginning of install
2723 - removed specifying attr in all file lists
2724 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2725 - added bconsole to client package
2726 - added gconsole package as add-on to client
2727 - removed spurious dependancies on updatedb package (!cut/paste)
2728 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2729 - added updatedb package
2730 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2731 - added postgresql package
2732 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2733 - corrected the if else logic in the dependancy sections
2734 - changes for 1.34 release
2735 - /etc/bacula/console is now /etc/bacula/bconsole
2736 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
2737 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
2738 - /usr/sbin/smtp is now /usr/sbin/bsmtp
2739 - added new /etc/bacula/drop_mysql_database
2740 - added new /etc/bacula/drop_sqlite_database
2741 - added new /etc/bacula/grant_sqlite_privileges
2742 - added new generic bacula database scripts in /etc/bacula
2743 - added pre-install sections to check for database versions older than 6
2744 - added check for /etc/bacula/console.conf and copy to bconsole.conf
2745 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2746 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
2747 - added testing for existing databases before executing any of the database creation scripts
2748 - added defines working_dir and sqlite_bindir in place of hard coded paths
2749 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2750 - added build configuration for SuSE.
2751 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
2752 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2753 - added patch for create_sqlite_database to fix the installed bindir
2754 - added execute of create_sqlite_database to post of sqlite package
2755 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2756 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
2757 - added bacula-fd as Requires for rescue package
2758 - added build tag for Fedora Core 1
2759 - cleaned up dependancies for all builds
2760 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
2761 - removed rh_version from package names
2762 - added platform build configuration section to beginning of file
2763 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2764 - removed make_static_bacula script from rescue package install
2765 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2766 - Added define at top of file for depkgs version
2767 - Added rescue sub-package
2768 - Moved requires statements into proper sub-package locations
2769 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2770 - Corrected Requires for Gnome 1.4/2.0 builds
2771 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2772 - Added separate source declaration for depkgs
2773 - added patch for make_catalog_backup script
2774 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2775 - Misc changes to mysql/sqlite build and rh7/8 menu differences
2776 - Added rh_version to sub-package names
2777 - Added installed but missing file /etc/bacula/gconsole
2778 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
2779 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
2780 - Update spec for version 1.31 and combine client
2781 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
2782 - Initial spec file