File sblim-gather.spec of Package sblim-gather
#
# spec file for package sblim-gather
#
# Copyright (c) 2011 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/
#
# norootforbuild
Name: sblim-gather
BuildRequires: gcc-c++ libvirt-devel openssl-devel pam-devel sblim-cmpi-base-devel sblim-indication_helper-devel sblim-testsuite
%if 0%{?rhel_version} == 0
BuildRequires: openslp-devel
%endif
BuildRequires: glib2-devel
%if 0%{?suse_version}
BuildRequires: pkg-config
%if 0%{?suse_version} > 1130
BuildRequires: sysfsutils-devel
%else
BuildRequires: sysfsutils
%endif
%else
BuildRequires: pkgconfig
BuildRequires: libsysfs-devel
%endif
Url: http://sblim.wiki.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: SBLIM Performance Data Gatherer and Provider
Version: 2.2.3
Release: 6
Group: System/Management
License: IBM PL
Source0: http://prdownloads.sourceforge.net/sblim/sblim-gather-%{version}.tar.bz2
Patch1: sblim-gather-2.1.8_pointers.patch
Patch3: sblim-gather-2.2.2-redefinition.patch
Patch4: sblim-gather-2.2.3-initstyle.patch
Provides: sblim-gather-pluginz = %{version}
Requires(pre): cim-server
BuildRequires: -tog-pegasus
%description
The purpose of this package is to implement the DMTF CIM Metrics Model
for Linux, making it available via a CIMOM supporting/supported by the
CMPI provider interface.
While the Gatherer and it's plugins can be used standalone, the
greatest benefit comes from using it in conjuction with a CIM Object
Manager (CIMOM) like Pegasus (The Open Group). Basically it allows to
remoteley obtain performance information about a Linux system. For more
information about CIM and the CIM Metrics Model you are referred to the
Distributed Management Task Force (DMTF) at http://www.dmtf.org.
This package is containing the agents and control programs which can be
deployed stand-alone.
Authors:
--------
SBLIM Project
%package provider
License: IBM PL
Summary: SBLIM Gatherer Provider
Group: System/Management
Requires: %{name} = %{version}
Requires: cim-server
Requires: sblim-cmpi-base
Provides: sblim-gather-pluginz-provider = %{version}
%description provider
This package is containing the CIM Providers for the SBLIM Gatherer.
Authors:
--------
SBLIM Project
%package devel
License: IBM PL
Summary: SBLIM Gatherer Development Support
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
This package is needed to develop new plugins for the gatherer.
Authors:
--------
SBLIM Project
%package test
License: IBM PL
Summary: SBLIM Gatherer Testcase Files
Group: System/Management
Requires: %{name} = %{version}
Requires: %{name}-provider = %{version}
Requires: sblim-testsuite
%description test
SBLIM Gatherer Testcase Files for the SBLIM Testsuite
Authors:
--------
SBLIM Project
%prep
%setup -n %{name}-%{version}
%patch1
%patch3 -p1
%patch4 -p1
%build
autoreconf -fi
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure --enable-z
%{__make}
%install
%if 0%{?suse_version}
%makeinstall docdir=%{_docdir}/%{name}
%else
make install DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-%{version}
%endif
find %{buildroot} -type f -name \*.la -print0 -delete
%clean
%{__rm} -rf %{buildroot}
%define MOF Linux_IPProtocolEndpointMetric,Linux_LocalFileSystemMetric,Linux_Metric,Linux_NetworkPortMetric,Linux_OperatingSystemMetric,Linux_ProcessorMetric,Linux_UnixProcessMetric,Linux_XenMetric,Linux_zCECMetric,Linux_zCHMetric,Linux_zECKDMetric,Linux_zLPARMetric
%post provider
# compile MOF
d=%_datadir/%name
$d/provider-register.sh -t sfcb -r $d/{%{MOF}}.registration -m $d/{%{MOF}}.mof
%preun provider
if [ "$1" = "0" ]; then
d=%_datadir/%name
$d/provider-register.sh -t sfcb -d -r $d/{%{MOF}}.registration -m $d/{%{MOF}}.mof
fi
%postun provider -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/gatherd.conf
%config(noreplace) %{_sysconfdir}/reposd.conf
%{_sysconfdir}/init.d/gatherer
%{_localstatedir}/run/gather
%{_bindir}/*
%{_sbindir}/*
%if 0%{?suse_version}
%doc %{_docdir}/%{name}
%else
%doc %{_docdir}/%{name}-%{version}
%endif
%dir %{_libdir}/gather
%dir %{_libdir}/gather/mplug
%dir %{_libdir}/gather/rplug
%{_libdir}/gather/mplug/*.so
%{_libdir}/gather/rplug/*.so
%{_libdir}/*.so.*
%exclude %{_libdir}/libOSBase_MetricUtil.so
%files provider
%defattr(-,root,root,-)
%{_libdir}/cmpi/*.so
%{_libdir}/libOSBase_MetricUtil.so
%dir %{_libdir}/gather/cplug
%{_libdir}/gather/cplug/*.so
%{_datadir}/%{name}
%files devel
%defattr(-,root,root,-)
%{_includedir}/gather
%{_libdir}/libgather.so
%{_libdir}/libmcserv.so
%{_libdir}/librcserv.so
%{_libdir}/librepos.so
%{_libdir}/librgather.so
%{_libdir}/librrepos.so
%{_libdir}/libhypfs.so
%{_libdir}/liblparutil.so
%{_libdir}/libsysfswrapper.so
%{_libdir}/libchannelutil.so
%{_libdir}/libgatherutil.so
%files test
%defattr(-,root,root,-)
%{_datadir}/sblim-testsuite/*
%changelog