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

#
# spec file for package sblim-cmpi-fan_profile (Version 1.0.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           sblim-cmpi-fan_profile
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  konkretcmpi
BuildRequires:  libtool
BuildRequires:  sblim-cmpiutil-devel
BuildRequires:  sblim-cmpi-devel
BuildRequires:  sblim-sfcb
BuildRequires:  sblim-cmpi-base
Url:            http://www.omc-project.org
# Increment the version every time the source code changes.
Version:        1.0.0
Release:        1.2
Group:          System/Management

Summary:        Instrumentation for DMTF SSH Service Profile.
License:        EPL-1.0
# This is necessary to build the RPM as a non-root user.
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# "yes" is the default, but we put it here explicitly to avoid someone
# setting it to "no"
AutoReqProv:    yes
#PreReq:         /usr/sbin/provider-register.sh
Requires:       sblim-sfcb sblim-cmpi-base
Requires:       cim-schema >= 2.17
Source0:        %{name}-%{version}.tar.gz

%description
Linux providers for instrumentation of DMTF SSH Service Profile (DSP
1017)



Authors:
--------
    Bart Whiteley
    Norm Paxton
    Mike Brasher

%prep
# Untar the sources.
%setup -n sblim-cmpi-fan_profile-%{version}

%build
# If the LD_RUN_PATH environment variable is set at link time,
# it's value is embedded in the resulting binary.  At run time,
# The binary will look here first for shared libraries.  This way
# we link against the libraries we want at run-time even if libs
# by the same name are in /usr/lib or some other path in /etc/ld.so.conf
autoreconf --force --install
CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
%configure
%{__make}

%install
# Tell 'make install' to install into the BuildRoot
%makeinstall
%{__rm} -f $RPM_BUILD_ROOT/%{_libdir}/*.{a,la}  
%{__rm} -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*.{a,la} 

%clean

%pre
# If upgrading/not new install/not removing, deregister old version
if [ $1 -gt 1 ]
then
#  /usr/sbin/provider-register.sh -d -r %{_datadir}/mof/%{name}/*.registration -m %{_datadir}/mof/%{name}/*.mof
  sfcbunstage -n root/cimv2 -r linux-fan-profile.reg linux-fan-profile.mof
  sfcbunstage -n root/cimv2 linux-fan-profile-interop.mof
  sfcbunstage -n root/interop linux-fan-profile-interop.mof
  sfcbrepos -f
  /etc/init.d/sfcb condrestart
fi

%post
/sbin/ldconfig
#/usr/sbin/provider-register.sh -r %{_datadir}/mof/%{name}/*.registration -m %{_datadir}/mof/%{name}/*.mof
sfcbstage -n root/cimv2 -r %{_datadir}/mof/%{name}/linux-fan-profile.reg %{_datadir}/mof/%{name}/linux-fan-profile.mof
sfcbstage -n root/cimv2 %{_datadir}/mof/%{name}/linux-fan-profile-interop.mof
sfcbstage -n root/interop %{_datadir}/mof/%{name}/linux-fan-profile-interop.mof
sfcbrepos -f
/etc/init.d/sfcb condrestart

%preun
# If removing (not upgrading) then de-register, before the files are gone
if [ "x$1" = "x0" ]; then
#  /usr/sbin/provider-register.sh -d -r %{_datadir}/mof/%{name}/*.registration -m %{_datadir}/mof/%{name}/*.mof
  sfcbunstage -n root/cimv2 -r linux-fan-profile.reg linux-fan-profile.mof
  sfcbunstage -n root/cimv2 linux-fan-profile-interop.mof
  sfcbunstage -n root/interop linux-fan-profile-interop.mof
  sfcbrepos -f
  /etc/init.d/sfcb condrestart
fi

%postun -p /sbin/ldconfig

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

%changelog
* Mon Jul 07 2008 - npaxton@novell.com
- Initial revision
openSUSE Build Service is sponsored by