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