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