]>
Commit | Line | Data |
---|---|---|
eba56fc5 ER |
1 | %define php_min_version 5.2.4 |
2 | #%include /usr/lib/rpm/macros.php | |
3 | Summary: Open source monitoring and reporting tool for Bacula | |
4 | Name: bacula-web | |
5 | Version: 5.2.2 | |
6 | Release: 0.3 | |
7 | License: GPL v2 | |
8 | Group: Applications/WWW | |
9 | URL: http://www.bacula-web.org/ | |
10 | Source0: http://www.bacula-web.org/tl_files/downloads/%{name}.%{version}.tar.gz | |
11 | # Source0-md5: b52253963cc6edb6437a0dbe59c6051f | |
12 | Source1: apache.conf | |
13 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
af7a763b | 14 | BuildRequires: rpmbuild(macros) >= 1.268 |
eba56fc5 ER |
15 | BuildRequires: sed >= 4.0 |
16 | #Requires: php-Smarty | |
17 | Requires: php-common >= 4:%{php_min_version} | |
18 | Requires: php-gd | |
19 | Requires: php-gettext | |
20 | Requires: php-pdo | |
21 | Requires: phplot | |
22 | Requires: smarty-gettext | |
23 | Requires: webserver(php) | |
405cdc14 | 24 | BuildArch: noarch |
4041abae AM |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
af7a763b | 27 | %define _webapps /etc/webapps |
eba56fc5 | 28 | %define _webapp %{name} |
af7a763b ER |
29 | %define _sysconfdir %{_webapps}/%{_webapp} |
30 | %define _appdir %{_datadir}/%{_webapp} | |
af7a763b | 31 | %define _smartyplugindir %{php_data_dir}/Smarty/plugins |
4041abae | 32 | |
eba56fc5 ER |
33 | # bad depsolver |
34 | %define _noautopear pear | |
35 | # put it together for rpmbuild | |
36 | %define _noautoreq %{?_noautophp} %{?_noautopear} | |
4041abae | 37 | |
eba56fc5 ER |
38 | %description |
39 | Bacula-Web is a web based tool written in PHP that provide you a | |
40 | summarized view of your bacula's backup infrastructure. It obtain his | |
41 | information from your bacula catalog's database. | |
b3b9ed9e | 42 | |
4041abae | 43 | %prep |
eba56fc5 | 44 | %setup -qc |
4041abae | 45 | |
eba56fc5 ER |
46 | mv config/config.php{.sample,} |
47 | rm locale/*/LC_MESSAGES/*.po | |
a76cb807 | 48 | |
eba56fc5 ER |
49 | # nonstandard plugins |
50 | install -d smarty-plugins | |
51 | #mv core/external/smarty/libs/plugins/modifier.fsize_format.php smarty-plugins | |
a76cb807 | 52 | |
eba56fc5 ER |
53 | %{__rm} -r templates_c |
54 | #external_packages | |
4041abae AM |
55 | |
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
eba56fc5 ER |
58 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} |
59 | cp -a *.php core locale style templates $RPM_BUILD_ROOT%{_appdir} | |
60 | #cp -a smarty-plugins/* $RPM_BUILD_ROOT%{_smartyplugindir} | |
4041abae | 61 | |
eba56fc5 ER |
62 | cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir} |
63 | ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config | |
4041abae | 64 | |
eba56fc5 ER |
65 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
66 | cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf | |
4041abae | 67 | |
eba56fc5 ER |
68 | %clean |
69 | rm -rf $RPM_BUILD_ROOT | |
4041abae | 70 | |
eba56fc5 | 71 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
af7a763b | 72 | %webapp_register apache %{_webapp} |
4041abae | 73 | |
eba56fc5 | 74 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
af7a763b ER |
75 | %webapp_unregister apache %{_webapp} |
76 | ||
eba56fc5 | 77 | %triggerin -- apache < 2.2.0, apache-base |
af7a763b ER |
78 | %webapp_register httpd %{_webapp} |
79 | ||
eba56fc5 | 80 | %triggerun -- apache < 2.2.0, apache-base |
af7a763b | 81 | %webapp_unregister httpd %{_webapp} |
4041abae | 82 | |
eba56fc5 | 83 | %files |
4041abae | 84 | %defattr(644,root,root,755) |
eba56fc5 | 85 | %doc INSTALL README |
af7a763b ER |
86 | %dir %attr(750,root,http) %{_sysconfdir} |
87 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
88 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
eba56fc5 ER |
89 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php |
90 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/global.inc.php | |
91 | ||
92 | %dir %{_appdir} | |
93 | %{_appdir}/backupjob-report.php | |
94 | %{_appdir}/client-report.php | |
95 | %{_appdir}/index.php | |
96 | %{_appdir}/jobs.php | |
97 | %{_appdir}/pools.php | |
98 | %{_appdir}/test.php | |
99 | %{_appdir}/config | |
100 | %{_appdir}/style | |
101 | %{_appdir}/templates | |
102 | ||
103 | %dir %{_appdir}/core | |
104 | %{_appdir}/core/bweb.inc.php | |
105 | %{_appdir}/core/app | |
106 | %{_appdir}/core/cfg | |
107 | %{_appdir}/core/db | |
108 | %{_appdir}/core/graph | |
109 | %{_appdir}/core/i18n | |
110 | %{_appdir}/core/utils | |
111 | ||
112 | %dir %{_appdir}/locale | |
113 | %lang(de) %{_appdir}/locale/de_DE | |
114 | %lang(en) %{_appdir}/locale/en_EN | |
115 | %lang(es) %{_appdir}/locale/es_ES | |
116 | %lang(fr) %{_appdir}/locale/fr_FR | |
117 | %lang(it) %{_appdir}/locale/it_IT | |
118 | %lang(sv) %{_appdir}/locale/sv_SV | |
119 | ||
120 | %dir %{_appdir}/core/external | |
121 | %{_appdir}/core/external/phplot | |
122 | %{_appdir}/core/external/smarty | |
123 | %{_appdir}/core/external/smarty_gettext-0.9 | |
124 | ||
125 | #%{_appdir}/templates_c |