]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-gui.spec.in
90c8f1a33599d0fc35208c3cf13e771ba03300fe
[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 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>
58
59 %description
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.
64
65 %package bimagemgr
66 Summary: Bacula - The Network Backup Solution
67 Group: System Environment/Daemons
68
69 Requires: perl, perl-DBI, bacula-server, cdrecord, mkisofs
70 %if %{mdk}
71 Requires: apache
72 %else
73 Requires: httpd
74 %endif
75
76 Obsoletes: bacula-bimagemgr
77
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 
85 which have.
86
87 %package web
88 Summary: Bacula - The Network Backup Solution
89 Group: System Environment/Daemons
90
91 Requires: php >= 4, bacula-server
92 %if %{mdk}
93 Requires: apache
94 %else
95 Requires: httpd
96 %endif
97
98 %description web
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.
103
104 %prep
105
106 # unpack both sources inside a directory with package name and version
107 %setup -c %{name} -D -b 1
108
109 %build
110
111 %install
112
113 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
114
115 mkdir -p $RPM_BUILD_ROOT%{cgidir}
116 mkdir -p $RPM_BUILD_ROOT%{docdir}/%{web}
117 mkdir -p $RPM_BUILD_ROOT%{sysconfdir}
118
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}/
127
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
133
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}/
137
138 chmod 644 $RPM_BUILD_ROOT%{sysconfdir}/README.bacula-web
139
140 %clean
141 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
142
143 %files bimagemgr
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
151
152 %defattr(-,%{dataowner},%{datagroup})
153 %{docdir}/temp.html
154
155 %files web
156 %defattr(-,%{binowner},%{bingroup})
157 %{sysconfdir}/README.bacula-web
158
159 %defattr(-,%{dataowner},%{datagroup})
160 %{docdir}/%{web}/*
161
162 %changelog
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>
173 - initial spec file