1 # Bacula Web GUI RPM spec file
2 # Copyright (C) 2004-2006 Kern Sibbald
7 %{?build_rhel:%define rhel 1}
10 %{?build_suse:%define suse 1}
13 %{?build_mdk:%define mdk 1}
15 # test for a platform definition
16 %if ! %{rhel} && ! %{suse} && ! %{mdk}
17 %{error: You must specify a platform. Please examine the spec file.}
21 # source package names
22 %define web bacula-web
23 %define bimagemgr bimagemgr
25 %define brestore brestore
27 # set destination directories
28 %define cgidir /var/www/cgi-bin
29 %define docdir /var/www/html
30 %define sysconfdir /etc/bacula
32 %define cgidir /srv/www/cgi-bin
33 %define docdir /srv/www/htdocs
36 # set ownership of files
39 %define dataowner apache
40 %define datagroup apache
42 %define dataowner wwwrun
46 %define groupmod /usr/sbin/groupmod
48 Summary: Bacula - The Network Backup Solution
52 Group: System Environment/Daemons
54 Source0: %{web}-%{version}.tar.gz
55 Source1: %{bimagemgr}-%{version}.tar.gz
56 Source2: bacula-docs-%{version}.tar.gz
57 Source3: %{bweb}-%{version}.tar.gz
58 Source4: %{brestore}-%{version}.tar.gz
59 BuildRoot: %{_tmppath}/%{name}-root
60 URL: http://www.bacula.org/
61 BuildArchitectures: noarch
62 Vendor: The Bacula Team
63 Distribution: The Bacula Team
64 Packager: D. Scott Barninger <barninger at fairfieldcomputers dot com>
67 Bacula is a set of computer programs that permit you (or the system
68 administrator) to manage backup, recovery, and verification of computer
69 data across a network of computers of different kinds. bacula-gui is a
70 set of web server based tools used to manage backups.
73 Summary: Bacula - The Network Backup Solution
74 Group: System Environment/Daemons
76 Requires: perl, perl-DBI, bacula-server, cdrecord, mkisofs
83 Obsoletes: bacula-bimagemgr
85 %description bimagemgr
86 Bacula is a set of computer programs that permit you (or the system
87 administrator) to manage backup, recovery, and verification of computer
88 data across a network of computers of different kinds. bimagemgr is a
89 utility to manage backups made to files intended for burning to CDR
90 disk. bimagemgr allows you to easily see which Volumes have been written
91 to more recently than they have been recorded to CDR disk and record those
95 Summary: Bacula - The Network Backup Solution
96 Group: System Environment/Daemons
98 Requires: php >= 4, bacula-server
106 Bacula is a set of computer programs that permit you (or the system
107 administrator) to manage backup, recovery, and verification of computer
108 data across a network of computers of different kinds. bacula-web is a
109 web server based utility to monitor your bacula server.
112 Summary: Bacula - The Network Backup Solution
113 Group: System Environment/Daemons
115 Requires: perl, perl-DBI, perl-DBD-mysql, perl-DBD-Pg, perl-GDGraph
116 Requires: perl-HTML-Template, perl-Time-modules
119 Requires: perl-CGI-Application
125 Bacula is a set of computer programs that permit you (or the system
126 administrator) to manage backup, recovery, and verification of computer
127 data across a network of computers of different kinds. libbweb is a set
128 of perl modules required by bacula-gui-bweb and bacula-gui-brestore utilities.
131 Summary: Bacula - The Network Backup Solution
132 Group: System Environment/Daemons
134 Requires: perl, perl-DBI, perl-DBD-mysql, perl-DBD-Pg, perl-Expect
135 Requires: perl-Gtk2-GladeXML, bacula-gui-libbweb = %{version}
137 %description brestore
138 Bacula is a set of computer programs that permit you (or the system
139 administrator) to manage backup, recovery, and verification of computer
140 data across a network of computers of different kinds. brestore is a file
141 restoration interface.
144 Summary: Bacula - The Network Backup Solution
145 Group: System Environment/Daemons
147 Requires: perl, perl-DBI, perl-DBD-mysql, perl-DBD-Pg, perl-GDGraph
148 Requires: perl-HTML-Template, perl-Time-modules, bacula-gui-libbweb
149 Requires: bacula-server
152 Requires: perl-CGI-Application
158 Bacula is a set of computer programs that permit you (or the system
159 administrator) to manage backup, recovery, and verification of computer
160 data across a network of computers of different kinds. bweb is a web based
161 interface for a bacula server.
165 # unpack both sources inside a directory with package name and version
166 %setup -c %{name} -D -b 1
167 %setup -c %{name} -T -D -b 2
168 %setup -c %{name} -T -D -b 3
169 %setup -c %{name} -T -D -b 4
175 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
178 mkdir -p $RPM_BUILD_ROOT%{cgidir}
179 mkdir -p $RPM_BUILD_ROOT%{docdir}/%{web}
180 mkdir -p $RPM_BUILD_ROOT%{sysconfdir}
181 mkdir -p $RPM_BUILD_ROOT%{perl_sitearch}
182 mkdir -p $RPM_BUILD_ROOT/usr/bin
183 mkdir -p $RPM_BUILD_ROOT/usr/share/brestore
185 mkdir -p $RPM_BUILD_ROOT%{cgidir}/bweb
186 chmod 755 $RPM_BUILD_ROOT%{cgidir}/bweb
187 mkdir -p $RPM_BUILD_ROOT/etc/bweb
188 chmod 750 $RPM_BUILD_ROOT/etc/bweb
189 mkdir -p $RPM_BUILD_ROOT/usr/share/bweb/tpl
190 mkdir -p $RPM_BUILD_ROOT%{docdir}/%{bweb}
192 # install bimagemgr files
193 cp -p %{bimagemgr}-%{version}/bimagemgr.pl $RPM_BUILD_ROOT%{cgidir}/
194 cp -p %{bimagemgr}-%{version}/config.pm $RPM_BUILD_ROOT%{cgidir}/
195 cp -p %{bimagemgr}-%{version}/create_cdimage_table.pl $RPM_BUILD_ROOT%{sysconfdir}/
196 cp -p %{bimagemgr}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
197 cp -p %{bimagemgr}-%{version}/bimagemgr.gif $RPM_BUILD_ROOT%{docdir}/
198 cp -p %{bimagemgr}-%{version}/cdrom_spins.gif $RPM_BUILD_ROOT%{docdir}/
199 cp -p %{bimagemgr}-%{version}/clearpixel.gif $RPM_BUILD_ROOT%{docdir}/
200 cp -p %{bimagemgr}-%{version}/temp.html $RPM_BUILD_ROOT%{docdir}/
202 chmod 755 $RPM_BUILD_ROOT%{cgidir}/bimagemgr.pl
203 chmod 750 $RPM_BUILD_ROOT%{cgidir}/config.pm
204 chmod 750 $RPM_BUILD_ROOT%{sysconfdir}/create_cdimage_table.pl
205 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
206 chmod 644 $RPM_BUILD_ROOT%{docdir}/*.gif
207 chmod 664 $RPM_BUILD_ROOT%{docdir}/temp.html
209 # install bacula-web files
210 cp -p %{web}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
211 cp -r -p %{web}-%{version}/* $RPM_BUILD_ROOT%{docdir}/%{web}/
213 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
215 # install the libbweb files
216 cp -p %{bweb}-%{version}/lib/*.pm $RPM_BUILD_ROOT%{perl_sitearch}/
217 chmod 644 $RPM_BUILD_ROOT%{perl_site_arch}/*.pm
219 # install the brestore files
220 cp -p %{brestore}-%{version}/brestore.pl $RPM_BUILD_ROOT/usr/bin/
221 cp -p %{brestore}-%{version}/brestore.glade $RPM_BUILD_ROOT/usr/share/brestore/
222 chmod 755 $RPM_BUILD_ROOT/usr/bin/brestore.pl
223 chmod 644 $RPM_BUILD_ROOT/usr/share/brestore/brestore.glade
225 # install the bweb files
226 cp -p %{bweb}-%{version}/cgi/*.pl $RPM_BUILD_ROOT%{cgidir}/bweb/
227 chmod 755 $RPM_BUILD_ROOT%{cgidir}/bweb/*
228 echo "template_dir = /usr/share/bweb/tpl" > $RPM_BUILD_ROOT/etc/bweb/config
229 cp -p %{bweb}-%{version}/tpl/*.tpl $RPM_BUILD_ROOT/usr/share/bweb/tpl/
230 chmod 644 $RPM_BUILD_ROOT/usr/share/bweb/tpl/*
231 cp -p %{bweb}-%{version}/html/*.js $RPM_BUILD_ROOT%{docdir}/%{bweb}/
232 cp -p %{bweb}-%{version}/html/*.png $RPM_BUILD_ROOT%{docdir}/%{bweb}/
233 cp -p %{bweb}-%{version}/html/*.css $RPM_BUILD_ROOT%{docdir}/%{bweb}/
234 cp -p %{bweb}-%{version}/html/*.gif $RPM_BUILD_ROOT%{docdir}/%{bweb}/
235 chmod 644 $RPM_BUILD_ROOT%{docdir}/%{bweb}/*
238 # remove the standard doc files from the install directory
239 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/ChangeLog
240 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/CONTACT
241 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/COPYING
242 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/README
243 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/TODO
246 mkdir -p docs/%{bimagemgr}
249 cp -p %{bimagemgr}-%{version}/README docs/%{bimagemgr}/
250 cp -p %{bimagemgr}-%{version}/COPYING docs/%{bimagemgr}/
251 cp -p %{bimagemgr}-%{version}/ChangeLog docs/%{bimagemgr}/
252 cp -p %{bimagemgr}-%{version}/ReleaseNotes docs/%{bimagemgr}/
253 cp -p bacula-docs-%{version}/manual/%{bimagemgr}.pdf docs/%{bimagemgr}/
255 cp -p %{web}-%{version}/README docs/%{web}/
256 cp -p %{web}-%{version}/ChangeLog docs/%{web}/
257 cp -p %{web}-%{version}/CONTACT docs/%{web}/
258 cp -p %{web}-%{version}/COPYING docs/%{web}/
259 cp -p bacula-docs-%{version}/%{web}/%{web}.pdf docs/%{web}/
262 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
266 %defattr(-,root,root)
267 %doc docs/%{bimagemgr}/*
269 %defattr(-,%{binowner},%{bingroup})
270 %{cgidir}/bimagemgr.pl
271 %{sysconfdir}/create_cdimage_table.pl
272 %{sysconfdir}/README.bimagemgr
273 %{docdir}/bimagemgr.gif
274 %{docdir}/cdrom_spins.gif
275 %{docdir}/clearpixel.gif
277 %defattr(-,%{dataowner},%{datagroup})
279 %config(noreplace) %{cgidir}/config.pm
282 %defattr(-,root,root)
285 %defattr(-,%{binowner},%{bingroup})
286 %{sysconfdir}/README.bacula-web
288 %defattr(-,%{dataowner},%{datagroup})
289 %{docdir}/%{web}/*.php
290 %{docdir}/%{web}/*.po
291 %{docdir}/%{web}/*.inc
292 %config(noreplace) %{docdir}/%{web}/configs
293 %{docdir}/%{web}/external_packages
294 %{docdir}/%{web}/images
296 %{docdir}/%{web}/locale
297 %{docdir}/%{web}/templates
298 %{docdir}/%{web}/templates_c
301 %defattr(-,root,root)
302 %{perl_sitearch}/*.pm
305 %defattr(-,root,root)
307 /usr/share/brestore/brestore.glade
310 %defattr(-,%{binowner},%{bingroup})
312 /usr/share/bweb/tpl/*.tpl
315 %defattr(-,%{binowner},%{datagroup})
318 %defattr(-,%{dataowner},%{datagroup})
323 # add the web server user to group bacula
324 %{groupmod} -A %{dataowner} bacula
327 # remove the web server user to group bacula
328 %{groupmod} -R %{dataowner} bacula
331 * Sun Aug 20 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
332 - add libbweb, bweb and brestore packages
333 * Sun May 14 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
334 - add bimagemgr manual
335 * Sun May 07 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
336 - refine files section for web
338 - add config.pm for bimagemgr
339 - add post script bimagemgr to add web server user to group bacula
340 * Sat May 06 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
341 - was bimagemgr spec convert to bacula-gui spec. include bacula-web
342 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
343 - ASSIGNMENT OF COPYRIGHT
344 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
345 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
346 - all right, title and interest in and to the copyright in this software RPM
347 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
348 - free of all liens, encumbrances or any known claims against said copyright.
349 * Sun Nov 14 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>