3 %define php_min_version 5.3.4
4 Summary: Open source monitoring and reporting tool for Bacula
9 Group: Applications/WWW
10 Source0: http://www.bacula-web.org/download/articles/bacula-web-600.html?file=files/bacula-web.org/downloads/%{name}-%{version}.tgz
11 # Source0-md5: 3e99f9626cf4329ce43947f11a9d8f49
13 Patch0: sys-libs.patch
14 URL: http://www.bacula-web.org/
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(macros) >= 1.654
17 BuildRequires: sed >= 4.0
19 Requires: Smarty-plugin-gettext
20 Requires: php(core) >= %{php_min_version}
22 Requires: php(gettext)
24 Requires: php(session)
26 Requires: webserver(php)
27 # Any of the db drivers needed depending where you hold your Bacula DB
28 Suggests: php-pdo-mysql
29 Suggests: php-pdo-pgsql
30 Suggests: php-pdo-sqlite
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _webapps /etc/webapps
35 %define _webapp %{name}
36 %define _sysconfdir %{_webapps}/%{_webapp}
37 %define _appdir %{_datadir}/%{_webapp}
38 %define cachedir /var/cache/%{name}
39 %define _smartyplugindir %{php_data_dir}/Smarty/plugins
42 %define _noautopear pear
43 # put it together for rpmbuild
44 %define _noautoreq %{?_noautophp} %{?_noautopear}
47 Bacula-Web is a web based tool written in PHP that provide you a
48 summarized view of your bacula's backup infrastructure. It obtain his
49 information from your bacula catalog's database.
55 mv application/config .
56 mv config/config.php{.sample,}
57 %{__rm} application/locale/*/LC_MESSAGES/*.po
58 %{__rm} -r application/view/cache
62 # you'll need this if you cp -a complete dir in source
63 # cleanup backups after patching
64 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
69 cp -a *.php application core $RPM_BUILD_ROOT%{_appdir}
70 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
72 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
73 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
76 rm -rf $RPM_BUILD_ROOT
79 # cleanup cache from previous rpm
80 echo %{cachedir}/* | xargs rm -f
84 echo %{cachedir}/* | xargs rm -f
87 %triggerin -- apache1 < 1.3.37-3, apache1-base
88 %webapp_register apache %{_webapp}
90 %triggerun -- apache1 < 1.3.37-3, apache1-base
91 %webapp_unregister apache %{_webapp}
93 %triggerin -- apache < 2.2.0, apache-base
94 %webapp_register httpd %{_webapp}
96 %triggerun -- apache < 2.2.0, apache-base
97 %webapp_unregister httpd %{_webapp}
100 %defattr(644,root,root,755)
101 %doc INSTALL README Changelog
102 %dir %attr(750,root,http) %{_sysconfdir}
103 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
104 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
105 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
108 %{_appdir}/backupjob-report.php
109 %{_appdir}/client-report.php
111 %{_appdir}/joblogs.php
117 %{_appdir}/core/bweb.class.php
118 %{_appdir}/core/const.inc.php
119 %{_appdir}/core/global.inc.php
122 %{_appdir}/core/graph
124 %{_appdir}/core/utils
126 %dir %{_appdir}/application
127 %{_appdir}/application/libs
128 %{_appdir}/application/models
129 %{_appdir}/application/view
131 %dir %{_appdir}/application/locale
132 %lang(de) %{_appdir}/application/locale/de_DE
133 %lang(en) %{_appdir}/application/locale/en_EN
134 %lang(es) %{_appdir}/application/locale/es_ES
135 %lang(fr) %{_appdir}/application/locale/fr_FR
136 %lang(it) %{_appdir}/application/locale/it_IT
137 %lang(nl) %{_appdir}/application/locale/nl_NL
138 %lang(pt_BR) %{_appdir}/application/locale/pt_BR
139 %lang(sv) %{_appdir}/application/locale/sv_SV
141 %dir %attr(775,root,http) %{cachedir}