File sblim-cmpi-smbios.spec of Package sblim-cmpi-smbios
#
# spec file for package sblim-cmpi-smbios (Version 0.3.2)
#
# 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/
#
Name: sblim-cmpi-smbios
Version: 0.3.2
Release: 0
Group: System/Management
Summary: SBLIM SMBIOS Instrumentation
License: CPL-1.0
Url: http://sblim.wiki.sourceforge.net/
BuildRequires: sblim-cmpi-devel sblim-sfcb gcc-c++
Requires: cim-server cim-schema
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: http://sourceforge.net/projects/sblim/files/sblim-cmpi-smbios/%{version}/%{name}-%{version}.tar.gz
Source1: provider-register.sh
Source2: LinuxBIOS.registration
Patch1: 0001-build-with-rpm_opt_flags.patch
Patch2: 0002-cope-with-lib64.patch
Patch3: 0003-add-default-to-switch.patch
Patch4: 0004-fix-printf-format.patch
Patch5: 0005-fix-argument-constness.patch
#!BuildIgnore: tog-pegasus
%Description
Standards Based Linux Instrumentation System Management BIOS Providers. The
BIOS Instrumentation allows to get BIOS inventory information about a system
remotely via a CIMOM . These providers will function only on x86 architecture
for the moment .
Authors:
--------
SBLIM Project
%prep
%setup -n %{name}-%{version}
%patch -P1 -p1
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
%patch -P5 -p1
%build
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
make STANDALONE=1 LIBDIR=%{_lib} RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
%clean
%{__rm} -rf "$RPM_BUILD_ROOT"
%install
mkdir -p "$RPM_BUILD_ROOT/%{_datadir}/cmpi/mof"
mkdir -p "$RPM_BUILD_ROOT/%{_libdir}/cmpi"
make install INSTALL_ROOT="$RPM_BUILD_ROOT" STANDALONE=1 LIBDIR=%{_lib}
mv "$RPM_BUILD_ROOT/%{_datadir}/cmpi/mof" "$RPM_BUILD_ROOT/%{_datadir}/%{name}"
rmdir "$RPM_BUILD_ROOT/%{_datadir}/cmpi"
rm "$RPM_BUILD_ROOT/%{_datadir}/%{name}/"*Registration.mof
install -D -m 0755 %{S:1} "$RPM_BUILD_ROOT/%{_datadir}/%{name}"
install -D -m 0644 %{S:2} "$RPM_BUILD_ROOT/%{_datadir}/%{name}"
%post
# compile MOF
/sbin/ldconfig
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}/*.so
%dir %{_libdir}/cmpi
%{_libdir}/cmpi/*.so
%{_datadir}/%{name}
%changelog