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/tl_files/downloads/%{name}-%{version}.tar.gz
12 # Source0-md5: 6d3d212a9d145f8d112ce15f5a40538d
15 Patch0: sys-libs.patch
16 URL: http://www.bacula-web.org/
17 BuildRequires: rpm-php-pearprov >= 4.4.2-11
18 BuildRequires: rpmbuild(macros) >= 1.654
19 BuildRequires: sed >= 4.0
21 Requires: Smarty-plugin-gettext
22 Requires: php(core) >= %{php_min_version}
24 Requires: php(gettext)
26 Requires: php(session)
28 Requires: webserver(php)
29 # Any of the db drivers needed depending where you hold your Bacula DB
30 Suggests: php-pdo-mysql
31 Suggests: php-pdo-pgsql
32 Suggests: php-pdo-sqlite
33 Conflicts: apache-base < 2.4.0-1
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _webapps /etc/webapps
38 %define _webapp %{name}
39 %define _sysconfdir %{_webapps}/%{_webapp}
40 %define _appdir %{_datadir}/%{_webapp}
41 %define cachedir /var/cache/%{name}
42 %define _smartyplugindir %{php_data_dir}/Smarty/plugins
45 %define _noautopear pear
46 # put it together for rpmbuild
47 %define _noautoreq %{?_noautophp} %{?_noautopear}
50 Bacula-Web is a web based tool written in PHP that provide you a
51 summarized view of your bacula's backup infrastructure. It obtain his
52 information from your bacula catalog's database.
58 mv application/config .
59 mv config/config.php{.sample,}
60 %{__rm} application/locale/*/LC_MESSAGES/*.po
61 %{__rm} -r application/view/cache
65 # you'll need this if you cp -a complete dir in source
66 # cleanup backups after patching
67 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
72 cp -a *.php application core $RPM_BUILD_ROOT%{_appdir}
73 cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
75 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
76 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
79 rm -rf $RPM_BUILD_ROOT
82 # cleanup cache from previous rpm
83 echo %{cachedir}/* | xargs rm -f
87 echo %{cachedir}/* | xargs rm -f
90 %triggerin -- apache1 < 1.3.37-3, apache1-base
91 %webapp_register apache %{_webapp}
93 %triggerun -- apache1 < 1.3.37-3, apache1-base
94 %webapp_unregister apache %{_webapp}
96 %triggerin -- apache-base
97 %webapp_register httpd %{_webapp}
99 %triggerun -- apache-base
100 %webapp_unregister httpd %{_webapp}
103 %defattr(644,root,root,755)
104 %doc INSTALL README Changelog
105 %dir %attr(750,root,http) %{_sysconfdir}
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
107 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
108 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
111 %{_appdir}/backupjob-report.php
112 %{_appdir}/client-report.php
114 %{_appdir}/joblogs.php
120 %{_appdir}/core/bweb.inc.php
121 %{_appdir}/core/global.inc.php
124 %{_appdir}/core/graph
126 %{_appdir}/core/utils
128 %dir %{_appdir}/application
129 %{_appdir}/application/libs
130 %{_appdir}/application/models
131 %{_appdir}/application/view
133 %dir %{_appdir}/application/locale
134 %lang(de) %{_appdir}/application/locale/de_DE
135 %lang(en) %{_appdir}/application/locale/en_EN
136 %lang(es) %{_appdir}/application/locale/es_ES
137 %lang(fr) %{_appdir}/application/locale/fr_FR
138 %lang(it) %{_appdir}/application/locale/it_IT
139 %lang(pt_BR) %{_appdir}/application/locale/pt_BR
140 %lang(sv) %{_appdir}/application/locale/sv_SV
142 %dir %attr(775,root,http) %{cachedir}