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