File bacula-web.spec of Package bacula-web
#
# spec file for package bacula-web
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define serverroot %(/usr/sbin/apxs2 -q datadir 2>/dev/null || /usr/sbin/apxs2 -q PREFIX)/htdocs/
Name: bacula-web
Version: 7.4.0
Release: 1
Summary: The open source web based reporting and monitoring tool for Bacula
Group: Productivity/Archiving/Backup
License: GPL-2.0
Url: http://www.bacula-web.org/
Provides: %{name}-%{version}
Source: http://www.bacula-web.org/files/bacula-web.org/downloads/%{version}/%{name}-%{version}.tgz
Source99: %{name}.rpmlintrc
Patch: tsmarty.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
BuildArch: noarch
Requires: php-mysql
Requires: php-pgsql
%if 0%{?suse_version}
Requires: php-pear-db
Requires: mod_php_any >= 5.4
Requires: php-bz2
Requires: php-gd
Requires: php-gettext
BuildRequires: apache2-devel
BuildRequires: libapr-util1-devel
%endif
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
Requires: php-pear-DB
BuildRequires: httpd-devel apr-devel
%define serverroot /var/www/htdocs/
%endif
%description
Bacula-Web is an open source (GPL v 2.0 license) tool which is part of the Bacula community project.
The main advantages of Bacula-Web are the simplicity of installation, easy to configure and it's totally web based
without needing local fat client install, configure and upgrades.
Bacula-Web provide you with a lot of informations about your last backup jobs, restore jobs, volumes, pools and so on ...
%prep
%setup -c -n %{name}-%{version}
%patch -p 1
# rpmlint: fix incorrect-fsf-address
find . -type f | xargs sed -i -e 's:59 Temple Place\, Suite 330\, Boston\, MA 02111-1307 USA:51 Franklin Street\, Fifth Floor\, Boston\, MA 02110-1301 USA:g'
%build
%install
%{__install} -m 755 -d $RPM_BUILD_ROOT%{serverroot}%{name}
%{__cp} -dR * $RPM_BUILD_ROOT%{serverroot}%{name}
%clean
rm -rf $RPM_BUILD_ROOT
#%%post
#%%postun
%files
%defattr(0644,root,root,0755)
%doc docs/COPYING docs/Changelog
%{serverroot}%{name}
%changelog