File ganglia-monitor-core.spec of Package ganglia-monitor-core

#
# spec file for package ganglia-monitor-core (Version 2.5.7)
#
# Copyright (c) 2009 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/
#



Name:           ganglia-monitor-core
BuildRequires:  freetype2-devel libart_lgpl-devel libpng-devel
%if 0%{?suse_version} >= 1030
BuildRequires:  rrdtool-devel
%else
BuildRequires:  rrdtool
%endif
BuildRequires:  autoconf automake libtool pkgconfig
Url:            http://ganglia.sourceforge.net
Summary:        Scalable Distributed Monitoring System
Version:        2.5.7
%define soname  1
Release:        180
License:        MIT
Group:          System/Monitoring
Source:         ganglia-monitor-core-%{version}.tar.gz
Source1:        ganglia_docs.tar.bz2
Source2:        ganglia-webfrontend-%{version}.tar.gz
Patch:          ganglia-monitor-core-%{version}-init.dif
Patch1:         includefiles.patch
Patch2:         ganglia-monitor-core-%{version}-pageshift.patch
Patch3:         ganglia-monitor-core-umask.patch
Patch4:         ganglia-monitor-core.dif
Patch5:         ganglia-monitor-core-%{version}-gcc4.patch
Patch6:         warn.diff
Patch7:         ganglia-monitor-core-2.5.7_sysconf_hz.patch
Patch8:         ganglia-monitor-core-2.5.7_missing_includes.patch
Patch9:         ganglia-monitor-core-2.5.7_strncat_usage.patch
Patch10:        ganglia-monitor-core-buildroot.patch
PreReq:         /bin/sed %insserv_prereq %fillup_prereq /usr/bin/tr
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package -n libganglia%{soname}
Summary:        Scalable distributed monitoring system
Group:          System/Libraries

%package -n libganglia%{soname}-docs
Summary:        Scalable distributed monitoring system
Group:          Documentation/Other

%package gmetad
License:        MIT
Summary:        Scalable distributed monitoring system
Group:          System/Monitoring
Requires:       http_daemon

%package gmond
License:        MIT
Summary:        Scalable distributed monitoring system
Group:          System/Monitoring
Requires:       http_daemon

%package -n ganglia-webfrontend
License:        MIT
Summary:        Scalable distributed monitoring system
Group:          System/Monitoring
Requires:       ganglia-monitor-core, http_daemon

%package devel
License:        MIT
Summary:        Libraries and header files for Ganglia
Group:          System/Monitoring
Requires:       libganglia%{soname} = %{version}

%description
Ganglia is a scalable distributed monitoring system for
high-performance computing systems, such as clusters and grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor the
state within clusters and uses a tree of point-to-point connections
among representative cluster nodes to federate clusters and aggregate
their state. It leverages widely-used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.

%description -n libganglia%{soname}
Ganglia is a scalable distributed monitoring system for
high-performance computing systems, such as clusters and grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor the
state within clusters and uses a tree of point-to-point connections
among representative cluster nodes to federate clusters and aggregate
their state. It leverages widely-used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.

%description -n libganglia%{soname}-docs
Ganglia is a scalable distributed monitoring system for
high-performance computing systems, such as clusters and grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor the
state within clusters and uses a tree of point-to-point connections
among representative cluster nodes to federate clusters and aggregate
their state. It leverages widely-used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.

%description gmetad
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.

%description gmond
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.

%description -n ganglia-webfrontend
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.

%description devel
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.

%prep 
%setup -q -a 1 -a 2
%patch
#%patch1
%patch2
%patch3
%patch4
%patch5 -p1
%patch6
%patch7
%patch8
%patch9
%patch10

%build
autoreconf --install --force
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure --with-gmetad --enable-gexec
%__make %{?_smp_mflags}

%install
install -d  $RPM_BUILD_ROOT/etc/init.d
install -d  $RPM_BUILD_ROOT/usr/sbin
install -m 0755 gmond/gmond.init $RPM_BUILD_ROOT/etc/init.d/gmond
install -m 0755 gmetad/gmetad.init $RPM_BUILD_ROOT/etc/init.d/gmetad
(
cd $RPM_BUILD_ROOT/usr/sbin;
ln -sf ../../etc/init.d/gmond rcgmond
ln -sf ../../etc/init.d/gmetad rcgmetad
)
install -d  $RPM_BUILD_ROOT/usr/include/ganglia
install -d  $RPM_BUILD_ROOT/var/lib/ganglia/rrds
install -m 0644  gmond/gmond.conf $RPM_BUILD_ROOT/etc/gmond.conf
install -m 0644 gmetad/gmetad.conf $RPM_BUILD_ROOT/etc/gmetad.conf
make DESTDIR=$RPM_BUILD_ROOT install 
install -d  $RPM_BUILD_ROOT/srv/www/htdocs/ganglia-webfrontend
cp -a ganglia-webfrontend-%{version}/* $RPM_BUILD_ROOT/srv/www/htdocs/ganglia-webfrontend/

%__install -d "%{buildroot}%{_docdir}/libganglia%{soname}"
%__cp -a ganglia_docs/* "%{buildroot}%{_docdir}/libganglia%{soname}/"
%__cp -a README AUTHORS COPYING ChangeLog NEWS "%{buildroot}%{_docdir}/libganglia%{soname}/"

%post   -n libganglia%{soname} -p /sbin/ldconfig
%postun -n libganglia%{soname} -p /sbin/ldconfig

%post gmond
%{fillup_and_insserv -f gmond}

%post gmetad
%{fillup_and_insserv -f gmetad}

%preun gmetad
%insserv_cleanup

%preun gmond
%insserv_cleanup

%files -n libganglia%{soname}
%defattr(-,root,root)
%dir %doc %{_docdir}/libganglia%{soname}
%doc %{_docdir}/libganglia%{soname}/COPYING
%doc %{_docdir}/libganglia%{soname}/README
%doc %{_docdir}/libganglia%{soname}/AUTHORS
%{_libdir}/libganglia.so.%{soname}
%{_libdir}/libganglia.so.%{soname}.*

%files -n libganglia%{soname}-docs
%defattr(-,root,root)
%dir %doc %{_docdir}/libganglia%{soname}
%doc %{_docdir}/libganglia%{soname}/*
%exclude %{_docdir}/libganglia%{soname}/COPYING
%exclude %{_docdir}/libganglia%{soname}/README
%exclude %{_docdir}/libganglia%{soname}/AUTHORS

%files gmond
%defattr(-,root,root)
/etc/init.d/gmond
%{_sbindir}/gmond
/usr/sbin/rcgmond
%config /etc/gmond.conf
%attr(0500,root,root)/usr/bin/gmetric
%attr(0555,root,root)/usr/bin/gstat

%files gmetad
%defattr(-,root,root)
%config /etc/gmetad.conf
/usr/sbin/gmetad
/usr/sbin/rcgmetad
/etc/init.d/gmetad
%dir /var/lib/ganglia
%attr(0755,nobody,nobody)/var/lib/ganglia/rrds

%files devel
%defattr(-,root,root)
/usr/include/ganglia.h
%dir /usr/include/ganglia
/usr/include/ganglia/*
/usr/%_lib/libganglia.so
/usr/%_lib/libganglia.a
/usr/%_lib/libganglia.la

%files -n ganglia-webfrontend
%defattr(-,root,root)
%dir /srv/www/htdocs/ganglia-webfrontend
/srv/www/htdocs/ganglia-webfrontend/*

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%changelog
openSUSE Build Service is sponsored by