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
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
13 Patch0: sys-libs.patch
14 BuildRequires: rpm-php-pearprov >= 4.4.2-11
15 BuildRequires: rpmbuild(macros) >= 1.268
16 BuildRequires: sed >= 4.0
18 Requires: Smarty-plugin-gettext
19 Requires: php-common >= 4:%{php_min_version}
24 Requires: webserver(php)
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _webapps /etc/webapps
29 %define _webapp %{name}
30 %define _sysconfdir %{_webapps}/%{_webapp}
31 %define _appdir %{_datadir}/%{_webapp}
32 %define cachedir /var/cache/%{name}
33 %define _smartyplugindir %{php_data_dir}/Smarty/plugins
36 %define _noautopear pear
37 # put it together for rpmbuild
38 %define _noautoreq %{?_noautophp} %{?_noautopear}
41 Bacula-Web is a web based tool written in PHP that provide you a
42 summarized view of your bacula's backup infrastructure. It obtain his
43 information from your bacula catalog's database.
49 mv config/config.php{.sample,}
50 rm locale/*/LC_MESSAGES/*.po
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
56 cp -a *.php core locale style templates $RPM_BUILD_ROOT%{_appdir}
58 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
59 ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
61 ln -s %{cachedir} $RPM_BUILD_ROOT%{_appdir}/templates_c
63 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
64 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
67 rm -rf $RPM_BUILD_ROOT
70 # cleanup cache from previous rpm
71 echo %{cachedir}/* | xargs rm -f
75 echo %{cachedir}/* | xargs rm -f
78 %triggerin -- apache1 < 1.3.37-3, apache1-base
79 %webapp_register apache %{_webapp}
81 %triggerun -- apache1 < 1.3.37-3, apache1-base
82 %webapp_unregister apache %{_webapp}
84 %triggerin -- apache < 2.2.0, apache-base
85 %webapp_register httpd %{_webapp}
87 %triggerun -- apache < 2.2.0, apache-base
88 %webapp_unregister httpd %{_webapp}
91 %defattr(644,root,root,755)
93 %dir %attr(750,root,http) %{_sysconfdir}
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
95 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
96 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
97 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/global.inc.php
100 %{_appdir}/backupjob-report.php
101 %{_appdir}/client-report.php
109 %{_appdir}/templates_c
112 %{_appdir}/core/bweb.inc.php
116 %{_appdir}/core/graph
118 %{_appdir}/core/utils
120 %dir %{_appdir}/locale
121 %lang(de) %{_appdir}/locale/de_DE
122 %lang(en) %{_appdir}/locale/en_EN
123 %lang(es) %{_appdir}/locale/es_ES
124 %lang(fr) %{_appdir}/locale/fr_FR
125 %lang(it) %{_appdir}/locale/it_IT
126 %lang(sv) %{_appdir}/locale/sv_SV
128 %dir %attr(775,root,http) %{cachedir}