2 %define depkgs ../depkgs
5 # You must build the package with at least one define
6 # e.g. rpmbuild -ba --define "build_rh7 1" bacula.spec
8 # If you want the MySQL version, use:
9 # rpmbuild -ba --define "mysql 1" --define "build_rh7 1" bacula.spec
13 %{?build_rh7:%define rh7 1}
16 %{?build_rh8:%define rh8 1}
19 %{?build_rh9:%define rh9 1}
22 %{?build_mysql:%define mysql 1}
26 %define rh_version rh7
29 %define rh_version rh8
32 %define rh_version rh9
35 Summary: Bacula - The Network Backup Solution
38 Release: %{rh_version}
39 Group: System Environment/Daemons
41 Source: http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
42 BuildRoot: %{_tmppath}/%{name}-root
43 URL: http://www.bacula.org/
44 Vendor: The Bacula Team
45 Distribution: The Bacula Team
46 Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
47 Requires: gnome-libs >= 1.4
49 BuildRequires: gnome-libs-devel >= 1.4
50 BuildRequires: readline-devel
52 Requires: mysql >= 3.23
53 Requires: mysql-server >= 2.23
54 BuildRequires: mysql-devel >= 3.23
59 Bacula - It comes by night and sucks the vital essence from your computers.
61 Bacula is a set of computer programs that permit you (or the system
62 administrator) to manage backup, recovery, and verification of computer
63 data across a network of computers of different kinds. In technical terms,
64 it is a network client/server based backup program. Bacula is relatively
65 easy to use and efficient, while offering many advanced storage management
66 features that make it easy to find and recover lost or damaged files.
67 Bacula source code has been released under the GPL version 2 license.
69 This build incorporates sqlite as the catalog database, statically compiled.
73 Summary: Bacula - The Network Backup Solution
74 Group: System Environment/Daemons
76 Bacula - It comes by night and sucks the vital essence from your computers.
78 Bacula is a set of computer programs that permit you (or the system
79 administrator) to manage backup, recovery, and verification of computer
80 data across a network of computers of different kinds. In technical terms,
81 it is a network client/server based backup program. Bacula is relatively
82 easy to use and efficient, while offering many advanced storage management
83 features that make it easy to find and recover lost or damaged files.
84 Bacula source code has been released under the GPL version 2 license.
87 This build requires MySQL to be installed separately as the catalog database.
89 This build incorporates sqlite as the catalog database, statically compiled.
93 Summary: Bacula - The Network Backup Solution
94 Group: System Environment/Daemons
96 Bacula - It comes by night and sucks the vital essence from your computers.
98 Bacula is a set of computer programs that permit you (or the system
99 administrator) to manage backup, recovery, and verification of computer
100 data across a network of computers of different kinds. In technical terms,
101 it is a network client/server based backup program. Bacula is relatively
102 easy to use and efficient, while offering many advanced storage management
103 features that make it easy to find and recover lost or damaged files.
104 Bacula source code has been released under the GPL version 2 license.
106 This is the File daemon (Client) only package.
121 # patch the make_sqlite_tables script for installation bindir
122 #patch src/cats/make_sqlite_tables.in make_sqlite_tables.in.patch
126 --sbindir=/usr/sbin \
127 --sysconfdir=/etc/bacula \
128 --with-scriptdir=/etc/bacula \
129 --enable-smartalloc \
134 --with-sqlite=${cwd}/../depkgs/sqlite \
136 --with-working-dir=/var/bacula \
137 --with-pid-dir=/var/run \
138 --with-subsys-dir=/var/lock/subsys
144 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
145 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
146 mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
148 mkdir -p $RPM_BUILD_ROOT/usr/lib/sqlite
152 prefix=$RPM_BUILD_ROOT/usr \
153 sbindir=$RPM_BUILD_ROOT/usr/sbin \
154 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
155 scriptdir=$RPM_BUILD_ROOT/etc/bacula \
156 working_dir=$RPM_BUILD_ROOT/var/bacula \
161 prefix=$RPM_BUILD_ROOT/usr \
162 sbindir=$RPM_BUILD_ROOT/usr/sbin \
163 sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
164 working_dir=$RPM_BUILD_ROOT/var/bacula \
165 mandir=$RPM_BUILD_ROOT/usr/man/man1 \
169 # fixme - make installs the mysql start/stop scripts for sqlite build
170 rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
171 rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
173 # install the init scripts
174 cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
175 cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
176 cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
178 cp src/cats/grant_mysql_privileges $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
181 # install the menu stuff
182 cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
183 cp scripts/bacula.desktop $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
186 cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite
187 cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite.h
188 cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT/usr/lib/sqlite/libsqlite.a
191 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
196 %defattr(-,root,root)
198 %attr(0754,root,root) /etc/bacula/bacula
199 %attr(0754,root,root) /etc/bacula/console
200 %attr(0754,root,root) /etc/bacula/fd
201 %attr(0754,root,root) /etc/bacula/create_mysql_database
202 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
203 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
204 %attr(0754,root,root) /etc/bacula/drop_mysql_tables
205 %attr(0754,root,root) /etc/bacula/make_bacula_tables
206 %attr(0754,root,root) /etc/bacula/make_catalog_backup
207 %attr(0754,root,root) /etc/bacula/make_mysql_tables
208 %attr(0754,root,root) /etc/bacula/grant_mysql_privileges
209 %attr(0754,root,root) /etc/bacula/startmysql
210 %attr(0754,root,root) /etc/bacula/stopmysql
211 %attr(0754,root,root) /etc/bacula/mtx-changer
212 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
213 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
214 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
216 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
217 %attr(0644,root,root) /usr/man/man1/*
218 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
219 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
220 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
222 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
223 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
224 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
225 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
226 %attr(0640,root,root) /etc/bacula/query.sql
227 %attr(0640,root,root) %dir /var/bacula
229 %attr(0750,root,root) /usr/sbin/*
232 # delete then add our links
233 /sbin/chkconfig --del bacula-dir
234 /sbin/chkconfig --del bacula-fd
235 /sbin/chkconfig --del bacula-sd
236 /sbin/chkconfig --add bacula-dir
237 /sbin/chkconfig --add bacula-fd
238 /sbin/chkconfig --add bacula-sd
240 # add execute permissions for console
241 chmod 0755 /usr/sbin/gnome-console
243 # grant privileges and create tables
244 echo "Granting privileges for MySQL user bacula..."
245 /etc/bacula/grant_mysql_privileges
246 echo "Creating MySQL bacula database..."
247 /etc/bacula/create_mysql_database
248 echo "Creating bacula tables..."
249 /etc/bacula/make_mysql_tables
253 /sbin/chkconfig --del bacula-dir
254 /sbin/chkconfig --del bacula-fd
255 /sbin/chkconfig --del bacula-sd
260 %defattr(-,root,root)
262 %attr(0754,root,root) /etc/bacula/bacula
263 %attr(0754,root,root) /etc/bacula/console
264 %attr(0754,root,root) /etc/bacula/fd
265 %attr(0754,root,root) /etc/bacula/create_sqlite_database
266 %attr(0754,root,root) /etc/bacula/delete_catalog_backup
267 %attr(0754,root,root) /etc/bacula/drop_bacula_tables
268 %attr(0754,root,root) /etc/bacula/drop_sqlite_tables
269 %attr(0754,root,root) /etc/bacula/make_bacula_tables
270 %attr(0754,root,root) /etc/bacula/make_catalog_backup
271 %attr(0754,root,root) /etc/bacula/make_sqlite_tables
272 %attr(0754,root,root) /etc/bacula/mtx-changer
273 %attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
274 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
275 %attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
277 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
278 %attr(0644,root,root) /usr/man/man1/*
279 %attr(0644,root,root) /usr/share/pixmaps/bacula.png
280 %attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
281 %attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
283 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
284 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
285 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
286 %attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
287 %attr(0640,root,root) /etc/bacula/query.sql
288 %attr(0640,root,root) /usr/lib/sqlite/libsqlite.a
289 %attr(0640,root,root) /usr/lib/sqlite/sqlite.h
290 %attr(0640,root,root) %dir /var/bacula
292 %attr(0750,root,root) /usr/sbin/*
293 %attr(0750,root,root) /usr/lib/sqlite/sqlite
296 # delete then add our links
297 /sbin/chkconfig --del bacula-dir
298 /sbin/chkconfig --del bacula-fd
299 /sbin/chkconfig --del bacula-sd
300 /sbin/chkconfig --add bacula-dir
301 /sbin/chkconfig --add bacula-fd
302 /sbin/chkconfig --add bacula-sd
304 # add execute permission for console
305 chmod 0755 /usr/sbin/gnome-console
308 /etc/bacula/make_sqlite_tables
312 /sbin/chkconfig --del bacula-dir
313 /sbin/chkconfig --del bacula-fd
314 /sbin/chkconfig --del bacula-sd
319 %defattr(-,root,root)
321 %attr(0754,root,root) /etc/bacula/fd
322 %attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
324 %attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
326 %attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
327 %attr(0640,root,root) %dir /var/bacula
329 %attr(0750,root,root) /usr/sbin/bacula-fd
330 %attr(0750,root,root) /usr/sbin/btraceback
331 %attr(0750,root,root) /usr/sbin/btraceback.gdb
332 %attr(0750,root,root) /usr/sbin/smtp
336 # delete then add our links
337 /sbin/chkconfig --del bacula-fd
338 /sbin/chkconfig --add bacula-fd
342 /sbin/chkconfig --del bacula-fd
345 * Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
346 - Update spec for version 1.31 and combine client
347 * Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>