]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-gui.spec.in
73879ad0a034b0b4320ca64a11077db3f53fdbe1
[bacula/bacula] / gui / bacula-gui.spec.in
1 # Bacula Web GUI RPM spec file
2 # Copyright (C) 2004-2006 Kern Sibbald
3
4 # Platform defines
5
6 %define rhel 0
7 %{?build_rhel:%define rhel 1}
8
9 %define suse 0
10 %{?build_suse:%define suse 1}
11
12 %define mdk 0
13 %{?build_mdk:%define mdk 1}
14
15 # test for a platform definition
16 %if ! %{rhel} && ! %{suse} && ! %{mdk}
17 %{error: You must specify a platform. Please examine the spec file.}
18 exit 1
19 %endif
20
21 # source package names
22 %define web bacula-web
23 %define bimagemgr bimagemgr
24
25 # set destination directories
26 %define cgidir /var/www/cgi-bin
27 %define docdir /var/www/html
28 %define sysconfdir /etc/bacula
29 %if %{suse}
30 %define cgidir /srv/www/cgi-bin
31 %define docdir /srv/www/htdocs
32 %endif
33
34 # set ownership of files
35 %define binowner root
36 %define bingroup root
37 %define dataowner apache
38 %define datagroup apache
39 %if %{suse}
40 %define dataowner wwwrun
41 %define datagroup www
42 %endif
43
44 Summary: Bacula - The Network Backup Solution
45 Name: bacula-gui
46 Version: @VERSION@
47 Release: 1
48 Group: System Environment/Daemons
49 Copyright: GPL v2
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>
59
60 %description
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.
65
66 %package bimagemgr
67 Summary: Bacula - The Network Backup Solution
68 Group: System Environment/Daemons
69
70 Requires: perl, perl-DBI, bacula-server, cdrecord, mkisofs
71 %if %{mdk}
72 Requires: apache
73 %else
74 Requires: httpd
75 %endif
76
77 Obsoletes: bacula-bimagemgr
78
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 
86 which have.
87
88 %package web
89 Summary: Bacula - The Network Backup Solution
90 Group: System Environment/Daemons
91
92 Requires: php >= 4, bacula-server
93 %if %{mdk}
94 Requires: apache
95 %else
96 Requires: httpd
97 %endif
98
99 %description web
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.
104
105 %prep
106
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
110
111 %build
112
113 %install
114
115 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
116 rm -rf docs
117
118 mkdir -p $RPM_BUILD_ROOT%{cgidir}
119 mkdir -p $RPM_BUILD_ROOT%{docdir}/%{web}
120 mkdir -p $RPM_BUILD_ROOT%{sysconfdir}
121
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}/
131
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
138
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}/
142
143 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
144
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
151
152 # setup the docs dir
153 mkdir -p docs/%{bimagemgr}
154 mkdir docs/%{web}
155
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}/
160
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}/
166
167 %clean
168 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
169 rm -rf docs
170
171 %files bimagemgr
172 %defattr(-,root,root)
173 %doc docs/%{bimagemgr}/*
174
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
182
183 %defattr(-,%{dataowner},%{datagroup})
184 %{docdir}/temp.html
185 $config(noreplace) %{cgidir}/config.pm
186
187 %files web
188 %defattr(-,root,root)
189 %doc docs/%{web}/*
190
191 %defattr(-,%{binowner},%{bingroup})
192 %{sysconfdir}/README.bacula-web
193
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
201 %{docdir}/%{web}/js
202 %{docdir}/%{web}/locale
203 %{docdir}/%{web}/templates
204 %{docdir}/%{web}/templates_c
205
206 %changelog
207 * Sun May 07 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
208 - refine files section for web
209 - add documentation
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>
221 - initial spec file