File sblim-cmpi-fsvol.spec of Package sblim-cmpi-fsvol

#
# spec file for package sblim-cmpi-fsvol (Version 1.5.0)
#
# Copyright (c) 2010 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-cmpi-fsvol
BuildRequires:  gcc-c++ sblim-cmpi-base-devel sblim-cmpi-devel sblim-indication_helper-devel sblim-sfcb sblim-testsuite
Version:        1.5.0
Release:        2
Group:          System/Management
License:        Eclipse Public License
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       sblim-cmpi-base, cim-server
Url:            http://sblim.wiki.sourceforge.net/
Source:         http://prdownloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
Summary:        SBLIM File System & Volume Mgmt. Instrumentation for CMPI
#!BuildIgnore:  tog-pegasus

%description
The Filesystem & Volume Management Instrumentation allows you to get
information about mounted ( /etc/mtab ) and unmounted ( /etc/fstab )
filesystems via CIMOM technology/infrastructure.

Authors:
--------
    SBLIM Project

%package devel
License:        Eclipse Public License
Summary:        SBLIM File System & Volume Mgmt. Instrumentation Header Development Files
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
SBLIM File System & Volume Mgmt. Provider Development Package

Authors:
--------
    SBLIM Project

%package testsuite
License:        Eclipse Public License 1.0
Summary:        SBLIM File System & Volume Mgmt. Instrumentation (test suite)
Group:          System/Management
Requires:       %{name} = %{version}
Requires:       sblim-testsuite

%description testsuite
Test suite for the Standards Based Linux Instrumentation File System & Volume Mgmt. Providers

Authors:
--------
    SBLIM Project


%prep
%setup -n %{name}-%{version}

%build
%configure TESTSUITEDIR=%{_datadir}/sblim-testsuite --disable-static
%{__make}

%install
%makeinstall docdir=%{_docdir}/%{name}
#rm %buildroot%_libdir/cmpi/*.la
#rm %buildroot%_libdir/*.la

%clean
%{__rm} -rf %{buildroot}
%define PEGASUS_MOF CIM_UnixLocalFileSystem,CIM_NFS,CIM_HostedFileSystem,CIM_BootOSFromFS

%pre
if [ "$1" -gt 1 ]; then
  d=%{_datadir}/%{name}
  $d/provider-register.sh -d -r $d/*.registration -m $d/*.mof
fi

%post
# compile MOF
/sbin/ldconfig
# Register Schema and Provider - this is higly provider specific  
# tog-pegasus needs some schemes registered first  
if [ -x /usr/bin/peg-loadmof.sh ]; then  
    peg-loadmof.sh -n root/cimv2 /usr/share/mof/cim-current/*/{%{PEGASUS_MOF}}.mof  
    rctog-pegasus try-restart  
fi  
# and then following script can handle registration for various providers  
d=%{_datadir}/%{name}
$d/provider-register.sh -r $d/*.registration -m $d/*.mof

%preun
if [ "$1" = "0" ]; then
  d=%{_datadir}/%{name}
  $d/provider-register.sh -d -r $d/*.registration -m $d/*.mof
fi

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root) 
%{_libdir}/cmpi/*.so
%{_libdir}/cmpi/*.la
%{_libdir}/*.la
%{_libdir}/*.so.*
%doc %{_docdir}/%{name}
%dir %{_datadir}/%{name}/
%{_datadir}/%{name}/

%files devel
%defattr(-,root,root) 
%{_libdir}/*.so
%{_includedir}/sblim/*.h

%files testsuite
%defattr(-,root,root)
%dir %{_datadir}/sblim-testsuite
%{_datadir}/sblim-testsuite/*

%changelog