ganglia-web/ganglia-web.spec
Christian Goll 76b4ba8715 Accepting request 755206 from home:mslacken:branches:network:cluster
- updated to version 3.7.4  
- added patches for a global user config under /etc/ganglia/conf.d/ 
  and added download_js.sh which can download the external java 
  script libararies.
  * new file: 0001-added-of-download_js.patch which adds download_js.sh
  * new file: 0002-looking-for-systemwide-user-config.patch which 
    makes ganglia-web to serach for config in /etc/ganglia/conf.d/

OBS-URL: https://build.opensuse.org/request/show/755206
OBS-URL: https://build.opensuse.org/package/show/network:cluster/ganglia-web?expand=0&rev=16
2019-12-10 15:58:59 +00:00

92 lines
3.0 KiB
RPMSpec

#
# spec file for package ganglia-web
#
# Copyright (c) 2019 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define web_prefixdir /srv/www/htdocs/ganglia-web
Name: ganglia-web
Version: 3.7.4
Release: 0
Summary: Ganglia web frontend
License: BSD-3-Clause
Group: System/Monitoring
URL: http://ganglia.info/
Source0: ganglia-web-%{version}.tar.xz
Source1: ganglia-httpd24.conf.d
Source2: README.SUSE
Patch1: 0001-added-of-download_js.patch
Patch2: 0002-looking-for-systemwide-user-config.patch
BuildRequires: apache2
BuildRequires: fdupes
BuildRequires: rsync
Requires: apache2
Requires: mod_php_any
Requires: php
Requires: php-gd
Requires: php-xml
Requires: rrdtool
Recommends: ganglia-gmetad
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package provides a web frontend to display the XML tree published by
ganglia, and to provide historical graphs of collected metrics. This website is
written in the PHP5/7 language and uses the Dwoo templating engine.
%prep
%setup -q
%autopatch -p1
%build
cp %SOURCE2 .
%install
%{__sed} -i 's,www-data,abuild,' Makefile
%{__sed} -i 's,/usr/share/ganglia-webfrontend,%{buildroot}%{web_prefixdir},' Makefile
%{__sed} -i 's,WEBPATH,%{web_prefixdir},' %SOURCE1
%{__sed} -i 's,/etc/ganglia-web,%{buildroot}/etc/apache2/conf.d,' Makefile
%{__sed} -i 's,/var/lib/ganglia,%{buildroot}/var/lib/ganglia,' Makefile
make install
install -d %{buildroot}/etc/apache2/conf.d
install -m 644 %SOURCE1 %{buildroot}/etc/apache2/conf.d/%{name}.conf
mkdir -pv %{buildroot}%{_docdir}/%{name}/
cp -v download_js.sh %{buildroot}%{_docdir}/%{name}/download_js.sh
# fix suprious buildroot in config
%{__sed} -i 's@%{buildroot}@@' %{buildroot}/%{web_prefixdir}/conf_default.php
%fdupes %{buildroot}%{web_prefixdir}
%fdupes %{buildroot}%{_localstatedir}/lib/ganglia-web
%files
%defattr(-,root,root)
%doc AUTHORS TODO README README.SUSE
%{_docdir}/%{name}/download_js.sh
%license COPYING
%dir %{web_prefixdir}/
%dir %{web_prefixdir}/dwoo
%{web_prefixdir}/*
%config(noreplace) /etc/apache2/conf.d/%{name}.conf
%dir %{_localstatedir}/lib/ganglia-web
%{_localstatedir}/lib/ganglia-web/conf
%attr(0755,wwwrun,www)%{_localstatedir}/lib/%{name}/dwoo
%attr(0755,wwwrun,www)%{_localstatedir}/lib/%{name}/dwoo/compiled
%attr(0755,wwwrun,www)%{_localstatedir}/lib/%{name}/dwoo/cache
%changelog