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 # set destination directories
26 %define cgidir /var/www/cgi-bin
27 %define docdir /var/www/html
28 %define sysconfdir /etc/bacula
30 %define cgidir /srv/www/cgi-bin
31 %define docdir /srv/www/htdocs
34 # set ownership of files
37 %define dataowner apache
38 %define datagroup apache
40 %define dataowner wwwrun
44 Summary: Bacula - The Network Backup Solution
48 Group: System Environment/Daemons
50 Source0: %{web}-%{version}.tar.gz
51 Source1: %{bimagemgr}-%{version}.tar.gz
52 Source2: bacula-docs-%{version}.tar.gz
53 BuildRoot: %{_tmppath}/%{name}-root
54 URL: http://www.bacula.org/
55 BuildArchitectures: noarch
56 Vendor: The Bacula Team
57 Distribution: The Bacula Team
58 Packager: D. Scott Barninger <barninger at fairfieldcomputers dot com>
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. bacula-gui is a
64 set of web server based tools used to manage backups.
67 Summary: Bacula - The Network Backup Solution
68 Group: System Environment/Daemons
70 Requires: perl, perl-DBI, bacula-server, cdrecord, mkisofs
77 Obsoletes: bacula-bimagemgr
79 %description bimagemgr
80 Bacula is a set of computer programs that permit you (or the system
81 administrator) to manage backup, recovery, and verification of computer
82 data across a network of computers of different kinds. bimagemgr is a
83 utility to manage backups made to files intended for burning to CDR
84 disk. bimagemgr allows you to easily see which Volumes have been written
85 to more recently than they have been recorded to CDR disk and record those
89 Summary: Bacula - The Network Backup Solution
90 Group: System Environment/Daemons
92 Requires: php >= 4, bacula-server
100 Bacula is a set of computer programs that permit you (or the system
101 administrator) to manage backup, recovery, and verification of computer
102 data across a network of computers of different kinds. bacula-web is a
103 web server based utility to monitor your bacula server.
107 # unpack both sources inside a directory with package name and version
108 %setup -c %{name} -D -b 1
109 %setup -c %{name} -T -D -b 2
115 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
118 mkdir -p $RPM_BUILD_ROOT%{cgidir}
119 mkdir -p $RPM_BUILD_ROOT%{docdir}/%{web}
120 mkdir -p $RPM_BUILD_ROOT%{sysconfdir}
122 # install bimagemgr files
123 cp -p %{bimagemgr}-%{version}/bimagemgr.pl $RPM_BUILD_ROOT%{cgidir}/
124 cp -p %{bimagemgr}-%{version}/config.pm $RPM_BUILD_ROOT%{cgidir}/
125 cp -p %{bimagemgr}-%{version}/create_cdimage_table.pl $RPM_BUILD_ROOT%{sysconfdir}/
126 cp -p %{bimagemgr}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
127 cp -p %{bimagemgr}-%{version}/bimagemgr.gif $RPM_BUILD_ROOT%{docdir}/
128 cp -p %{bimagemgr}-%{version}/cdrom_spins.gif $RPM_BUILD_ROOT%{docdir}/
129 cp -p %{bimagemgr}-%{version}/clearpixel.gif $RPM_BUILD_ROOT%{docdir}/
130 cp -p %{bimagemgr}-%{version}/temp.html $RPM_BUILD_ROOT%{docdir}/
132 chmod 755 $RPM_BUILD_ROOT%{cgidir}/bimagemgr.pl
133 chmod 750 $RPM_BUILD_ROOT%{cgidir}/config.pm
134 chmod 750 $RPM_BUILD_ROOT%{sysconfdir}/create_cdimage_table.pl
135 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
136 chmod 644 $RPM_BUILD_ROOT%{docdir}/*.gif
137 chmod 664 $RPM_BUILD_ROOT%{docdir}/temp.html
139 # install bacula-web files
140 cp -p %{web}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
141 cp -r -p %{web}-%{version}/* $RPM_BUILD_ROOT%{docdir}/%{web}/
143 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
145 # remove the standard doc files from the install directory
146 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/ChangeLog
147 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/CONTACT
148 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/COPYING
149 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/README
150 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/TODO
153 mkdir -p docs/%{bimagemgr}
156 cp -p %{bimagemgr}-%{version}/README docs/%{bimagemgr}/
157 cp -p %{bimagemgr}-%{version}/COPYING docs/%{bimagemgr}/
158 cp -p %{bimagemgr}-%{version}/ChangeLog docs/%{bimagemgr}/
159 cp -p %{bimagemgr}-%{version}/ReleaseNotes docs/%{bimagemgr}/
161 cp -p %{web}-%{version}/README docs/%{web}/
162 cp -p %{web}-%{version}/ChangeLog docs/%{web}/
163 cp -p %{web}-%{version}/CONTACT docs/%{web}/
164 cp -p %{web}-%{version}/COPYING docs/%{web}/
165 cp -p bacula-docs-%{version}/%{web}/%{web}.pdf docs/%{web}/
168 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
172 %defattr(-,root,root)
173 %doc docs/%{bimagemgr}/*
175 %defattr(-,%{binowner},%{bingroup})
176 %{cgidir}/bimagemgr.pl
177 %{sysconfdir}/create_cdimage_table.pl
178 %{sysconfdir}/README.bimagemgr
179 %{docdir}/bimagemgr.gif
180 %{docdir}/cdrom_spins.gif
181 %{docdir}/clearpixel.gif
183 %defattr(-,%{dataowner},%{datagroup})
185 $config(noreplace) %{cgidir}/config.pm
188 %defattr(-,root,root)
191 %defattr(-,%{binowner},%{bingroup})
192 %{sysconfdir}/README.bacula-web
194 %defattr(-,%{dataowner},%{datagroup})
195 %{docdir}/%{web}/*.php
196 %{docdir}/%{web}/*.po
197 %{docdir}/%{web}/*.inc
198 %config(noreplace) %{docdir}/%{web}/configs
199 %{docdir}/%{web}/external_packages
200 %{docdir}/%{web}/images
202 %{docdir}/%{web}/locale
203 %{docdir}/%{web}/templates
204 %{docdir}/%{web}/templates_c
207 * Sun May 07 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
208 - refine files section for web
210 - add config.pm for bimagemgr
211 * Sat May 06 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
212 - was bimagemgr spec convert to bacula-gui spec. include bacula-web
213 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
214 - ASSIGNMENT OF COPYRIGHT
215 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
216 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
217 - all right, title and interest in and to the copyright in this software RPM
218 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
219 - free of all liens, encumbrances or any known claims against said copyright.
220 * Sun Nov 14 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>