File sblim-cmpi-base-plus.spec of Package sblim-cmpi-base-plus
#
# spec file for package sblim-cmpi-base-plus (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-base-plus
BuildRequires: gcc pkgconfig sblim-cmpi-base sblim-cmpi-devel sblim-cmpiutil-devel sblim-sfcb
%define build_cimple_providers 0
%if 0%{?build_cimple_providers} == 1
BuildRequires: cimple-devel gcc-c++
Requires: cimple
%endif
Url: http://www.omc-project.org
# Increment the version every time the source code changes.
Version: 1.0.0
Release: 39
Group: System/Management
Summary: Additional SBLIM Base Instrumentation
PreReq: coreutils
License: BSD 3-Clause
# 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
Requires: sblim-cmpiutil
Requires: cim-server
Source0: %{name}-%{version}.tar.gz
Patch0: sblim-cmpi-base-plus-1.0.0-implicit-fortify-decl.patch
%description
Additional Standards Based Linux Instrumentation Base Providers
Authors:
--------
Norm Paxton
Jon Carey
Bart Whiteley
%prep
# Untar the sources.
%setup -q
%patch0
%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 --disable-static --with-pic
%{__make}
%install
%makeinstall
#install mof and reg files into /usr/share/<pkgname>
MOFDIR=$RPM_BUILD_ROOT/%{_datadir}/%{name}
install -d $MOFDIR
install mof/*.mof $MOFDIR/
install mof/*.registration $MOFDIR/
#remove unnecessary files
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +
%if 0%{?build_cimple_providers} == 0
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/libcmpi_*.so*
%endif
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%pre
# If upgrading/not new install/not removing, deregister old version
if [ $1 -gt 1 ]
then
%{_datadir}/sblim-cmpi-base/provider-register.sh -d -r %{_datadir}/%{name}/*.registration -m %{_datadir}/%{name}/*.mof
fi
%post
/sbin/ldconfig
# load MOF
%{_datadir}/sblim-cmpi-base/provider-register.sh -r %{_datadir}/%{name}/*.registration -m %{_datadir}/%{name}/*.mof
%preun
# if -e operation, not -U
#if remove/not an upgrade, then deregister
if [ "x$1" = "x0" ]; then
%{_datadir}/sblim-cmpi-base/provider-register.sh -d -r %{_datadir}/%{name}/*.registration -m %{_datadir}/%{name}/*.mof
fi
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/cmpi/*.so*
%if 0%{?build_cimple_providers}
%{_libdir}/libcmpi_*.so*
%endif
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%changelog
* Tue Mar 24 2009 crrodriguez@suse.de
- fix build
- use --disable-static instead of removing static libraries at %%install
* Fri Aug 29 2008 npaxton@novell.com
- Remove /usr/sbin/provider-register.sh from PreReq
* Mon Aug 25 2008 npaxton@novell.com
- Cleanup spec file (minor changes)
- Use provider-register.sh from /usr/share/sblim-cmpi-base, rather
than from /usr/sbin, as sblim-cmpi-base stopped providing it in
/usr/sbin.
* Mon Jul 14 2008 npaxton@novell.com
- Added sblim-sfcb to BuildRequires:
- sblim-cmpi-base (previous checkin) required for
/usr/sbin/provider-register.sh in pre/post scripts
- sblim-sfcb required because three different cimoms provide
'cim-server' so specifying for the build which to use
* Fri Jul 11 2008 npaxton@novell.com
- Added BuildRequires sblim-cmpi-base
* Fri Jul 11 2008 npaxton@novell.com
- Disable cimple providers until new cimple rpm is checked in
* Mon Jul 07 2008 npaxton@novell.com
- Initial revision