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