]> git.pld-linux.org Git - packages/bacula-web.git/blame - bacula-web.spec
- use php(core) as dependency to require php version
[packages/bacula-web.git] / bacula-web.spec
CommitLineData
eba56fc5 1%define php_min_version 5.2.4
138953e5 2%include /usr/lib/rpm/macros.php
eba56fc5
ER
3Summary: Open source monitoring and reporting tool for Bacula
4Name: bacula-web
5Version: 5.2.2
1f4ccae5 6Release: 6
eba56fc5
ER
7License: GPL v2
8Group: Applications/WWW
9URL: http://www.bacula-web.org/
10Source0: http://www.bacula-web.org/tl_files/downloads/%{name}.%{version}.tar.gz
11# Source0-md5: b52253963cc6edb6437a0dbe59c6051f
12Source1: apache.conf
138953e5 13Patch0: sys-libs.patch
eba56fc5 14BuildRequires: rpm-php-pearprov >= 4.4.2-11
af7a763b 15BuildRequires: rpmbuild(macros) >= 1.268
eba56fc5 16BuildRequires: sed >= 4.0
138953e5
ER
17Requires: Smarty
18Requires: Smarty-plugin-gettext
1f4ccae5 19Requires: php(core) >= %{php_min_version}
f3e8be0b
ER
20Requires: php(gd)
21Requires: php(gettext)
22Requires: php(pdo)
eba56fc5 23Requires: phplot
eba56fc5 24Requires: webserver(php)
405cdc14 25BuildArch: noarch
4041abae
AM
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
af7a763b 28%define _webapps /etc/webapps
eba56fc5 29%define _webapp %{name}
af7a763b
ER
30%define _sysconfdir %{_webapps}/%{_webapp}
31%define _appdir %{_datadir}/%{_webapp}
138953e5 32%define cachedir /var/cache/%{name}
af7a763b 33%define _smartyplugindir %{php_data_dir}/Smarty/plugins
4041abae 34
eba56fc5
ER
35# bad depsolver
36%define _noautopear pear
37# put it together for rpmbuild
38%define _noautoreq %{?_noautophp} %{?_noautopear}
4041abae 39
eba56fc5
ER
40%description
41Bacula-Web is a web based tool written in PHP that provide you a
42summarized view of your bacula's backup infrastructure. It obtain his
43information from your bacula catalog's database.
b3b9ed9e 44
4041abae 45%prep
eba56fc5 46%setup -qc
138953e5 47%patch0 -p1
4041abae 48
eba56fc5
ER
49mv config/config.php{.sample,}
50rm locale/*/LC_MESSAGES/*.po
138953e5 51mv core/external .
4041abae
AM
52
53%install
54rm -rf $RPM_BUILD_ROOT
138953e5 55install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
eba56fc5 56cp -a *.php core locale style templates $RPM_BUILD_ROOT%{_appdir}
4041abae 57
eba56fc5
ER
58cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
59ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
4041abae 60
138953e5
ER
61ln -s %{cachedir} $RPM_BUILD_ROOT%{_appdir}/templates_c
62
eba56fc5
ER
63cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
64cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
4041abae 65
eba56fc5
ER
66%clean
67rm -rf $RPM_BUILD_ROOT
4041abae 68
138953e5
ER
69%post
70# cleanup cache from previous rpm
71echo %{cachedir}/* | xargs rm -f
72
73%preun
74if [ "$1" = 0 ]; then
75 echo %{cachedir}/* | xargs rm -f
76fi
77
eba56fc5 78%triggerin -- apache1 < 1.3.37-3, apache1-base
af7a763b 79%webapp_register apache %{_webapp}
4041abae 80
eba56fc5 81%triggerun -- apache1 < 1.3.37-3, apache1-base
af7a763b
ER
82%webapp_unregister apache %{_webapp}
83
eba56fc5 84%triggerin -- apache < 2.2.0, apache-base
af7a763b
ER
85%webapp_register httpd %{_webapp}
86
eba56fc5 87%triggerun -- apache < 2.2.0, apache-base
af7a763b 88%webapp_unregister httpd %{_webapp}
4041abae 89
eba56fc5 90%files
4041abae 91%defattr(644,root,root,755)
eba56fc5 92%doc INSTALL README
af7a763b
ER
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
eba56fc5
ER
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
98
99%dir %{_appdir}
100%{_appdir}/backupjob-report.php
101%{_appdir}/client-report.php
102%{_appdir}/index.php
103%{_appdir}/jobs.php
104%{_appdir}/pools.php
105%{_appdir}/test.php
106%{_appdir}/config
107%{_appdir}/style
108%{_appdir}/templates
138953e5 109%{_appdir}/templates_c
eba56fc5
ER
110
111%dir %{_appdir}/core
112%{_appdir}/core/bweb.inc.php
113%{_appdir}/core/app
114%{_appdir}/core/cfg
115%{_appdir}/core/db
116%{_appdir}/core/graph
117%{_appdir}/core/i18n
118%{_appdir}/core/utils
119
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
127
138953e5 128%dir %attr(775,root,http) %{cachedir}
This page took 0.075999 seconds and 4 git commands to generate.