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