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 %define groupmod /usr/sbin/groupmod
46 Summary: Bacula - The Network Backup Solution
50 Group: System Environment/Daemons
52 Source0: %{web}-%{version}.tar.gz
53 Source1: %{bimagemgr}-%{version}.tar.gz
54 Source2: bacula-docs-%{version}.tar.gz
55 BuildRoot: %{_tmppath}/%{name}-root
56 URL: http://www.bacula.org/
57 BuildArchitectures: noarch
58 Vendor: The Bacula Team
59 Distribution: The Bacula Team
60 Packager: D. Scott Barninger <barninger at fairfieldcomputers dot com>
63 Bacula is a set of computer programs that permit you (or the system
64 administrator) to manage backup, recovery, and verification of computer
65 data across a network of computers of different kinds. bacula-gui is a
66 set of web server based tools used to manage backups.
69 Summary: Bacula - The Network Backup Solution
70 Group: System Environment/Daemons
72 Requires: perl, perl-DBI, bacula-server, cdrecord, mkisofs
79 Obsoletes: bacula-bimagemgr
81 %description bimagemgr
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. bimagemgr is a
85 utility to manage backups made to files intended for burning to CDR
86 disk. bimagemgr allows you to easily see which Volumes have been written
87 to more recently than they have been recorded to CDR disk and record those
91 Summary: Bacula - The Network Backup Solution
92 Group: System Environment/Daemons
94 Requires: php >= 4, bacula-server
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. bacula-web is a
105 web server based utility to monitor your bacula server.
109 # unpack both sources inside a directory with package name and version
110 %setup -c %{name} -D -b 1
111 %setup -c %{name} -T -D -b 2
117 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
120 mkdir -p $RPM_BUILD_ROOT%{cgidir}
121 mkdir -p $RPM_BUILD_ROOT%{docdir}/%{web}
122 mkdir -p $RPM_BUILD_ROOT%{sysconfdir}
124 # install bimagemgr files
125 cp -p %{bimagemgr}-%{version}/bimagemgr.pl $RPM_BUILD_ROOT%{cgidir}/
126 cp -p %{bimagemgr}-%{version}/config.pm $RPM_BUILD_ROOT%{cgidir}/
127 cp -p %{bimagemgr}-%{version}/create_cdimage_table.pl $RPM_BUILD_ROOT%{sysconfdir}/
128 cp -p %{bimagemgr}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
129 cp -p %{bimagemgr}-%{version}/bimagemgr.gif $RPM_BUILD_ROOT%{docdir}/
130 cp -p %{bimagemgr}-%{version}/cdrom_spins.gif $RPM_BUILD_ROOT%{docdir}/
131 cp -p %{bimagemgr}-%{version}/clearpixel.gif $RPM_BUILD_ROOT%{docdir}/
132 cp -p %{bimagemgr}-%{version}/temp.html $RPM_BUILD_ROOT%{docdir}/
134 chmod 755 $RPM_BUILD_ROOT%{cgidir}/bimagemgr.pl
135 chmod 750 $RPM_BUILD_ROOT%{cgidir}/config.pm
136 chmod 750 $RPM_BUILD_ROOT%{sysconfdir}/create_cdimage_table.pl
137 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
138 chmod 644 $RPM_BUILD_ROOT%{docdir}/*.gif
139 chmod 664 $RPM_BUILD_ROOT%{docdir}/temp.html
141 # install bacula-web files
142 cp -p %{web}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
143 cp -r -p %{web}-%{version}/* $RPM_BUILD_ROOT%{docdir}/%{web}/
145 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
147 # remove the standard doc files from the install directory
148 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/ChangeLog
149 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/CONTACT
150 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/COPYING
151 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/README
152 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/TODO
155 mkdir -p docs/%{bimagemgr}
158 cp -p %{bimagemgr}-%{version}/README docs/%{bimagemgr}/
159 cp -p %{bimagemgr}-%{version}/COPYING docs/%{bimagemgr}/
160 cp -p %{bimagemgr}-%{version}/ChangeLog docs/%{bimagemgr}/
161 cp -p %{bimagemgr}-%{version}/ReleaseNotes docs/%{bimagemgr}/
163 cp -p %{web}-%{version}/README docs/%{web}/
164 cp -p %{web}-%{version}/ChangeLog docs/%{web}/
165 cp -p %{web}-%{version}/CONTACT docs/%{web}/
166 cp -p %{web}-%{version}/COPYING docs/%{web}/
167 cp -p bacula-docs-%{version}/%{web}/%{web}.pdf docs/%{web}/
170 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
174 %defattr(-,root,root)
175 %doc docs/%{bimagemgr}/*
177 %defattr(-,%{binowner},%{bingroup})
178 %{cgidir}/bimagemgr.pl
179 %{sysconfdir}/create_cdimage_table.pl
180 %{sysconfdir}/README.bimagemgr
181 %{docdir}/bimagemgr.gif
182 %{docdir}/cdrom_spins.gif
183 %{docdir}/clearpixel.gif
185 %defattr(-,%{dataowner},%{datagroup})
187 $config(noreplace) %{cgidir}/config.pm
190 %defattr(-,root,root)
193 %defattr(-,%{binowner},%{bingroup})
194 %{sysconfdir}/README.bacula-web
196 %defattr(-,%{dataowner},%{datagroup})
197 %{docdir}/%{web}/*.php
198 %{docdir}/%{web}/*.po
199 %{docdir}/%{web}/*.inc
200 %config(noreplace) %{docdir}/%{web}/configs
201 %{docdir}/%{web}/external_packages
202 %{docdir}/%{web}/images
204 %{docdir}/%{web}/locale
205 %{docdir}/%{web}/templates
206 %{docdir}/%{web}/templates_c
210 # add the web server user to group bacula
211 %{groupmod} -A %{dataowner} bacula
214 # remove the web server user to group bacula
215 %{groupmod} -R %{dataowner} bacula
218 * Sun May 07 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
219 - refine files section for web
221 - add config.pm for bimagemgr
222 - add post script bimagemgr to add web server user to group bacula
223 * Sat May 06 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
224 - was bimagemgr spec convert to bacula-gui spec. include bacula-web
225 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
226 - ASSIGNMENT OF COPYRIGHT
227 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
228 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
229 - all right, title and interest in and to the copyright in this software RPM
230 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
231 - free of all liens, encumbrances or any known claims against said copyright.
232 * Sun Nov 14 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>