]> git.sur5r.net Git - bacula/bacula/blob - bacula/platforms/mandrake/bacula.spec.in
- Merge changes made to 1.38.3 into HEAD
[bacula/bacula] / bacula / platforms / mandrake / bacula.spec.in
1 # Bacula RPM spec file
2 # Copyright (C) 2000-2005 Kern Sibbald
3
4 # Platform Build Configuration
5
6 # basic defines for every build
7 %define depkgs ../depkgs
8 %define depkgs_version 22Jun05
9 %define sqlite_bindir /usr/lib/bacula/sqlite
10 %define working_dir /var/bacula
11 %define daemon_user root
12 %define daemon_group bacula
13 %define group_file /etc/group
14 %define groupadd /usr/sbin/groupadd
15 %define _rescuever 1.8.1
16
17 # platform defines - set one below or define the build_xxx on the command line
18 # RedHat builds
19 %define rh7 0
20 %{?build_rh7:%define rh7 1}
21 %define rh8 0
22 %{?build_rh8:%define rh8 1}
23 %define rh9 0
24 %{?build_rh9:%define rh9 1}
25 # Fedora Core build
26 %define fc1 0
27 %{?build_fc1:%define fc1 1}
28 %define fc3 0
29 %{?build_fc3:%define fc3 1}
30 %define fc4 0
31 %{?build_fc4:%define fc4 1}
32 # Whitebox Enterprise build
33 %define wb3 0
34 %{?build_wb3:%define wb3 1}
35 # RedHat Enterprise builds
36 %define rhel3 0
37 %{?build_rhel3:%define rhel3 1}
38 %{?build_rhel3:%define wb3 1}
39 %define rhel4 0
40 %{?build_rhel4:%define rhel4 1}
41 %{?build_rhel4:%define fc4 1}
42 # CentOS build
43 %define centos4 0
44 %{?build_centos4:%define centos4 1}
45 %{?build_centos4:%define fc4 1}
46 # SuSE build
47 %define su9 0
48 %{?build_su9:%define su9 1}
49 # Mandrake build
50 %define mdk 0
51 %{?build_mdk:%define mdk 1}
52
53 # test for a platform definition
54 %if ! %{rh7} && ! %{rh8} && ! %{rh9} && ! %{fc1} && ! %{fc3} && ! %{fc4} && ! %{wb3} && ! %{su9} && ! %{mdk}
55 %{error: You must specify a platform. Please examine the spec file.}
56 exit 1
57 %endif
58
59 # database defines
60 # set for database support desired or define the build_xxx on the command line
61 %define mysql 0
62 %{?build_mysql:%define mysql 1}
63 # if using mysql 4.x define this and mysql above
64 # currently: Mandrake 10.1, SuSE 9.2, RHEL4 and Fedora Core 4
65 %define mysql4 0
66 %{?build_mysql4:%define mysql4 1}
67 %{?build_mysql4:%define mysql 1}
68 %define sqlite 0
69 %{?build_sqlite:%define sqlite 1}
70 %define postgresql 0
71 %{?build_postgresql:%define postgresql 1}
72
73 # test for a database definition
74 %if ! %{mysql} && ! %{sqlite} && ! %{postgresql} && ! %{mysql4}
75 %{error: You must specify database support. Please examine the spec file.}
76 exit 1
77 %endif
78
79 # 64 bit support
80 %define x86_64 0
81 %{?build_x86_64:%define x86_64 1}
82
83 # check what distribution we are
84 %if %{rh7} || %{rh8} || %{rh9} || %{rhel3} || %{rhel4}
85 %define _dist %(grep Red /etc/redhat-release)
86 %endif
87 %if %{fc1}
88 %define _dist %(grep Fedora /etc/redhat-release)
89 %endif
90 %if %{centos4}
91 %define _dist %(grep CentOS /etc/redhat-release)
92 %endif
93 %if %{fc3} || %{fc4} && ! %{rhel4} && ! %{centos4}
94 %define _dist %(grep Fedora /etc/redhat-release)
95 %endif
96 %if %{wb3} && ! %{rhel3}
97 %define _dist %(grep White /etc/whitebox-release)
98 %endif
99 %if %{su9}
100 %define _dist %(grep -i SuSE /etc/SuSE-release)
101 %endif
102 %if %{mdk}
103 %define _dist %(grep Mandrake /etc/mandrake-release)
104 %endif
105
106 Summary: Bacula - The Network Backup Solution
107 Name: bacula
108 Version: @VERSION@
109 Release: 2
110 Group: System Environment/Daemons
111 License: GPL v2
112 Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
113 Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
114 Source2: Release_Notes-%{version}-%{release}.tar.gz
115 Source3:http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
116 Source4:http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
117 BuildRoot: %{_tmppath}/%{name}-root
118 URL: http://www.bacula.org/
119 Vendor: The Bacula Team
120 Distribution: %{_dist}
121 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
122
123 %define _docsrc ../%{name}-docs-%{version}
124 %define _rescuesrc ../%{name}-rescue-%{_rescuever}
125
126 BuildRequires: atk-devel, ncurses-devel, pango-devel, perl
127 BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
128 %if %{rh7}
129 BuildRequires: libtermcap-devel
130 BuildRequires: gtk+-devel >= 1.2
131 BuildRequires: gnome-libs-devel >= 1.4
132 BuildRequires: glibc-devel >= 2.2
133 BuildRequires: ORBit-devel
134 BuildRequires: bonobo-devel
135 BuildRequires: GConf-devel
136 BuildRequires: freetype-devel
137 %endif
138 %if %{su9}
139 BuildRequires: termcap
140 BuildRequires: libgnome >= 2.0
141 BuildRequires: gtk2-devel >= 2.0
142 BuildRequires: libgnomeui-devel >= 2.0
143 BuildRequires: glibc-devel >= 2.3
144 BuildRequires: ORBit2-devel
145 BuildRequires: libart_lgpl-devel >= 2.0
146 BuildRequires: libbonobo-devel >= 2.0
147 BuildRequires: libbonoboui-devel >= 2.0
148 BuildRequires: bonobo-activation-devel
149 BuildRequires: gconf2-devel
150 BuildRequires: linc-devel
151 BuildRequires: freetype2-devel
152 %endif
153 %if %{mdk}
154 BuildRequires: libtermcap-devel
155 BuildRequires: gtk2-devel >= 2.0
156 BuildRequires: libgnomeui2-devel >= 2.0
157 BuildRequires: glibc-devel >= 2.3
158 BuildRequires: libORBit2-devel
159 BuildRequires: libart_lgpl-devel >= 2.0
160 BuildRequires: libbonobo2_0-devel
161 BuildRequires: libbonoboui2_0-devel
162 BuildRequires: libbonobo-activation-devel
163 BuildRequires: libGConf2-devel
164 BuildRequires: libstdc++-static-devel
165 BuildRequires: glibc-static-devel
166 BuildRequires: freetype2-devel
167 %endif
168 %if %{fc3} || %{fc4}
169 BuildRequires: libtermcap-devel
170 BuildRequires: gtk2-devel >= 2.4
171 BuildRequires: libgnomeui-devel >= 2.8
172 BuildRequires: glibc-devel >= 2.3
173 BuildRequires: ORBit2-devel
174 BuildRequires: libart_lgpl-devel >= 2.3
175 BuildRequires: libbonobo-devel >= 2.8
176 BuildRequires: libbonoboui-devel >= 2.8
177 BuildRequires: bonobo-activation-devel
178 BuildRequires: GConf2-devel
179 BuildRequires: freetype-devel
180 %endif
181 %if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} && !%{fc4}
182 BuildRequires: libtermcap-devel
183 BuildRequires: gtk2-devel >= 2.0
184 BuildRequires: libgnomeui-devel >= 2.0
185 BuildRequires: glibc-devel >= 2.3
186 BuildRequires: ORBit2-devel
187 BuildRequires: libart_lgpl-devel >= 2.0
188 BuildRequires: libbonobo-devel >= 2.0
189 BuildRequires: libbonoboui-devel >= 2.0
190 BuildRequires: bonobo-activation-devel
191 BuildRequires: GConf2-devel
192 BuildRequires: linc-devel
193 BuildRequires: freetype-devel
194 %endif
195
196 %if %{mysql} && ! %{mysql4}
197 BuildRequires: mysql-devel >= 3.23
198 %endif
199
200 %if %{mysql} && %{mysql4}
201 BuildRequires: mysql-devel >= 4.0
202 %endif
203
204 %if %{postgresql} && %{wb3}
205 BuildRequires: rh-postgresql-devel >= 7
206 %endif
207
208 %if %{postgresql} && ! %{wb3}
209 BuildRequires: postgresql-devel >= 7
210 %endif
211
212 %description
213 Bacula - It comes by night and sucks the vital essence from your computers.
214
215 Bacula is a set of computer programs that permit you (or the system 
216 administrator) to manage backup, recovery, and verification of computer 
217 data across a network of computers of different kinds. In technical terms, 
218 it is a network client/server based backup program. Bacula is relatively 
219 easy to use and efficient, while offering many advanced storage management 
220 features that make it easy to find and recover lost or damaged files. 
221 Bacula source code has been released under the GPL version 2 license.
222
223 %if %{mysql}
224 %package mysql
225 %endif
226 %if %{sqlite}
227 %package sqlite
228 %endif
229 %if %{postgresql}
230 %package postgresql
231 %endif
232
233 Summary: Bacula - The Network Backup Solution
234 Group: System Environment/Daemons
235 Provides: bacula-dir, bacula-sd, bacula-fd, bacula-server
236 Conflicts: bacula-client
237 Obsoletes: bacula-rescue
238 Requires: ncurses, libstdc++, zlib
239
240 %if %{rh7}
241 Requires: glibc >= 2.2
242 Requires: libtermcap
243 %endif
244 %if %{su9}
245 Requires: glibc >= 2.3
246 Requires: termcap
247 %endif
248 %if ! %{rh7} && ! %{su9}
249 Requires: glibc >= 2.3
250 Requires: libtermcap
251 %endif
252
253 %if %{mysql} && ! %{su9} && ! %{mdk} && ! %{mysql4}
254 Requires: mysql >= 3.23
255 Requires: mysql-server >= 3.23
256 %endif
257 %if %{mysql} && ! %{su9} && ! %{mdk} && %{mysql4}
258 Requires: mysql >= 4.0
259 Requires: mysql-server >= 4.0
260 %endif
261
262 %if %{mysql} && %{su9} && ! %{mysql4}
263 Requires: mysql >= 3.23
264 Requires: mysql-client >= 3.23
265 %endif
266 %if %{mysql} && %{su9} && %{mysql4}
267 Requires: mysql >= 4.0
268 Requires: mysql-client >= 4.0
269 %endif
270
271 %if %{mysql} && %{mdk} && ! %{mysql4}
272 Requires: mysql >= 3.23
273 Requires: mysql-client >= 3.23
274 %endif
275 %if %{mysql} && %{mdk} && %{mysql4}
276 Requires: mysql >= 4.0
277 Requires: mysql-client >= 4.0
278 %endif
279
280 %if %{postgresql} && %{wb3}
281 Requires: rh-postgresql >= 7
282 Requires: rh-postgresql-server >= 7
283 %endif
284 %if %{postgresql} && ! %{wb3}
285 Requires: postgresql >= 7
286 Requires: postgresql-server >= 7
287 %endif
288
289 %if %{mysql}
290 %description mysql
291 %endif
292 %if %{sqlite}
293 %description sqlite
294 %endif
295 %if %{postgresql}
296 %description postgresql
297 %endif
298
299 Bacula - It comes by night and sucks the vital essence from your computers.
300
301 Bacula is a set of computer programs that permit you (or the system 
302 administrator) to manage backup, recovery, and verification of computer 
303 data across a network of computers of different kinds. In technical terms, 
304 it is a network client/server based backup program. Bacula is relatively 
305 easy to use and efficient, while offering many advanced storage management 
306 features that make it easy to find and recover lost or damaged files. 
307 Bacula source code has been released under the GPL version 2 license.
308
309 %if %{mysql}
310 This build requires MySQL to be installed separately as the catalog database.
311 %endif
312 %if %{postgresql}
313 This build requires PostgreSQL to be installed separately as the catalog database.
314 %endif
315 %if %{sqlite}
316 This build incorporates sqlite as the catalog database, statically compiled.
317 %endif
318
319 %package client
320 Summary: Bacula - The Network Backup Solution
321 Group: System Environment/Daemons
322 Provides: bacula-fd
323 Obsoletes: bacula-rescue
324 Requires: libstdc++, zlib
325
326 %if %{rh7}
327 Requires: glibc >= 2.2
328 Requires: libtermcap
329 %endif
330 %if %{su9}
331 Requires: glibc >= 2.3
332 Requires: termcap
333 %endif
334 %if ! %{rh7} && ! %{su9}
335 Requires: glibc >= 2.3
336 Requires: libtermcap
337 %endif
338
339 %description client
340 Bacula - It comes by night and sucks the vital essence from your computers.
341
342 Bacula is a set of computer programs that permit you (or the system 
343 administrator) to manage backup, recovery, and verification of computer 
344 data across a network of computers of different kinds. In technical terms, 
345 it is a network client/server based backup program. Bacula is relatively 
346 easy to use and efficient, while offering many advanced storage management 
347 features that make it easy to find and recover lost or damaged files. 
348 Bacula source code has been released under the GPL version 2 license.
349
350 This is the File daemon (Client) only package. It includes the command line 
351 console program.
352
353 %package updatedb
354
355 Summary: Bacula - The Network Backup Solution
356 Group: System Environment/Daemons
357
358 %description updatedb
359 Bacula - It comes by night and sucks the vital essence from your computers.
360
361 Bacula is a set of computer programs that permit you (or the system 
362 administrator) to manage backup, recovery, and verification of computer 
363 data across a network of computers of different kinds. In technical terms, 
364 it is a network client/server based backup program. Bacula is relatively 
365 easy to use and efficient, while offering many advanced storage management 
366 features that make it easy to find and recover lost or damaged files. 
367 Bacula source code has been released under the GPL version 2 license.
368
369 This package installs scripts for updating older versions of the bacula
370 database.
371
372 %package gconsole
373 Summary: Bacula - The Network Backup Solution
374 Group: System Environment/Daemons
375 Requires: atk, libstdc++, zlib, pango, libxml2, bacula-fd
376
377 %if %{rh7}
378 Requires: gtk+ >= 1.2
379 Requires: gnome-libs >= 1.4
380 Requires: glibc >= 2.2
381 Requires: ORBit
382 Requires: bonobo
383 Requires: GConf
384 Requires: freetype
385 %endif
386 %if %{su9}
387 Requires: gtk2 >= 2.0
388 Requires: libgnome >= 2.0
389 Requires: libgnomeui >= 2.0
390 Requires: glibc >= 2.3
391 Requires: ORBit2
392 Requires: libart_lgpl >= 2.0
393 Requires: libbonobo >= 2.0
394 Requires: libbonoboui >= 2.0
395 Requires: bonobo-activation
396 Requires: gconf2
397 Requires: linc
398 Requires: freetype2
399 %endif
400 %if %{mdk}
401 Requires: gtk2 >= 2.0
402 Requires: libgnomeui2
403 Requires: glibc >= 2.3
404 Requires: ORBit2
405 Requires: libart_lgpl >= 2.0
406 Requires: libbonobo >= 2.0
407 Requires: libbonoboui >= 2.0
408 Requires: GConf2
409 Requires: freetype2
410 %endif
411 %if %{fc3} || %{fc4}
412 Requires: gtk2 >= 2.4
413 Requires: libgnomeui >= 2.8
414 Requires: glibc >= 2.3
415 Requires: ORBit2
416 Requires: libart_lgpl >= 2.3
417 Requires: libbonobo >= 2.8
418 Requires: libbonoboui >= 2.8
419 Requires: bonobo-activation
420 Requires: GConf2
421 Requires: freetype
422 %endif
423 %if ! %{rh7} && ! %{su9} && ! %{mdk} && ! %{fc3} && ! %{fc4}
424 Requires: gtk2 >= 2.0
425 Requires: libgnomeui >= 2.0
426 Requires: glibc >= 2.3
427 Requires: ORBit2
428 Requires: libart_lgpl >= 2.0
429 Requires: libbonobo >= 2.0
430 Requires: libbonoboui >= 2.0
431 Requires: bonobo-activation
432 Requires: GConf2
433 Requires: linc
434 Requires: freetype
435 %endif
436 %if %{su9}
437 Requires: xsu
438 %else
439 Requires: usermode
440 %endif
441
442 %description gconsole
443 Bacula - It comes by night and sucks the vital essence from your computers.
444
445 Bacula is a set of computer programs that permit you (or the system 
446 administrator) to manage backup, recovery, and verification of computer 
447 data across a network of computers of different kinds. In technical terms, 
448 it is a network client/server based backup program. Bacula is relatively 
449 easy to use and efficient, while offering many advanced storage management 
450 features that make it easy to find and recover lost or damaged files. 
451 Bacula source code has been released under the GPL version 2 license.
452
453 This is the Gnome Console package. It is an add-on to the client or
454 server packages.
455
456 %prep
457
458 %setup
459 %setup -T -D -b 1
460 %setup -T -D -b 2
461 %setup -T -D -b 3
462 %setup -T -D -b 4
463
464 %build
465
466 %if %{su9}
467 export LDFLAGS="-L/usr/lib/termcap"
468 %endif
469
470 cwd=${PWD}
471 cd %{depkgs}
472 %if %{sqlite}
473 make sqlite
474 %endif
475 make mtx
476 cd ${cwd}
477
478 # patches for the bundled sqlite scripts
479 # as of 1.38.0 first 3 patches no longer needed
480
481 # patch the make_sqlite_tables script for installation bindir
482 # patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
483
484 # patch the create_sqlite_database script for installation bindir
485 #patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
486
487 # patch the make_catalog_backup script for installation bindir
488 #patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
489
490 # patch the update_sqlite_tables script for installation bindir
491 patch src/cats/update_sqlite_tables.in src/cats/update_sqlite_tables.in.patch
492
493 # patch the bacula-dir init script to remove sqlite service
494 %if %{sqlite} && %{su9}
495 patch platforms/suse/bacula-dir.in platforms/suse/bacula-dir-suse-sqlite.patch
496 %endif
497
498 # 64 bit lib location hacks
499 # this is the location on redhat type platforms, don't know about others yet
500 %if %{x86_64}
501 export LDFLAGS=-L/usr/lib64
502 %endif
503 %if %{mysql} && %{x86_64}
504 export LDFLAGS=-L/usr/lib64/mysql
505 %endif
506
507 %configure \
508         --prefix=/usr \
509         --sbindir=/usr/sbin \
510         --sysconfdir=/etc/bacula \
511         --with-scriptdir=/etc/bacula \
512         --enable-smartalloc \
513         --enable-gnome \
514 %if ! %{rh7} && ! %{rh8}
515         --enable-tray-monitor \
516 %endif
517 %if %{mysql}
518         --with-mysql \
519 %endif
520 %if %{sqlite}
521         --with-sqlite=${cwd}/%{depkgs}/sqlite \
522 %endif
523 %if %{postgresql}
524         --with-postgresql \
525 %endif
526         --with-working-dir=%{working_dir} \
527         --with-pid-dir=/var/run \
528         --with-subsys-dir=/var/lock/subsys \
529         --with-dir-user=%{daemon_user} \
530         --with-dir-group=%{daemon_group} \
531         --with-sd-user=%{daemon_user} \
532         --with-sd-group=%{daemon_group} \
533         --with-fd-user=%{daemon_user} \
534         --with-fd-group=%{daemon_group}
535 make
536
537 %install
538  
539 cwd=${PWD}
540 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
541 mkdir -p $RPM_BUILD_ROOT/etc/init.d
542 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
543 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/logfiles
544 mkdir -p $RPM_BUILD_ROOT/etc/log.d/conf/services
545 mkdir -p $RPM_BUILD_ROOT/etc/log.d/scripts/services
546 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
547 %if %{rh7}
548 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
549 %else
550 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
551 %endif
552 mkdir -p $RPM_BUILD_ROOT/etc/bacula/updatedb
553 %if ! %{su9}
554 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
555 mkdir -p $RPM_BUILD_ROOT/etc/security/console.apps
556 mkdir -p $RPM_BUILD_ROOT/usr/bin
557 %endif
558
559 %if %{sqlite}
560 mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
561 %endif
562
563 make \
564         prefix=$RPM_BUILD_ROOT/usr \
565         sbindir=$RPM_BUILD_ROOT/usr/sbin \
566         sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
567         scriptdir=$RPM_BUILD_ROOT/etc/bacula \
568         working_dir=$RPM_BUILD_ROOT%{working_dir} \
569         install
570
571 cd %{depkgs}
572 make \
573         prefix=$RPM_BUILD_ROOT/usr \
574         sbindir=$RPM_BUILD_ROOT/usr/sbin \
575         sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
576         working_dir=$RPM_BUILD_ROOT%{working_dir} \
577         mandir=$RPM_BUILD_ROOT/usr/man \
578         mtx-install
579 cd ${cwd}
580
581 # fixme - make installs the mysql scripts for sqlite build
582 %if %{sqlite}
583 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
584 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
585 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
586 %endif
587
588 # fixme - make installs the mysql scripts for postgresql build
589 %if %{postgresql}
590 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
591 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
592 %endif
593
594 # install the init scripts
595 %if %{su9}
596 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
597 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
598 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
599 %endif
600 %if %{mdk}
601 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
602 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
603 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
604 %endif
605 %if ! %{su9} && ! %{mdk}
606 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
607 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
608 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
609 %endif
610 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
611
612 # install the menu stuff
613 %if %{su9}
614 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
615 cp -p scripts/bacula.desktop.gnome2.xsu $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
616 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
617 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
618 %endif
619 %if %{rh7}
620 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
621 cp -p scripts/bacula.desktop.gnome1.consolehelper $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
622 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
623 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
624 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
625 %endif
626 %if %{rh8} || %{rh9} || %{wb3} || %{fc1} || %{fc3} || %{fc4} || %{mdk}
627 cp -p scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
628 cp -p scripts/bacula.desktop.gnome2.consolehelper $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
629 cp -p scripts/gnome-console.console_apps $RPM_BUILD_ROOT/etc/security/console.apps/gnome-console
630 cp -p scripts/gnome-console.pamd $RPM_BUILD_ROOT/etc/pam.d/gnome-console
631 ln -sf consolehelper $RPM_BUILD_ROOT/usr/bin/gnome-console
632 %endif
633 %if ! %{rh7} && ! %{rh8}
634 cp -p src/tray-monitor/generic.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/bacula-tray-monitor.xpm
635 cp -p scripts/bacula-tray-monitor.desktop $RPM_BUILD_ROOT/usr/share/applications/bacula-tray-monitor.desktop
636 %endif
637
638 # install sqlite
639 %if %{sqlite}
640 cp -p %{depkgs}/sqlite/sqlite $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite
641 cp -p %{depkgs}/sqlite/sqlite.h $RPM_BUILD_ROOT%{sqlite_bindir}/sqlite.h
642 cp -p %{depkgs}/sqlite/libsqlite.a $RPM_BUILD_ROOT%{sqlite_bindir}/libsqlite.a
643 %endif
644
645 # install the logrotate file
646 cp -p scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
647
648 # install the updatedb scripts
649 cp -p updatedb/* $RPM_BUILD_ROOT/etc/bacula/updatedb/
650
651 # install the logwatch scripts
652 cp -p scripts/logwatch/bacula $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
653 cp -p scripts/logwatch/logfile.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
654 cp -p scripts/logwatch/services.bacula.conf $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
655 chmod 755 $RPM_BUILD_ROOT/etc/log.d/scripts/services/bacula
656 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/logfiles/bacula.conf
657 chmod 644 $RPM_BUILD_ROOT/etc/log.d/conf/services/bacula.conf
658
659 # install the rescue files
660 mkdir $RPM_BUILD_ROOT/etc/bacula/rescue
661 cp -p %{_rescuesrc}/Makefile* $RPM_BUILD_ROOT/etc/bacula/rescue/
662 cp -p %{_rescuesrc}/README $RPM_BUILD_ROOT/etc/bacula/rescue/
663 cp -p %{_rescuesrc}/configure $RPM_BUILD_ROOT/etc/bacula/rescue/
664 cp -p %{_rescuesrc}/version.h $RPM_BUILD_ROOT/etc/bacula/rescue/
665 cp -pr %{_rescuesrc}/linux $RPM_BUILD_ROOT/etc/bacula/rescue/
666 cp -pr %{_rescuesrc}/autoconf $RPM_BUILD_ROOT/etc/bacula/rescue/
667
668 # now clean up permissions that are left broken by the install
669 chmod o-r $RPM_BUILD_ROOT/etc/bacula/query.sql
670 chmod o-rwx $RPM_BUILD_ROOT/var/bacula
671 %if ! %{rh7} && ! %{rh8}
672 chmod 755 $RPM_BUILD_ROOT/usr/sbin/bacula-tray-monitor
673 chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
674 %endif
675
676 %clean
677 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
678
679 %if %{mysql}
680
681 %files mysql
682 %defattr(-,root,root)
683
684 /etc/bacula/bacula
685 /etc/bacula/bconsole
686 /etc/bacula/create_mysql_database
687 /etc/bacula/drop_mysql_database
688 /etc/bacula/make_mysql_tables
689 /etc/bacula/drop_mysql_tables
690 /etc/bacula/update_mysql_tables
691 /etc/bacula/grant_mysql_privileges
692 /etc/bacula/create_bacula_database
693 /etc/bacula/drop_bacula_database
694 /etc/bacula/grant_bacula_privileges
695 /etc/bacula/make_bacula_tables
696 /etc/bacula/drop_bacula_tables
697 /etc/bacula/update_bacula_tables
698 /etc/bacula/make_catalog_backup
699 /etc/bacula/delete_catalog_backup
700 /etc/bacula/startmysql
701 /etc/bacula/stopmysql
702 /etc/bacula/mtx-changer
703 /etc/bacula/btraceback.dbx
704 /etc/bacula/btraceback.gdb
705 #/etc/bacula/dvd-freespace
706 #/etc/bacula/dvd-writepart
707 /etc/bacula/dvd-handler
708 /etc/init.d/bacula-dir
709 /etc/init.d/bacula-fd
710 /etc/init.d/bacula-sd
711 /etc/bacula/rescue
712
713 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
714 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
715 /usr/man/man1/*
716
717 /etc/logrotate.d/bacula
718 /etc/log.d/scripts/services/bacula
719 %config(noreplace) /etc/bacula/bacula-dir.conf
720 %config(noreplace) /etc/bacula/bacula-fd.conf
721 %config(noreplace) /etc/bacula/bacula-sd.conf
722 %config(noreplace) /etc/bacula/bconsole.conf
723 %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
724 %config(noreplace) /etc/log.d/conf/services/bacula.conf
725 /etc/bacula/query.sql
726 %dir %{working_dir}
727
728 /usr/sbin/bacula-dir
729 /usr/sbin/bacula-fd
730 /usr/sbin/bacula-sd
731 /usr/sbin/bcopy
732 /usr/sbin/bextract
733 /usr/sbin/bls
734 /usr/sbin/bscan
735 /usr/sbin/btape
736 /usr/sbin/btraceback
737 /usr/sbin/bconsole
738 /usr/sbin/dbcheck
739 /usr/sbin/loaderinfo
740 /usr/sbin/mtx
741 /usr/sbin/scsitape
742 /usr/sbin/bsmtp
743 /usr/sbin/tapeinfo
744
745 %pre mysql
746 # test for bacula database older than version 8
747 # note: this ASSUMES no password has been set for bacula database
748 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
749
750 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then
751         echo "This bacula upgrade will update a bacula database from version 8 to 9."
752         echo "You appear to be running database version $DB_VER. You must first update"
753         echo "your database to version 8 and then install this upgrade. The alternative"
754         echo "is to use /etc/bacula/drop_mysql_tables to delete all your your current"
755         echo "catalog information, then do the upgrade. Information on updating a"
756         echo "database older than version 8 can be found in the release notes."
757         exit 1
758 fi
759 # check for and copy /etc/bacula/console.conf to bconsole.conf
760 if [ -s /etc/bacula/console.conf ];then
761         cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
762 fi
763
764 %post mysql
765
766 # add our links
767 if [ "$1" -ge 1 ] ; then
768 /sbin/chkconfig --add bacula-dir
769 /sbin/chkconfig --add bacula-fd
770 /sbin/chkconfig --add bacula-sd
771 fi
772
773 # test for an existing database
774 # note: this ASSUMES no password has been set for bacula database
775 DB_VER=`mysql 2>/dev/null bacula -e 'select * from Version;'|tail -n 1`
776
777 # grant privileges and create tables if they do not exist
778 if [ -z "$DB_VER" ]; then
779         echo "Hmm, doesn't look like you have an existing database."
780         echo "Granting privileges for MySQL user bacula..."
781         /etc/bacula/grant_mysql_privileges
782         echo "Creating MySQL bacula database..."
783         /etc/bacula/create_mysql_database
784         echo "Creating bacula tables..."
785         /etc/bacula/make_mysql_tables
786
787 # check to see if we need to upgrade a 1.36 or lower database
788 elif [ "$DB_VER" -lt "9" ]; then
789         echo "This release requires an upgrade to your bacula database."
790         echo "Backing up your current database..."
791         mysqldump -f --opt bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
792         echo "Upgrading bacula database ..."
793         /etc/bacula/update_mysql_tables
794         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
795
796 fi
797
798 # create the daemon group
799 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
800 if [ -z $HAVE_BACULA ]; then
801         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
802         echo "The group %{daemon_group} has been added to %{group_file}."
803         echo "See the manual chapter Running Bacula for details."
804 fi
805
806 %preun mysql
807 # delete our links
808 if [ $1 = 0 ]; then
809 /sbin/chkconfig --del bacula-dir
810 /sbin/chkconfig --del bacula-fd
811 /sbin/chkconfig --del bacula-sd
812 fi
813
814 %endif
815
816 %if %{sqlite}
817
818 %files sqlite
819 %defattr(-,root,root)
820
821 /etc/bacula/bacula
822 /etc/bacula/bconsole
823 /etc/bacula/create_bacula_database
824 /etc/bacula/drop_bacula_database
825 /etc/bacula/grant_bacula_privileges
826 /etc/bacula/make_bacula_tables
827 /etc/bacula/drop_bacula_tables
828 /etc/bacula/update_bacula_tables
829 /etc/bacula/create_sqlite_database
830 /etc/bacula/drop_sqlite_database
831 /etc/bacula/grant_sqlite_privileges
832 /etc/bacula/make_sqlite_tables
833 /etc/bacula/drop_sqlite_tables
834 /etc/bacula/update_sqlite_tables
835 /etc/bacula/make_catalog_backup
836 /etc/bacula/delete_catalog_backup
837 /etc/bacula/mtx-changer
838 /etc/bacula/btraceback.dbx
839 /etc/bacula/btraceback.gdb
840 #/etc/bacula/dvd-freespace
841 #/etc/bacula/dvd-writepart
842 /etc/bacula/dvd-handler
843 /etc/init.d/bacula-dir
844 /etc/init.d/bacula-fd
845 /etc/init.d/bacula-sd
846 /etc/bacula/rescue
847
848 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
849 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
850 /usr/man/man1/*
851
852 /etc/logrotate.d/bacula
853 /etc/log.d/scripts/services/bacula
854 %config(noreplace) /etc/bacula/bacula-dir.conf
855 %config(noreplace) /etc/bacula/bacula-fd.conf
856 %config(noreplace) /etc/bacula/bacula-sd.conf
857 %config(noreplace) /etc/bacula/bconsole.conf
858 %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
859 %config(noreplace) /etc/log.d/conf/services/bacula.conf
860 /etc/bacula/query.sql
861 %{sqlite_bindir}/libsqlite.a
862 %{sqlite_bindir}/sqlite.h
863 %dir %{working_dir}
864
865 /usr/sbin/bacula-dir
866 /usr/sbin/bacula-fd
867 /usr/sbin/bacula-sd
868 /usr/sbin/bcopy
869 /usr/sbin/bextract
870 /usr/sbin/bls
871 /usr/sbin/bscan
872 /usr/sbin/btape
873 /usr/sbin/btraceback
874 /usr/sbin/bconsole
875 /usr/sbin/dbcheck
876 /usr/sbin/loaderinfo
877 /usr/sbin/mtx
878 /usr/sbin/scsitape
879 /usr/sbin/bsmtp
880 /usr/sbin/tapeinfo
881 %{sqlite_bindir}/sqlite
882
883
884 %pre sqlite
885 # test for bacula database older than version 8
886 if [ -s %{working_dir}/bacula.db ] && [ -s %{sqlite_bindir}/sqlite ];then
887         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
888         if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then
889                 echo "This bacula upgrade will update a bacula database from version 8 to 9."
890                 echo "You appear to be running database version $DB_VER. You must first update"
891                 echo "your database to version 8 and then install this upgrade. The alternative"
892                 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
893                 echo "catalog information, then do the upgrade. Information on updating a"
894                 echo "database older than version 8 can be found in the release notes."
895                 exit 1
896         fi
897 fi
898 # check for and copy /etc/bacula/console.conf to bconsole.conf
899 if [ -s /etc/bacula/console.conf ];then
900         cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
901 fi
902
903 %post sqlite
904 # add our links
905 if [ "$1" -ge 1 ] ; then
906 /sbin/chkconfig --add bacula-dir
907 /sbin/chkconfig --add bacula-fd
908 /sbin/chkconfig --add bacula-sd
909 fi
910
911 # test for an existing database
912 if [ -s %{working_dir}/bacula.db ]; then
913         DB_VER=`echo "select * from Version;" | %{sqlite_bindir}/sqlite 2>/dev/null %{working_dir}/bacula.db | tail -n 1`
914         # check to see if we need to upgrade a 1.36 or lower database
915         if [ "$DB_VER" -lt "8" ]; then
916                 echo "This bacula upgrade requires a database update to version 9. You appear to"
917                 echo "be running database version $DB_VER. You must update your database using the"
918                 echo "upgrade scripts in the bacula-updatedb package. The alternative"
919                 echo "is to use /etc/bacula/drop_sqlite_tables to delete all your your current"
920                 echo "catalog information, then /etc/bacula/make_sqlite_tables. Information on updating a"
921                 echo "database older than version 8 can be found in the release notes."
922         fi      
923         
924         if [ "$DB_VER" -lt "9" ] && [ "$DB_VER" -ge "8" ]; then
925                 echo "This release requires an upgrade to your bacula database."
926                 echo "Backing up your current database..."
927                 echo ".dump" | %{sqlite_bindir}/sqlite %{working_dir}/bacula.db | bzip2 > %{working_dir}/bacula_backup.sql.bz2
928                 echo "Upgrading bacula database ..."
929                 /etc/bacula/update_sqlite_tables
930                 echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
931         fi
932 else
933         # create the database and tables
934         echo "Hmm, doesn't look like you have an existing database."
935         echo "Creating SQLite database..."
936         /etc/bacula/create_sqlite_database
937         echo "Creating the SQLite tables..."
938         /etc/bacula/make_sqlite_tables
939 fi
940
941 # create the daemon group
942 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
943 if [ -z $HAVE_BACULA ]; then
944         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
945         echo "The group %{daemon_group} has been added to %{group_file}."
946         echo "See the manual chapter Running Bacula for details."
947 fi
948
949 %preun sqlite
950 # delete our links
951 if [ $1 = 0 ]; then
952 /sbin/chkconfig --del bacula-dir
953 /sbin/chkconfig --del bacula-fd
954 /sbin/chkconfig --del bacula-sd
955 fi
956
957 %endif
958
959 %if %{postgresql}
960
961 %files postgresql
962 %defattr(-,root,root)
963
964 /etc/bacula/bacula
965 /etc/bacula/bconsole
966 /etc/bacula/create_postgresql_database
967 /etc/bacula/drop_postgresql_database
968 /etc/bacula/make_postgresql_tables
969 /etc/bacula/drop_postgresql_tables
970 /etc/bacula/update_postgresql_tables
971 /etc/bacula/grant_postgresql_privileges
972 /etc/bacula/create_bacula_database
973 /etc/bacula/drop_bacula_database
974 /etc/bacula/grant_bacula_privileges
975 /etc/bacula/make_bacula_tables
976 /etc/bacula/drop_bacula_tables
977 /etc/bacula/update_bacula_tables
978 /etc/bacula/make_catalog_backup
979 /etc/bacula/delete_catalog_backup
980 /etc/bacula/mtx-changer
981 /etc/bacula/btraceback.dbx
982 /etc/bacula/btraceback.gdb
983 #/etc/bacula/dvd-freespace
984 #/etc/bacula/dvd-writepart
985 /etc/bacula/dvd-handler
986 /etc/init.d/bacula-dir
987 /etc/init.d/bacula-fd
988 /etc/init.d/bacula-sd
989 /etc/bacula/rescue
990
991 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
992 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
993 /usr/man/man1/*
994
995 /etc/logrotate.d/bacula
996 /etc/log.d/scripts/services/bacula
997 %config(noreplace) /etc/bacula/bacula-dir.conf
998 %config(noreplace) /etc/bacula/bacula-fd.conf
999 %config(noreplace) /etc/bacula/bacula-sd.conf
1000 %config(noreplace) /etc/bacula/bconsole.conf
1001 %config(noreplace) /etc/log.d/conf/logfiles/bacula.conf
1002 %config(noreplace) /etc/log.d/conf/services/bacula.conf
1003 /etc/bacula/query.sql
1004 %dir %{working_dir}
1005
1006 /usr/sbin/bacula-dir
1007 /usr/sbin/bacula-fd
1008 /usr/sbin/bacula-sd
1009 /usr/sbin/bcopy
1010 /usr/sbin/bextract
1011 /usr/sbin/bls
1012 /usr/sbin/bscan
1013 /usr/sbin/btape
1014 /usr/sbin/btraceback
1015 /usr/sbin/bconsole
1016 /usr/sbin/dbcheck
1017 /usr/sbin/loaderinfo
1018 /usr/sbin/mtx
1019 /usr/sbin/scsitape
1020 /usr/sbin/bsmtp
1021 /usr/sbin/tapeinfo
1022
1023 %pre postgresql
1024 # test for bacula database older than version 8
1025 # note: this ASSUMES no password has been set for bacula database
1026 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1027
1028 if [ -n "$DB_VER" ] && [ "$DB_VER" -lt "8" ]; then
1029         echo "This bacula upgrade will update a bacula database from version 8 to 9."
1030         echo "You appear to be running database version $DB_VER. You must first update"
1031         echo "your database to version 8 and then install this upgrade. The alternative"
1032         echo "is to use /etc/bacula/drop_postgresql_tables to delete all your your current"
1033         echo "catalog information, then do the upgrade. Information on updating a"
1034         echo "database older than version 8 can be found in the release notes."
1035         exit 1
1036 fi
1037
1038 %post postgresql
1039 # add our links
1040 if [ "$1" -ge 1 ] ; then
1041 /sbin/chkconfig --add bacula-dir
1042 /sbin/chkconfig --add bacula-fd
1043 /sbin/chkconfig --add bacula-sd
1044 fi
1045
1046 # test for an existing database
1047 # note: this ASSUMES no password has been set for bacula database
1048 DB_VER=`echo 'select * from Version;' | psql bacula 2>/dev/null | tail -3 | head -1`
1049
1050 # grant privileges and create tables if they do not exist
1051 if [ -z "$DB_VER" ]; then
1052         echo "Hmm, doesn't look like you have an existing database."
1053         echo "Creating PostgreSQL bacula database..."
1054         /etc/bacula/create_postgresql_database
1055         echo "Creating bacula tables..."
1056         /etc/bacula/make_postgresql_tables
1057         echo "Granting privileges for PostgreSQL user bacula..."
1058         /etc/bacula/grant_postgresql_privileges
1059
1060 # check to see if we need to upgrade a 1.36 or lower database
1061 elif [ "$DB_VER" -lt "9" ]; then
1062         echo "This release requires an upgrade to your bacula database."
1063         echo "Backing up your current database..."
1064         pg_dump bacula | bzip2 > %{working_dir}/bacula_backup.sql.bz2
1065         echo "Upgrading bacula database ..."
1066         /etc/bacula/update_postgresql_tables
1067         echo "If bacula works correctly you can remove the backup file %{working_dir}/bacula_backup.sql.bz2"
1068         
1069 fi
1070
1071 # create the daemon group
1072 HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
1073 if [ -z $HAVE_BACULA ]; then
1074         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1075         echo "The group %{daemon_group} has been added to %{groupfile}."
1076         echo "See the manual chapter Running Bacula for details."
1077 fi
1078         
1079
1080 %preun postgresql
1081 # delete our links
1082 if [ $1 = 0 ]; then
1083 /sbin/chkconfig --del bacula-dir
1084 /sbin/chkconfig --del bacula-fd
1085 /sbin/chkconfig --del bacula-sd
1086 fi
1087
1088 %endif
1089
1090 %files client
1091 %defattr(-,root,root)
1092
1093 /etc/bacula/bconsole
1094 /etc/init.d/bacula-fd
1095 /etc/bacula/rescue
1096
1097 %doc COPYING ChangeLog ReleaseNotes VERIFYING kernstodo 
1098 %doc %{_docsrc}/manual/bacula.pdf %{_docsrc}/developers/developers.pdf %{_docsrc}/manual/bacula ../Release_Notes-%{version}-%{release}.txt
1099
1100 /etc/logrotate.d/bacula
1101
1102 %config(noreplace) /etc/bacula/bacula-fd.conf
1103 %config(noreplace) /etc/bacula/bconsole.conf
1104 %dir %{working_dir}
1105
1106 /usr/sbin/bacula-fd
1107 /usr/sbin/btraceback
1108 /etc/bacula/btraceback.gdb
1109 /etc/bacula/btraceback.dbx
1110 /usr/sbin/bsmtp
1111 /usr/sbin/bconsole
1112
1113
1114 %post client
1115 # add our link
1116 if [ "$1" -ge 1 ] ; then
1117 /sbin/chkconfig --add bacula-fd
1118 fi
1119
1120 # create the daemon group
1121 HAVE_BACULA=`cat %{group_file} | grep %{daemon_group} 2>/dev/null`
1122 if [ -z $HAVE_BACULA ]; then
1123         %{groupadd} -r %{daemon_group} > /dev/null 2>&1
1124         echo "The group %{daemon_group} has been added to %{group_file}."
1125         echo "See the manual chapter Running Bacula for details."
1126 fi
1127
1128 %preun client
1129 # delete our link
1130 if [ $1 = 0 ]; then
1131 /sbin/chkconfig --del bacula-fd
1132 fi
1133
1134 %files updatedb
1135 %defattr(-,root,root)
1136 /etc/bacula/updatedb/*
1137
1138 %post updatedb
1139 echo "The database update scripts were installed to /etc/bacula/updatedb"
1140
1141 %files gconsole
1142 %defattr(-,root,root)
1143 /usr/sbin/gnome-console
1144 /etc/bacula/gconsole
1145 %config(noreplace) /etc/bacula/gnome-console.conf
1146 /usr/share/pixmaps/bacula.png
1147
1148 %if %{rh7}
1149 /usr/share/gnome/apps/System/bacula.desktop
1150 %else
1151 /usr/share/applications/bacula.desktop
1152 %endif
1153
1154 %if ! %{rh7} && ! %{rh8}
1155 /usr/sbin/bacula-tray-monitor
1156 %config(noreplace) /etc/bacula/tray-monitor.conf
1157 /usr/share/pixmaps/bacula-tray-monitor.xpm
1158 /usr/share/applications/bacula-tray-monitor.desktop
1159 %endif
1160
1161 %if ! %{su9} 
1162 # add the console helper files
1163 %config(noreplace,missingok) /etc/pam.d/gnome-console
1164 %config(noreplace,missingok) /etc/security/console.apps/gnome-console
1165 /usr/bin/gnome-console
1166 %endif
1167
1168
1169 %changelog
1170 * Sun Nov 13 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1171 - minor edit to _dist for SLES9 compatibility
1172 * Sat Nov 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1173 - 1.38.0 release
1174 - kern changed location of pdf files and html manual in docs package
1175 * Sun Oct 30 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1176 - 1.38.0 release
1177 - add docs (from prebuilt tarball) and rescue packages back in
1178 - remove dvd-freespace and dvd-writepart files, add dvd-handler
1179 - remove 3 of 4 sqlite script patches as not needed
1180 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1181 - changes for 1.38
1182 - remove docs and rescue sections (remove static fd)
1183 - add dvd-freespace and dvd-writepart files
1184 - update depkgs to 22Jun05
1185 - change database update to 8 to 9
1186 * Sun Jul 24 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1187 - minor cleanups before 1.38 changes
1188 - add popt and popt-devel build dependencies
1189 - add tetex and tetex-dvips dependencies for doc build
1190 - replace deprecated Copyright tag with License
1191 * Sat May 07 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1192 - move sqlite installation bindir to /usr/lib/bacula/sqlite and remove
1193 - conflict with sqlite packages. remove readline dependency.
1194 * Sun Apr 17 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1195 - release 1.36.3 update docs
1196 * Tue Apr 05 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1197 - add centos4 build tag
1198 - add x86_64 build tag
1199 * Sun Apr 03 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1200 - add rhel4 build tag
1201 - clean up for mysql4 which is now mdk-10.1, suse-9.2 and rhel4
1202 * Sun Mar 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1203 - add rhel3 build tag
1204 * Tue Mar 01 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1205 - fix tray-monitor.conf for noreplace
1206 * Mon Feb 28 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1207 - fix distribution check for Fedora and Whitebox
1208 * Sun Feb 06 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1209 - add logwatch script
1210 - add dvd scripts
1211 * Sat Jan 15 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1212 - add build for Fedora Core 3 (linc now included in ORDit2)
1213 - add mysql4 define for Mandrake 10.1
1214 * Fri Jan 14 2005 D. Scott Barninger <barninger@fairfieldcomputers.com>
1215 - fix {group_file} variable in post scripts
1216 * Thu Dec 30 2004 D. Scott Barninger <barninger@fairfieldcomputers.com>
1217 - add distribution checking and custom Distribution tag
1218 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1219 - ASSIGNMENT OF COPYRIGHT
1220 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and 
1221 - assigns unto Kern Sibbald, his successors, assigns and personal representatives, 
1222 - all right, title and interest in and to the copyright in this software RPM
1223 - spec file. D. Scott Barninger warrants good title to said copyright, that it is 
1224 - free of all liens, encumbrances or any known claims against said copyright.
1225 * Sat Dec 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1226 - bug 183 fixes
1227 - thanks to Daniel Widyono
1228 - update description for rescue package to describe cdrom creation
1229 * Thu Nov 18 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1230 - update depkgs to 29Oct04
1231 * Fri Nov 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1232 - add cdrom rescue to bacula-rescue package
1233 * Sun Oct 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1234 - misc fixes from 1.36.0 suse feedback
1235 - fix situation where sqlite database exists but sqlite has been removed.
1236 * Fri Oct 22 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1237 - remove tray-monitor from RH8 build
1238 - fix permissions on tray-monitor files
1239 * Wed Oct 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1240 - add Mandrake support and tray-monitor, misc changes for 1.35.8/1.36.0,
1241 - change database update to 7 to 8 upgrade,
1242 - revert depkgs to 08Mar04 as there seems to be a bug in the sqlite
1243 - build in 30Jul04, add freetype dependancy to gnome package.
1244 * Sun Sep 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1245 - add documentation to console for groupadd
1246 * Sat Sep 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1247 - add support for running daemons as root.bacula
1248 - correct for change in location of floppy rescue files in 1.35.2
1249 - removed /etc/bacula/fd script from all packages as it has disappeared from 1.35.2
1250 - updated depgkgs to 30Jul04
1251 * Thu Jun 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1252 - really, really fix symlink creation for gconsole
1253 * Thu Jun 17 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1254 - fix symlink creation in gconsole post install
1255 * Sat Jun 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1256 - fixed error in gconsole post script
1257 * Fri Apr 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1258 - add check for gconsole symlink before trying to create it
1259 * Sun Apr 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1260 - fix some minor permissions issues on doc files that CVS won't let us fix
1261 * Sun Apr 04 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1262 - add pkgconfig to BuildRequires
1263 - clean up gnome1/2 menu entries for appropriate packages
1264 * Fri Apr 02 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1265 - tightened up doc distribution
1266 * Tue Mar 30 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1267 - added usermode (Redhat) and xsu (SuSE) support for gnome-console;
1268 - rpm's horrible bug that prevents nested conditional macros prevents me
1269 - from implementing these 2 separate approaches within the conditionals which
1270 - create the separate server packages.
1271 - the solution adopted is to remove the gnome-console files from the server packages
1272 - so bacula-gconsole is now an add on for both client and server packages.
1273 - this also now allows the server packages to be install on machines without
1274 - an X-server and we can still maintain a single spec file.
1275 - added tests to make sure we have defined platform and database macros.
1276 * Sat Mar 13 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1277 - corrected mysql prerequisites for suse
1278 * Mon Mar 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1279 - replaced all cp commands with cp -p
1280 - removed addition of a+x permissions on gnome-console
1281 - corrected permissions on init scripts
1282 * Sat Feb 28 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1283 - corrected creation of sqlite_bindir in install from !mysql to sqlite
1284 -
1285 - various cleanup patches from Michael K. Johnson:
1286 - corrected post install routines for nicer chkconfig
1287 - removed chmod changes in post routines and moved to install section
1288 - removed interactive nature of post routine for rescue package
1289 - added description of building rescue disks to the description of rescue package
1290 - added clean of build root to beginning of install
1291 - removed specifying attr in all file lists
1292 * Fri Feb 20 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1293 - added bconsole to client package
1294 - added gconsole package as add-on to client
1295 - removed spurious dependancies on updatedb package (!cut/paste)
1296 * Thu Feb 19 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1297 - added updatedb package
1298 * Thu Feb 12 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1299 - added postgresql package
1300 * Wed Feb 11 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1301 - corrected the if else logic in the dependancy sections
1302 - changes for 1.34 release
1303 - /etc/bacula/console is now /etc/bacula/bconsole
1304 - /etc/bacula/console.conf is now /etc/bacula/bconsole.conf
1305 - /usr/sbin/btraceback.gdb is now /etc/bacula/btraceback.gdb
1306 - /usr/sbin/smtp is now /usr/sbin/bsmtp
1307 - added new /etc/bacula/drop_mysql_database
1308 - added new /etc/bacula/drop_sqlite_database
1309 - added new /etc/bacula/grant_sqlite_privileges
1310 - added new generic bacula database scripts in /etc/bacula
1311 - added pre-install sections to check for database versions older than 6
1312 - added check for /etc/bacula/console.conf and copy to bconsole.conf
1313 * Sun Feb 08 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1314 - added /etc/bacula/update_sqlite_tables and /etc/bacula/update_mysql_tables for 1.34 release
1315 - added testing for existing databases before executing any of the database creation scripts
1316 - added defines working_dir and sqlite_bindir in place of hard coded paths
1317 * Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1318 - added build configuration for SuSE.
1319 - Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
1320 * Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1321 - added patch for create_sqlite_database to fix the installed bindir
1322 - added execute of create_sqlite_database to post of sqlite package
1323 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1324 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
1325 - added bacula-fd as Requires for rescue package
1326 - added build tag for Fedora Core 1
1327 - cleaned up dependancies for all builds
1328 * Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
1329 - removed rh_version from package names
1330 - added platform build configuration section to beginning of file
1331 * Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1332 - removed make_static_bacula script from rescue package install
1333 * Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1334 - Added define at top of file for depkgs version
1335 - Added rescue sub-package
1336 - Moved requires statements into proper sub-package locations
1337 * Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1338 - Corrected Requires for Gnome 1.4/2.0 builds
1339 * Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1340 - Added separate source declaration for depkgs
1341 - added patch for make_catalog_backup script
1342 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1343 - Misc changes to mysql/sqlite build and rh7/8 menu differences
1344 - Added rh_version to sub-package names
1345 - Added installed but missing file /etc/bacula/gconsole
1346 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
1347 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
1348 - Update spec for version 1.31 and combine client
1349 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
1350 - Initial spec file