]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-gui.spec.in
5b7a5e3dc69a3350b64d11d54b4cc7c011f6cd0d
[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}/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}/
130
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
136
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}/
140
141 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
142
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
149
150 # setup the docs dir
151 mkdir -p docs/%{bimagemgr}
152 mkdir docs/%{web}
153
154 cp -p %{bimagemgr}-%{version}/README docs/%{bimagemgr}/
155
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}/
161
162 %clean
163 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
164 rm -rf docs
165
166 %files bimagemgr
167 %defattr(-,root,root)
168 %doc docs/%{bimagemgr}/*
169
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
177
178 %defattr(-,%{dataowner},%{datagroup})
179 %{docdir}/temp.html
180
181 %files web
182 %defattr(-,root,root)
183 %doc docs/%{web}/*
184
185 %defattr(-,%{binowner},%{bingroup})
186 %{sysconfdir}/README.bacula-web
187
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
195 %{docdir}/%{web}/js
196 %{docdir}/%{web}/locale
197 %{docdir}/%{web}/templates
198 %{docdir}/%{web}/templates_c
199
200 %changelog
201 * Sun May 07 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
202 - refine files section for web
203 - add documentation
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>
214 - initial spec file