]> git.pld-linux.org Git - packages/bacula-web.git/blobdiff - bacula-web.spec
Version: 6.0.0
[packages/bacula-web.git] / bacula-web.spec
index fb4174f2119cefa76f71f2c0ba976bcb8a6ff4c7..6cb5ee7b581c67213a1fafd3cc2599c4fded4344 100644 (file)
 # TODO
-# - package other GUI's:
-#   bimagemgr/ brestore/ bweb/
-Summary:       Bacula - The Network Backup Solution
-Summary(pl.UTF-8):     Bacula - rozwiązanie do wykonywania kopii zapasowych po sieci
-Name:          bacula-gui
-Version:       2.4.4
-Release:       0.11
-License:       Extended GPL v2
-Group:         Networking/Utilities
-Source0:       http://dl.sourceforge.net/bacula/%{name}-%{version}.tar.gz
-# Source0-md5: 1bf3cf1b9b51caaddf2468485044cd36
-Patch0:                bacula-web.patch
-Source1:       bacula-web.conf
-URL:           http://www.bacula.org/
-BuildRequires: rpmbuild(macros) >= 1.268
+# - lighttpd support
+%define                php_min_version 5.3.4
+%include       /usr/lib/rpm/macros.php
+Summary:       Open source monitoring and reporting tool for Bacula
+Name:          bacula-web
+Version:       6.0.0
+Release:       4
+License:       GPL v2
+Group:         Applications/WWW
+Source0:       http://www.bacula-web.org/download/articles/bacula-web-600.html?file=files/bacula-web.org/downloads/%{name}-%{version}.tgz
+# Source0-md5: 3e99f9626cf4329ce43947f11a9d8f49
+Source1:       apache.conf
+Patch0:                sys-libs.patch
+URL:           http://www.bacula-web.org/
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
+BuildRequires: rpmbuild(macros) >= 1.654
+BuildRequires: sed >= 4.0
+Requires:      Smarty
+Requires:      Smarty-plugin-gettext
+Requires:      php(core) >= %{php_min_version}
+Requires:      php(gd)
+Requires:      php(gettext)
+Requires:      php(pdo)
+Requires:      php(session)
+Requires:      phplot
+Requires:      webserver(php)
+# Any of the db drivers needed depending where you hold your Bacula DB
+Suggests:      php-pdo-mysql
+Suggests:      php-pdo-pgsql
+Suggests:      php-pdo-sqlite
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _webapps        /etc/webapps
-%define                _webapp         bacula-web
+%define                _webapp         %{name}
 %define                _sysconfdir     %{_webapps}/%{_webapp}
 %define                _appdir         %{_datadir}/%{_webapp}
-%define                _cachedir       /var/cache/%{_webapp}
+%define                cachedir        /var/cache/%{name}
 %define                _smartyplugindir        %{php_data_dir}/Smarty/plugins
-%define                _localedir              %{_datadir}/locale
-
-%description
-Bacula - It comes by night and sucks the vital essence from your
-computers.
 
-Sets of various Bacula GUIs.
+# bad depsolver
+%define                _noautopear     pear
+# put it together for rpmbuild
+%define                _noautoreq      %{?_noautophp} %{?_noautopear}
 
-%description -l pl.UTF-8
-Bacula przychodzi nocą i wysysa żywotny ekstrakt z komputerów.
-
-Zbiór różnych graficzych interfejsów do Baculi.
-
-%package -n bacula-web
-Summary:       A Bacula web interface
-Summary(pl.UTF-8):     Interfejs WWW do Baculi
-Group:         Applications/WWW
-Requires:      Smarty
-# system pkg phplot causes dead loop
-#Requires:     phplot
-Requires:      php-pear-DB
-Requires:      php-gd
-Requires:      smarty-gettext
-Requires:      webapps
-
-%description -n bacula-web
-Bacula web apps.
-
-%description -n bacula-web -l pl.UTF-8
-WWW dla Baculi.
+%description
+Bacula-Web is a web based tool written in PHP that provide you a
+summarized view of your bacula's backup infrastructure. It obtain his
+information from your bacula catalog's database.
 
 %prep
 %setup -q
 %patch0 -p1
 
-cd bacula-web
-install -d smarty-plugins
-mv external_packages/smarty/plugins/modifier.fsize_format.php smarty-plugins
-
-# system pkg causes dead loop, keep it up cleanup first
-mv external_packages/phplot .
-rm -rf phplot/{doc,examples,LICENSE*,ChangeLog,README}
+mv application/config .
+mv config/config.php{.sample,}
+%{__rm} application/locale/*/LC_MESSAGES/*.po
+%{__rm} -r application/view/cache
+mv core/external .
+mv DOCS/* .
 
-rm -rf templates_c external_packages configs/.htaccess test.php messages*.po array_fill.func.php
+# you'll need this if you cp -a complete dir in source
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{_cachedir},%{_smartyplugindir},%{_localedir}}
-
-cd bacula-web
-cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
-cp -a . $RPM_BUILD_ROOT%{_appdir}
-cp -a smarty-plugins/* $RPM_BUILD_ROOT%{_smartyplugindir}
-mv $RPM_BUILD_ROOT{%{_appdir}/configs/*,%{_sysconfdir}}
-rm $RPM_BUILD_ROOT%{_appdir}/{tsmarty2c.php,ChangeLog,CONTACT,README,TODO,COPYING}
-rm -rf $RPM_BUILD_ROOT%{_appdir}/{locale,smarty-plugins}
-for a in locale/*/LC_MESSAGES/*.mo; do
-       l=${a#locale/}; l=${l%/LC_MESSAGES/*.mo}
-       install -d $RPM_BUILD_ROOT%{_localedir}/$l/LC_MESSAGES
-       cp -a $a $RPM_BUILD_ROOT%{_localedir}/$l/LC_MESSAGES/bacula-web.mo
-       echo "%%lang($l) %{_localedir}/$l/LC_MESSAGES/bacula-web.mo" >> bacula-web.lang
-done
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{cachedir}}
+cp -a *.php application core $RPM_BUILD_ROOT%{_appdir}
+cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -n bacula-web
+%post
 # cleanup cache from previous rpm
-echo %{_cachedir}/*.tpl.php | xargs rm -f
+echo %{cachedir}/* | xargs rm -f
 
 %preun
 if [ "$1" = 0 ]; then
-       echo %{_cachedir}/*.tpl.php | xargs rm -f
+       echo %{cachedir}/* | xargs rm -f
 fi
 
-%triggerin -n bacula-web -- apache1 < 1.3.37-3, apache1-base
+%triggerin -- apache1 < 1.3.37-3, apache1-base
 %webapp_register apache %{_webapp}
 
-%triggerun -n bacula-web -- apache1 < 1.3.37-3, apache1-base
+%triggerun -- apache1 < 1.3.37-3, apache1-base
 %webapp_unregister apache %{_webapp}
 
-%triggerin -n bacula-web -- apache < 2.2.0, apache-base
+%triggerin -- apache < 2.2.0, apache-base
 %webapp_register httpd %{_webapp}
 
-%triggerun -n bacula-web -- apache < 2.2.0, apache-base
+%triggerun -- apache < 2.2.0, apache-base
 %webapp_unregister httpd %{_webapp}
 
-%files -n bacula-web -f bacula-web/bacula-web.lang
+%files
 %defattr(644,root,root,755)
-%doc bacula-web/{ChangeLog,CONTACT,README,TODO}
+%doc INSTALL README Changelog
 %dir %attr(750,root,http) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
-%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bacula.conf
-%{_appdir}
-%{_smartyplugindir}/*.php
-%dir %attr(730,root,http) %{_cachedir}
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
+
+%dir %{_appdir}
+%{_appdir}/backupjob-report.php
+%{_appdir}/client-report.php
+%{_appdir}/index.php
+%{_appdir}/joblogs.php
+%{_appdir}/jobs.php
+%{_appdir}/pools.php
+%{_appdir}/test.php
+
+%dir %{_appdir}/core
+%{_appdir}/core/bweb.class.php
+%{_appdir}/core/const.inc.php
+%{_appdir}/core/global.inc.php
+%{_appdir}/core/app
+%{_appdir}/core/db
+%{_appdir}/core/graph
+%{_appdir}/core/i18n
+%{_appdir}/core/utils
+
+%dir %{_appdir}/application
+%{_appdir}/application/libs
+%{_appdir}/application/models
+%{_appdir}/application/view
+
+%dir %{_appdir}/application/locale
+%lang(de) %{_appdir}/application/locale/de_DE
+%lang(en) %{_appdir}/application/locale/en_EN
+%lang(es) %{_appdir}/application/locale/es_ES
+%lang(fr) %{_appdir}/application/locale/fr_FR
+%lang(it) %{_appdir}/application/locale/it_IT
+%lang(nl) %{_appdir}/application/locale/nl_NL
+%lang(pt_BR) %{_appdir}/application/locale/pt_BR
+%lang(sv) %{_appdir}/application/locale/sv_SV
+
+%dir %attr(775,root,http) %{cachedir}
This page took 0.08644 seconds and 4 git commands to generate.