File sblim-cmpi-boot_control_profile.spec of Package sblim-cmpi-boot_control_profile
#
# spec file for package sblim-cmpi-boot_control_profile
#
# Copyright (c) 2013 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-boot_control_profile
BuildRequires: konkretcmpi
BuildRequires: sblim-cmpi-base
BuildRequires: sblim-cmpi-devel
BuildRequires: sblim-cmpiutil-devel
BuildRequires: sblim-sfcb
Url: http://www.omc-project.org
Summary: Instrumentation for DMTF Boot Control Profile
License: EPL-1.0
Group: System/Management
Version: 1.0.0
Release: 0
Source: %{name}-%{version}.tar.gz
Patch1: sblim-overflow.patch
#PreReq: /usr/sbin/provider-register.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: sblim-cmpi-base
Requires: sblim-sfcb
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%{?systemd_requires}
%endif
%description
Linux providers for instrumentation of DMTF Boot Control Profile (DSP
1012)
Authors:
--------
Norm Paxton
Bart Whiteley
Michael E. Brasher
%prep
%setup -q
%patch1 -p0
%build
CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
%configure --disable-static --with-pic
%{__make} %{?jobs:-j%jobs}
#{__make}
%install
%makeinstall
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
# /usr/sbin/provider-register.sh -d -r %{_datadir}/mof/%{name}/*.registration -m %{_datadir}/mof/%{name}/*.mof
sfcbunstage -n root/cimv2 -r linux-boot-control-profile.reg linux-boot-control-profile.mof
sfcbunstage -n root/cimv2 linux-boot-control-profile-interop.mof
sfcbunstage -n root/interop linux-boot-control-profile-interop.mof
sfcbrepos -f
%if 0%{?suse_version} >= 1210
systemctl condrestart sfcbd.service >/dev/null 2>&1 || :
%else
/etc/init.d/sfcb condrestart
%endif
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-boot-control-profile.reg %{_datadir}/mof/%{name}/linux-boot-control-profile.mof
sfcbstage -n root/cimv2 %{_datadir}/mof/%{name}/linux-boot-control-profile-interop.mof
sfcbstage -n root/interop %{_datadir}/mof/%{name}/linux-boot-control-profile-interop.mof
sfcbrepos -f
%if 0%{?suse_version} >= 1210
systemctl condrestart sfcbd.service >/dev/null 2>&1 || :
%else
/etc/init.d/sfcb condrestart
%endif
%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-boot-control-profile.reg linux-boot-control-profile.mof
sfcbunstage -n root/cimv2 linux-boot-control-profile-interop.mof
sfcbunstage -n root/interop linux-boot-control-profile-interop.mof
sfcbrepos -f
%if 0%{?suse_version} >= 1210
systemctl condrestart sfcbd.service >/dev/null 2>&1 || :
%else
/etc/init.d/sfcb condrestart
%endif
fi
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/cmpi/lib*.so*
%dir %{_datadir}/mof/%{name}
%{_datadir}/mof/%{name}/*
%changelog