]> git.pld-linux.org Git - packages/bacula-web.git/blame - bacula-web.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/bacula-web.git] / bacula-web.spec
CommitLineData
97184a12
ER
1# TODO
2# - lighttpd support
3%define php_min_version 5.3.4
eba56fc5
ER
4Summary: Open source monitoring and reporting tool for Bacula
5Name: bacula-web
5e3bbf5d 6Version: 6.0.0
f5b51469 7Release: 2
eba56fc5
ER
8License: GPL v2
9Group: Applications/WWW
5e3bbf5d
JK
10Source0: http://www.bacula-web.org/download/articles/bacula-web-600.html?file=files/bacula-web.org/downloads/%{name}-%{version}.tgz
11# Source0-md5: 3e99f9626cf4329ce43947f11a9d8f49
eba56fc5 12Source1: apache.conf
138953e5 13Patch0: sys-libs.patch
19277062 14URL: http://www.bacula-web.org/
eba56fc5 15BuildRequires: rpm-php-pearprov >= 4.4.2-11
97184a12 16BuildRequires: rpmbuild(macros) >= 1.654
eba56fc5 17BuildRequires: sed >= 4.0
138953e5
ER
18Requires: Smarty
19Requires: Smarty-plugin-gettext
1f4ccae5 20Requires: php(core) >= %{php_min_version}
f3e8be0b
ER
21Requires: php(gd)
22Requires: php(gettext)
23Requires: php(pdo)
97184a12 24Requires: php(session)
eba56fc5 25Requires: phplot
eba56fc5 26Requires: webserver(php)
97184a12
ER
27# Any of the db drivers needed depending where you hold your Bacula DB
28Suggests: php-pdo-mysql
29Suggests: php-pdo-pgsql
30Suggests: php-pdo-sqlite
405cdc14 31BuildArch: noarch
4041abae
AM
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
af7a763b 34%define _webapps /etc/webapps
eba56fc5 35%define _webapp %{name}
af7a763b
ER
36%define _sysconfdir %{_webapps}/%{_webapp}
37%define _appdir %{_datadir}/%{_webapp}
138953e5 38%define cachedir /var/cache/%{name}
af7a763b 39%define _smartyplugindir %{php_data_dir}/Smarty/plugins
4041abae 40
eba56fc5
ER
41# bad depsolver
42%define _noautopear pear
43# put it together for rpmbuild
44%define _noautoreq %{?_noautophp} %{?_noautopear}
4041abae 45
eba56fc5
ER
46%description
47Bacula-Web is a web based tool written in PHP that provide you a
48summarized view of your bacula's backup infrastructure. It obtain his
49information from your bacula catalog's database.
b3b9ed9e 50
4041abae 51%prep
5e3bbf5d 52%setup -q
138953e5 53%patch0 -p1
4041abae 54
97184a12 55mv application/config .
eba56fc5 56mv config/config.php{.sample,}
97184a12
ER
57%{__rm} application/locale/*/LC_MESSAGES/*.po
58%{__rm} -r application/view/cache
138953e5 59mv core/external .
5e3bbf5d 60mv DOCS/* .
4041abae 61
97184a12
ER
62# you'll need this if you cp -a complete dir in source
63# cleanup backups after patching
64find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
8eb594c5 65
4041abae
AM
66%install
67rm -rf $RPM_BUILD_ROOT
138953e5 68install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
97184a12 69cp -a *.php application core $RPM_BUILD_ROOT%{_appdir}
eba56fc5 70cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
138953e5 71
eba56fc5 72cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
2f6c9c51 73cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
4041abae 74
eba56fc5
ER
75%clean
76rm -rf $RPM_BUILD_ROOT
4041abae 77
138953e5
ER
78%post
79# cleanup cache from previous rpm
80echo %{cachedir}/* | xargs rm -f
81
82%preun
83if [ "$1" = 0 ]; then
84 echo %{cachedir}/* | xargs rm -f
85fi
86
eba56fc5 87%triggerin -- apache1 < 1.3.37-3, apache1-base
af7a763b 88%webapp_register apache %{_webapp}
4041abae 89
eba56fc5 90%triggerun -- apache1 < 1.3.37-3, apache1-base
af7a763b
ER
91%webapp_unregister apache %{_webapp}
92
2f6c9c51 93%triggerin -- apache < 2.2.0, apache-base
af7a763b
ER
94%webapp_register httpd %{_webapp}
95
2f6c9c51 96%triggerun -- apache < 2.2.0, apache-base
af7a763b 97%webapp_unregister httpd %{_webapp}
4041abae 98
eba56fc5 99%files
4041abae 100%defattr(644,root,root,755)
97184a12 101%doc INSTALL README Changelog
af7a763b
ER
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
eba56fc5 105%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
eba56fc5
ER
106
107%dir %{_appdir}
108%{_appdir}/backupjob-report.php
109%{_appdir}/client-report.php
110%{_appdir}/index.php
97184a12 111%{_appdir}/joblogs.php
eba56fc5
ER
112%{_appdir}/jobs.php
113%{_appdir}/pools.php
114%{_appdir}/test.php
eba56fc5
ER
115
116%dir %{_appdir}/core
5e3bbf5d
JK
117%{_appdir}/core/bweb.class.php
118%{_appdir}/core/const.inc.php
97184a12 119%{_appdir}/core/global.inc.php
eba56fc5 120%{_appdir}/core/app
eba56fc5
ER
121%{_appdir}/core/db
122%{_appdir}/core/graph
123%{_appdir}/core/i18n
124%{_appdir}/core/utils
125
97184a12
ER
126%dir %{_appdir}/application
127%{_appdir}/application/libs
128%{_appdir}/application/models
129%{_appdir}/application/view
130
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
5e3bbf5d 137%lang(nl) %{_appdir}/application/locale/nl_NL
97184a12
ER
138%lang(pt_BR) %{_appdir}/application/locale/pt_BR
139%lang(sv) %{_appdir}/application/locale/sv_SV
eba56fc5 140
138953e5 141%dir %attr(775,root,http) %{cachedir}
This page took 0.083022 seconds and 4 git commands to generate.