1 # Bacula Image Manager RPM spec file
2 # Copyright (C) 2004 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 BuildRoot: %{_tmppath}/%{name}-root
53 URL: http://www.bacula.org/
54 BuildArchitectures: noarch
55 Vendor: The Bacula Team
56 Distribution: The Bacula Team
57 Packager: D. Scott Barninger <barninger at fairfieldcomputers dot com>
60 Bacula is a set of computer programs that permit you (or the system
61 administrator) to manage backup, recovery, and verification of computer
62 data across a network of computers of different kinds. bacula-gui is a
63 set of web server based tools used to manage backups.
66 Summary: Bacula - The Network Backup Solution
67 Group: System Environment/Daemons
69 Requires: perl, perl-DBI, bacula-server, cdrecord, mkisofs
76 Obsoletes: bacula-bimagemgr
78 %description bimagemgr
79 Bacula is a set of computer programs that permit you (or the system
80 administrator) to manage backup, recovery, and verification of computer
81 data across a network of computers of different kinds. bimagemgr is a
82 utility to manage backups made to files intended for burning to CDR
83 disk. bimagemgr allows you to easily see which Volumes have been written
84 to more recently than they have been recorded to CDR disk and record those
88 Summary: Bacula - The Network Backup Solution
89 Group: System Environment/Daemons
99 Bacula is a set of computer programs that permit you (or the system
100 administrator) to manage backup, recovery, and verification of computer
101 data across a network of computers of different kinds. bacula-web is a
102 web server based utility to monitor your bacula server.
106 # unpack both sources inside a directory with package name and version
107 %setup -c %{name} -D -b 1
113 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
115 mkdir -p $RPM_BUILD_ROOT%{cgidir}
116 mkdir -p $RPM_BUILD_ROOT%{docdir}/%{web}
117 mkdir -p $RPM_BUILD_ROOT%{sysconfdir}
119 # install bimagemgr files
120 cp -p %{bimagemgr}-%{version}/bimagemgr.pl $RPM_BUILD_ROOT%{cgidir}/
121 cp -p %{bimagemgr}-%{version}/create_cdimage_table.pl $RPM_BUILD_ROOT%{sysconfdir}/
122 cp -p %{bimagemgr}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
123 cp -p %{bimagemgr}-%{version}/bimagemgr.gif $RPM_BUILD_ROOT%{docdir}/
124 cp -p %{bimagemgr}-%{version}/cdrom_spins.gif $RPM_BUILD_ROOT%{docdir}/
125 cp -p %{bimagemgr}-%{version}/clearpixel.gif $RPM_BUILD_ROOT%{docdir}/
126 cp -p %{bimagemgr}-%{version}/temp.html $RPM_BUILD_ROOT%{docdir}/
128 chmod 755 $RPM_BUILD_ROOT%{cgidir}/bimagemgr.pl
129 chmod 750 $RPM_BUILD_ROOT%{sysconfdir}/create_cdimage_table.pl
130 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bimagemgr
131 chmod 644 $RPM_BUILD_ROOT%{docdir}/*.gif
132 chmod 664 $RPM_BUILD_ROOT%{docdir}/temp.html
134 # install bacula-web files
135 cp -p %{web}-%{version}/README $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
136 cp -r -p %{web}-%{version}/* $RPM_BUILD_ROOT%{docdir}/%{web}/
138 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
141 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
144 %defattr(-,%{binowner},%{bingroup})
145 %{cgidir}/bimagemgr.pl
146 %{sysconfdir}/create_cdimage_table.pl
147 %{sysconfdir}/README.bimagemgr
148 %{docdir}/bimagemgr.gif
149 %{docdir}/cdrom_spins.gif
150 %{docdir}/clearpixel.gif
152 %defattr(-,%{dataowner},%{datagroup})
156 %defattr(-,%{binowner},%{bingroup})
157 %{sysconfdir}/README.bacula-web
159 %defattr(-,%{dataowner},%{datagroup})
163 * Sat May 06 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
164 - was bimagemgr spec convert to bacula-gui spec. include bacula-web
165 * Thu Dec 09 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
166 - ASSIGNMENT OF COPYRIGHT
167 - FOR VALUE RECEIVED, D. Scott Barninger hereby sells, transfers and
168 - assigns unto Kern Sibbald, his successors, assigns and personal representatives,
169 - all right, title and interest in and to the copyright in this software RPM
170 - spec file. D. Scott Barninger warrants good title to said copyright, that it is
171 - free of all liens, encumbrances or any known claims against said copyright.
172 * Sun Nov 14 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>