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}/create_cdimage_table.pl $RPM_BUILD_ROOT%{sysconfdir}/
125 cp -p %{bimagemgr}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
126 cp -p %{bimagemgr}-%{version}/bimagemgr.gif $RPM_BUILD_ROOT%{docdir}/
127 cp -p %{bimagemgr}-%{version}/cdrom_spins.gif $RPM_BUILD_ROOT%{docdir}/
128 cp -p %{bimagemgr}-%{version}/clearpixel.gif $RPM_BUILD_ROOT%{docdir}/
129 cp -p %{bimagemgr}-%{version}/temp.html $RPM_BUILD_ROOT%{docdir}/
131 chmod 755 $RPM_BUILD_ROOT%{cgidir}/bimagemgr.pl
132 chmod 750 $RPM_BUILD_ROOT%{sysconfdir}/create_cdimage_table.pl
133 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
134 chmod 644 $RPM_BUILD_ROOT%{docdir}/*.gif
135 chmod 664 $RPM_BUILD_ROOT%{docdir}/temp.html
137 # install bacula-web files
138 cp -p %{web}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
139 cp -r -p %{web}-%{version}/* $RPM_BUILD_ROOT%{docdir}/%{web}/
141 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
143 # remove the standard doc files from the install directory
144 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/ChangeLog
145 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/CONTACT
146 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/COPYING
147 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/README
148 rm -f $RPM_BUILD_ROOT%{docdir}/%{web}/TODO
151 mkdir -p docs/%{bimagemgr}
154 cp -p %{bimagemgr}-%{version}/README docs/%{bimagemgr}/
156 cp -p %{web}-%{version}/README docs/%{web}/
157 cp -p %{web}-%{version}/ChangeLog docs/%{web}/
158 cp -p %{web}-%{version}/CONTACT docs/%{web}/
159 cp -p %{web}-%{version}/COPYING docs/%{web}/
160 cp -p bacula-docs-%{version}/%{web}/%{web}.pdf docs/%{web}/
163 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
167 %defattr(-,root,root)
168 %doc docs/%{bimagemgr}/*
170 %defattr(-,%{binowner},%{bingroup})
171 %{cgidir}/bimagemgr.pl
172 %{sysconfdir}/create_cdimage_table.pl
173 %{sysconfdir}/README.bimagemgr
174 %{docdir}/bimagemgr.gif
175 %{docdir}/cdrom_spins.gif
176 %{docdir}/clearpixel.gif
178 %defattr(-,%{dataowner},%{datagroup})
182 %defattr(-,root,root)
185 %defattr(-,%{binowner},%{bingroup})
186 %{sysconfdir}/README.bacula-web
188 %defattr(-,%{dataowner},%{datagroup})
189 %{docdir}/%{web}/*.php
190 %{docdir}/%{web}/*.po
191 %{docdir}/%{web}/*.inc
192 %config(noreplace) %{docdir}/%{web}/configs
193 %{docdir}/%{web}/external_packages
194 %{docdir}/%{web}/images
196 %{docdir}/%{web}/locale
197 %{docdir}/%{web}/templates
198 %{docdir}/%{web}/templates_c
201 * Sun May 07 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
202 - refine files section for web
204 * Sat May 06 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
205 - was bimagemgr spec convert to bacula-gui spec. include bacula-web
206 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
207 - ASSIGNMENT OF COPYRIGHT
208 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
209 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
210 - all right, title and interest in and to the copyright in this software RPM
211 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
212 - free of all liens, encumbrances or any known claims against said copyright.
213 * Sun Nov 14 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>