]> git.pld-linux.org Git - packages/bacula-web.git/blame_incremental - bacula-web.spec
- updated files
[packages/bacula-web.git] / bacula-web.spec
... / ...
CommitLineData
1# TODO
2# - lighttpd support
3%define php_min_version 5.3.4
4%include /usr/lib/rpm/macros.php
5Summary: Open source monitoring and reporting tool for Bacula
6Name: bacula-web
7Version: 5.2.12
8Release: 3
9License: GPL v2
10Group: Applications/WWW
11Source0: http://www.bacula-web.org/tl_files/downloads/%{name}-%{version}.tar.gz
12# Source0-md5: 6d3d212a9d145f8d112ce15f5a40538d
13Source1: apache.conf
14Source2: httpd.conf
15Patch0: sys-libs.patch
16URL: http://www.bacula-web.org/
17BuildRequires: rpm-php-pearprov >= 4.4.2-11
18BuildRequires: rpmbuild(macros) >= 1.654
19BuildRequires: sed >= 4.0
20Requires: Smarty
21Requires: Smarty-plugin-gettext
22Requires: php(core) >= %{php_min_version}
23Requires: php(gd)
24Requires: php(gettext)
25Requires: php(pdo)
26Requires: php(session)
27Requires: phplot
28Requires: webserver(php)
29# Any of the db drivers needed depending where you hold your Bacula DB
30Suggests: php-pdo-mysql
31Suggests: php-pdo-pgsql
32Suggests: php-pdo-sqlite
33Conflicts: apache-base < 2.4.0-1
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
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
43
44# bad depsolver
45%define _noautopear pear
46# put it together for rpmbuild
47%define _noautoreq %{?_noautophp} %{?_noautopear}
48
49%description
50Bacula-Web is a web based tool written in PHP that provide you a
51summarized view of your bacula's backup infrastructure. It obtain his
52information from your bacula catalog's database.
53
54%prep
55%setup -qc
56%patch0 -p1
57
58mv application/config .
59mv config/config.php{.sample,}
60%{__rm} application/locale/*/LC_MESSAGES/*.po
61%{__rm} -r application/view/cache
62mv core/external .
63mv docs/* .
64
65# you'll need this if you cp -a complete dir in source
66# cleanup backups after patching
67find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
68
69%install
70rm -rf $RPM_BUILD_ROOT
71install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
72cp -a *.php application core $RPM_BUILD_ROOT%{_appdir}
73cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
74
75cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
76cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%post
82# cleanup cache from previous rpm
83echo %{cachedir}/* | xargs rm -f
84
85%preun
86if [ "$1" = 0 ]; then
87 echo %{cachedir}/* | xargs rm -f
88fi
89
90%triggerin -- apache1 < 1.3.37-3, apache1-base
91%webapp_register apache %{_webapp}
92
93%triggerun -- apache1 < 1.3.37-3, apache1-base
94%webapp_unregister apache %{_webapp}
95
96%triggerin -- apache-base
97%webapp_register httpd %{_webapp}
98
99%triggerun -- apache-base
100%webapp_unregister httpd %{_webapp}
101
102%files
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
109
110%dir %{_appdir}
111%{_appdir}/backupjob-report.php
112%{_appdir}/client-report.php
113%{_appdir}/index.php
114%{_appdir}/joblogs.php
115%{_appdir}/jobs.php
116%{_appdir}/pools.php
117%{_appdir}/test.php
118
119%dir %{_appdir}/core
120%{_appdir}/core/bweb.inc.php
121%{_appdir}/core/global.inc.php
122%{_appdir}/core/app
123%{_appdir}/core/db
124%{_appdir}/core/graph
125%{_appdir}/core/i18n
126%{_appdir}/core/utils
127
128%dir %{_appdir}/application
129%{_appdir}/application/libs
130%{_appdir}/application/models
131%{_appdir}/application/view
132
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
141
142%dir %attr(775,root,http) %{cachedir}
This page took 0.117453 seconds and 4 git commands to generate.