2 # - fails to work if some %lang file not installed
3 # - does not work with baucla 5.2:
4 # PHP Fatal error: Uncaught exception 'Zend_Exception' with message 'Version error for Catalog database (wanted 12, got 14) ' in /usr/share/webacula/html/index.php:183\nStack trace:\n#0 {main}\n thrown in /usr/share/webacula/html/index.php on line 183
5 %define php_min_version 5.2.4
6 # - Requires: /bin/bash
7 Summary: Web interface of a Bacula backup system
8 Summary(ru.UTF-8): Веб интерфейс для Bacula backup system
13 Group: Applications/WWW
14 URL: http://webacula.sourceforge.net/
15 Source0: http://downloads.sourceforge.net/webacula/%{name}-%{version}.tar.gz
16 # Source0-md5: d7f5256247836ddc663a6313e3c019d2
17 BuildRequires: rpm-php-pearprov >= 4.4.2-11
18 BuildRequires: rpmbuild(macros) >= 1.268
19 BuildRequires: sed >= 4.0
20 Requires: ZendFramework >= 1.8.3
21 Requires: bacula-console >= 5.0
22 Requires: php(core) >= %{php_min_version}
31 Requires: webserver(php) >= 5.2.4
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _webapps /etc/webapps
36 %define _webapp %{name}
37 %define _sysconfdir %{_webapps}/%{_webapp}
38 %define _appdir %{_datadir}/%{_webapp}
41 Webacula - Web Bacula - web interface of a Bacula backup system.
42 Supports the run Job, restore all files or selected files, restore the
43 most recent backup for a client, restore backup for a client before a
44 specified time, mount/umount Storages, show scheduled, running and
45 terminated Jobs and more. Supported languages: English, French,
46 German, Italian, Portuguese Brazil, Russian.
48 %description -l ru.UTF-8
49 Webacula - Web Bacula - веб интерфейс для Bacula backup system.
50 Поддерживает запуск Заданий, восстановление всех или выбранных файлов,
51 восстановление самого свежего бэкапа для клиента, восстановление
52 бэкапа для клиента сделанного перед указанным временем,
53 монтирование/размонтирование Хранилищ, показ запланированных,
54 выполняющихся и завершенных Заданий и прочее. Поддерживаемые языки:
55 английский, французский, немецкий, итальянский, бразильский
56 португальский, русский.
60 #%{__rm} application/.htaccess
61 %{__rm} html/test_mod_rewrite/.htaccess
62 %{__rm} html/.htaccess
63 %{__rm} install/.htaccess
64 %{__rm} languages/.htaccess
65 %{__rm} application/.htaccess
66 %{__rm} docs/.htaccess
68 %{__rm} application/config.ini.original
70 %{__rm} languages/*/*.po
72 # php 5.3 specific __DIR__ can be easily backported
73 %{__sed} -i -e 's#__DIR__#dirname(__FILE__)#g' html/index.php
76 rm -rf $RPM_BUILD_ROOT
78 $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}/{application,html,languages,library,install}} \
79 $RPM_BUILD_ROOT/etc/cron.daily \
81 cp -a application html languages library install $RPM_BUILD_ROOT%{_appdir}
83 mv $RPM_BUILD_ROOT{%{_appdir}/application,%{_sysconfdir}}/config.ini
84 ln -s %{_sysconfdir}/config.ini $RPM_BUILD_ROOT%{_appdir}/application
85 mv $RPM_BUILD_ROOT{%{_appdir}/install/apache/webacula.conf,%{_sysconfdir}/apache.conf}
86 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
87 #mv $RPM_BUILD_ROOT{%{_appdir}/install,/etc/cron.daily}/webacula_clean_tmp_files.sh
90 rm -rf $RPM_BUILD_ROOT
92 %triggerin -- apache1 < 1.3.37-3, apache1-base
93 %webapp_register apache %{_webapp}
95 %triggerun -- apache1 < 1.3.37-3, apache1-base
96 %webapp_unregister apache %{_webapp}
98 %triggerin -- apache < 2.2.0, apache-base
99 %webapp_register httpd %{_webapp}
101 %triggerun -- apache < 2.2.0, apache-base
102 %webapp_unregister httpd %{_webapp}
105 %defattr(644,root,root,755)
106 %doc 4CONTRIBUTORS 4CONTRIBUTORS.ru AUTHORS COPYING README UPDATE ChangeLog
108 %dir %attr(750,root,http) %{_sysconfdir}
109 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
110 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
111 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.ini
112 #%attr(755,root,root) /etc/cron.daily/webacula_clean_tmp_files.sh
114 %{_appdir}/application
118 %dir %{_appdir}/languages
119 %lang(de) %{_appdir}/languages/de
120 %lang(en) %{_appdir}/languages/en
121 %lang(fr) %{_appdir}/languages/fr
122 %lang(pt) %{_appdir}/languages/pt
123 %lang(ru) %{_appdir}/languages/ru
124 %lang(it) %{_appdir}/languages/it
125 %lang(es) %{_appdir}/languages/es
126 %lang(cs) %{_appdir}/languages/cs