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