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

#
# spec file for package sblim-cmpi-ethport_profile (Version 1.0.0)
#
# 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/
#

# norootforbuild


Name:           sblim-cmpi-ethport_profile
BuildRequires:  konkretcmpi sblim-cmpi-base sblim-cmpi-devel sblim-sfcb
Url:            http://www.omc-project.org
Summary:        CMPI CIM provider for ethernet port profile
Version:        1.0.0
Release:        40
License:        Any permissive
Group:          System/Management
Source:         %{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       sblim-sfcb sblim-cmpi-base
Conflicts:      sblim-cmpi-network

%description
CMPI CIM provider for ethernet port profile



Authors:
--------
    Mike Brasher

%prep
%setup -q

%build
autoreconf --force --install
CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
%configure --disable-static --with-pic
%{__make}

%install
%makeinstall
%{__make} %{?jobs:-j%jobs}
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} + 

%clean
rm -rf %{buildroot}

%pre
# If upgrading/not new install/not removing, deregister old version
if [ $1 -gt 1 ]
then
  sfcbunstage -n root/cimv2 -r linux-ethernet-port-profile.reg linux-ethernet-port-profile.mof
  sfcbunstage -n root/cimv2 linux-ethernet-port-profile-interop.mof
  sfcbunstage -n root/interop linux-ethernet-port-profile-interop.mof
  sfcbrepos -f
  /etc/init.d/sfcb condrestart
fi

%post
/sbin/ldconfig
sfcbstage -n root/cimv2 -r %{_datadir}/mof/%{name}/linux-ethernet-port-profile.reg %{_datadir}/mof/%{name}/linux-ethernet-port-profile.mof
sfcbstage -n root/cimv2 %{_datadir}/mof/%{name}/linux-ethernet-port-profile-interop.mof
sfcbstage -n root/interop %{_datadir}/mof/%{name}/linux-ethernet-port-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
  sfcbunstage -n root/cimv2 -r linux-ethernet-port-profile.reg linux-ethernet-port-profile.mof
  sfcbunstage -n root/cimv2 linux-ethernet-port-profile-interop.mof
  sfcbunstage -n root/interop linux-ethernet-port-profile-interop.mof
  sfcbrepos -f
  /etc/init.d/sfcb condrestart
fi

%postun -p /sbin/ldconfig

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

%changelog
* Wed Apr 15 2009 crrodriguez@suse.de
- use --disable-static instead of removing "*.a"
* Tue Jan 13 2009 npaxton@novell.com
- Add conflict for sblim-cmpi-network
* Wed Aug 13 2008 npaxton@novell.com
- Remove dependency on /usr/sbin/provider-register.sh from
  sblim-cmpi-base; instead use sfcb-specific calls:
  sfcbstage/sfcbunstage, sfcbrepos
- Rework of network interface discovery
- Fix some misnamed class references
- Rework to advertise classes appropriately in root/interop
  and root/cimv2
* Fri Jul 11 2008 npaxton@novell.com
- add sblim-cmpi-base as a BuildRequires, not just a Requires
* Fri Jul 11 2008 npaxton@novell.com
- mods to konkretcmpi broke this pkg; had to get updated svn code
  that matched updated konkret
* Wed Jul 02 2008 npaxton@novell.com
- Initial Checkin