2 %define depkgs ../depkgs
5 # Good base, but needs to be updated for Mandrake
7 # You must build the package with at least one define
8 # e.g. rpmbuild -ba bacula.spec
10 # If you want the MySQL version, use:
11 # rpmbuild -ba --define "build_mysql 1" bacula.spec
13 # If you want the MySQL version and static builds, use:
14 # rpmbuild -ba --define "build_mysql 1" --define "build_static 1" bacula.spec
15 # If you want the MySQL version and static builds + come console , use:
16 # rpmbuild -ba --define "build_mysql 1" --define "build_static 1" --define "build_gnome 1" bacula.spec
21 %{?build_mysql:%define mysql 1}
22 %{?build_static:%define static 1}
23 %{?build_gnome:%define gnome 1}
27 Summary: Bacula - The Network Backup Solution
31 Group: System Environment/Daemons
33 Source: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
34 BuildRoot: %{_tmppath}/%{name}-root
35 URL: http://www.bacula.org/
36 Vendor: The Bacula Team
37 Distribution: The Bacula Team
38 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
39 Requires: gnome-libs >= 1.4
41 BuildRequires: readline-devel
43 Requires: gnome-libs >= 1.4
44 BuildRequires: gnome-libs-devel >= 1.4
48 Requires: mysql >= 3.23
49 Requires: mysql-server >= 3.23
50 BuildRequires: mysql-devel >= 3.23
55 Bacula - It comes by night and sucks the vital essence from your computers.
57 Bacula is a set of computer programs that permit you (or the system
58 administrator) to manage backup, recovery, and verification of computer
59 data across a network of computers of different kinds. In technical terms,
60 it is a network client/server based backup program. Bacula is relatively
61 easy to use and efficient, while offering many advanced storage management
62 features that make it easy to find and recover lost or damaged files.
63 Bacula source code has been released under the GPL version 2 license.
71 Summary: Bacula - The Network Backup Solution
72 Group: System Environment/Daemons
80 Bacula - It comes by night and sucks the vital essence from your computers.
82 Bacula is a set of computer programs that permit you (or the system
83 administrator) to manage backup, recovery, and verification of computer
84 data across a network of computers of different kinds. In technical terms,
85 it is a network client/server based backup program. Bacula is relatively
86 easy to use and efficient, while offering many advanced storage management
87 features that make it easy to find and recover lost or damaged files.
88 Bacula source code has been released under the GPL version 2 license.
91 This build requires MySQL to be installed separately as the catalog database.
93 This build incorporates sqlite as the catalog database, statically compiled.
97 Summary: Bacula - The Network Backup Solution
98 Group: System Environment/Daemons
100 Bacula - It comes by night and sucks the vital essence from your computers.
102 Bacula is a set of computer programs that permit you (or the system
103 administrator) to manage backup, recovery, and verification of computer
104 data across a network of computers of different kinds. In technical terms,
105 it is a network client/server based backup program. Bacula is relatively
106 easy to use and efficient, while offering many advanced storage management
107 features that make it easy to find and recover lost or damaged files.
108 Bacula source code has been released under the GPL version 2 license.
110 This is the File daemon (Client) only package.
127 # patch the make_sqlite_tables script for installation bindir
128 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
132 --sbindir=/usr/sbin \
133 --sysconfdir=/etc/bacula \
134 --with-scriptdir=/etc/bacula \
135 --enable-smartalloc \
142 --enable-static-dir \
143 --enable-static-tools \
144 --enable-static-cons \
149 --with-sqlite=${cwd}/../depkgs/sqlite \
151 --with-working-dir=/var/bacula \
152 --with-pid-dir=/var/run \
153 --with-subsys-dir=/var/lock/subsys
159 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
160 mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
161 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
162 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
163 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
166 mkdir -p $RPM_BUILD_ROOT/usr/lib/sqlite
170 prefix=$RPM_BUILD_ROOT/usr \
171 sbindir=$RPM_BUILD_ROOT/usr/sbin \
172 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
173 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
174 working_dir=$RPM_BUILD_ROOT/var/bacula \
179 prefix=$RPM_BUILD_ROOT/usr \
180 sbindir=$RPM_BUILD_ROOT/usr/sbin \
181 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
182 working_dir=$RPM_BUILD_ROOT/var/bacula \
183 mandir=$RPM_BUILD_ROOT/usr/man \
188 # fixme - make installs the mysql scripts for sqlite build
189 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
190 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
191 rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
194 # install the init scripts
195 cp platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
196 cp platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
197 cp platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
199 # install the menu stuff
200 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
201 cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
202 cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
206 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite
207 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite.h
208 cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT/usr/lib/sqlite/libsqlite.a
211 # install the logrotate file
212 cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
215 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
220 %defattr(-,root,root)
222 %attr(0754,root,root) /etc/bacula/bacula
223 %attr(0754,root,root) /etc/bacula/console
224 %attr(0754,root,root) /etc/bacula/fd
225 %attr(0754,root,root) /etc/bacula/gconsole
226 %attr(0754,root,root) /etc/bacula/create_mysql_database
227 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
228 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
229 %attr(0754,root,root) /etc/bacula/drop_mysql_tables
230 %attr(0754,root,root) /etc/bacula/make_bacula_tables
231 %attr(0754,root,root) /etc/bacula/make_catalog_backup
232 %attr(0754,root,root) /etc/bacula/make_mysql_tables
233 %attr(0754,root,root) /etc/bacula/grant_mysql_privileges
234 %attr(0754,root,root) /etc/bacula/startmysql
235 %attr(0754,root,root) /etc/bacula/stopmysql
236 %attr(0754,root,root) /etc/bacula/mtx-changer
237 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
238 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
239 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
241 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
242 %attr(0644,root,root) /usr/man/man1/*
243 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
244 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
245 %attr(0644,root,root) /usr/share/applications/bacula.desktop
246 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
247 %attr(0644,root,root) /etc/logrotate.d/bacula
249 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
250 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
251 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
252 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
253 %attr(0640,root,root) /etc/bacula/query.sql
254 %attr(0640,root,root) %dir /var/bacula
256 %attr(0750,root,root) /usr/sbin/*
259 # delete then add our links
260 /sbin/chkconfig --del bacula-dir
261 /sbin/chkconfig --del bacula-fd
262 /sbin/chkconfig --del bacula-sd
263 /sbin/chkconfig --add bacula-dir
264 /sbin/chkconfig --add bacula-fd
265 /sbin/chkconfig --add bacula-sd
267 # add execute permissions for console
268 chmod 0755 /usr/sbin/gnome-console
270 # grant privileges and create tables
271 # this will error out harmlessly if tables already exist
272 echo "Granting privileges for MySQL user bacula..."
273 /etc/bacula/grant_mysql_privileges
274 echo "Creating MySQL bacula database..."
275 /etc/bacula/create_mysql_database
276 echo "Creating bacula tables..."
277 /etc/bacula/make_mysql_tables
281 /sbin/chkconfig --del bacula-dir
282 /sbin/chkconfig --del bacula-fd
283 /sbin/chkconfig --del bacula-sd
288 %defattr(-,root,root)
290 %attr(0754,root,root) /etc/bacula/bacula
291 %attr(0754,root,root) /etc/bacula/console
292 %attr(0754,root,root) /etc/bacula/fd
293 %attr(0754,root,root) /etc/bacula/gconsole
294 %attr(0754,root,root) /etc/bacula/create_sqlite_database
295 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
296 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
297 %attr(0754,root,root) /etc/bacula/drop_sqlite_tables
298 %attr(0754,root,root) /etc/bacula/make_bacula_tables
299 %attr(0754,root,root) /etc/bacula/make_catalog_backup
300 %attr(0754,root,root) /etc/bacula/make_sqlite_tables
301 %attr(0754,root,root) /etc/bacula/mtx-changer
302 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
303 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
304 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
306 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
307 %attr(0644,root,root) /usr/man/man1/*
308 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
309 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
310 %attr(0644,root,root) /usr/share/applications/bacula.desktop
311 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
312 %attr(0644,root,root) /etc/logrotate.d/bacula
314 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
315 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
316 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
317 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
318 %attr(0640,root,root) /etc/bacula/query.sql
319 %attr(0640,root,root) /usr/lib/sqlite/libsqlite.a
320 %attr(0640,root,root) /usr/lib/sqlite/sqlite.h
321 %attr(0640,root,root) %dir /var/bacula
323 %attr(0750,root,root) /usr/sbin/*
324 %attr(0750,root,root) /usr/lib/sqlite/sqlite
327 # delete then add our links
328 /sbin/chkconfig --del bacula-dir
329 /sbin/chkconfig --del bacula-fd
330 /sbin/chkconfig --del bacula-sd
331 /sbin/chkconfig --add bacula-dir
332 /sbin/chkconfig --add bacula-fd
333 /sbin/chkconfig --add bacula-sd
335 # add execute permission for console
336 chmod 0755 /usr/sbin/gnome-console
339 /etc/bacula/make_sqlite_tables
343 /sbin/chkconfig --del bacula-dir
344 /sbin/chkconfig --del bacula-fd
345 /sbin/chkconfig --del bacula-sd
350 %defattr(-,root,root)
352 %attr(0754,root,root) /etc/bacula/fd
353 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
355 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
356 %attr(0644,root,root) /etc/logrotate.d/bacula
358 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
359 %attr(0640,root,root) %dir /var/bacula
361 %attr(0750,root,root) /usr/sbin/bacula-fd
362 %attr(0750,root,root) /usr/sbin/btraceback
363 %attr(0750,root,root) /usr/sbin/btraceback.gdb
364 %attr(0750,root,root) /usr/sbin/smtp
368 # delete then add our links
369 /sbin/chkconfig --del bacula-fd
370 /sbin/chkconfig --add bacula-fd
374 /sbin/chkconfig --del bacula-fd
377 * Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
378 - Misc changes to mysql/sqlite build and rh7/8 menu differences
379 - Added rh_version to sub-package names
380 - Added installed but missing file /etc/bacula/gconsole
381 - rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
382 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
383 - Update spec for version 1.31 and combine client
384 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>