File sblim-cmpi-dhcp.spec of Package sblim-cmpi-dhcp
#
# spec file for package sblim-cmpi-dhcp
#
# Copyright (c) 2011 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-dhcp
Url: http://sblim.sourceforge.net/wbemsmt.html
BuildRequires: bison flex libtool
BuildRequires: sblim-cmpi-base-devel sblim-cmpi-devel sblim-testsuite sblim-tools-libra-devel
Summary: SBLIM CMPI dhcp Instrumentation
Version: 1.0
Release: 0
Group: System/Management
License: EPL-1.0
Requires: sblim-cmpi-base >= 1.2.3, cim-server
Source: http://prdownloads.sourceforge.net/sblim/sblim-cmpi-dhcp-%{version}.tar.bz2
Patch1: %{name}-%{version}-interopnamespace.patch
Patch2: %{name}-%{version}-automake.patch
Patch3: sblim-cmpi-dhcp-fix-build-gcc-werror.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: sblim-sfcb
#!BuildIgnore: tog-pegasus
%description
Standards Based Linux dhcp Instrumentation Providers
Authors:
--------
SBLIM Project
%prep
%setup -q
%patch1
%patch2
%patch3 -p1
%build
find . -name 'Makefile.am' -exec sed -i 's|#.-Werror.*|-Wall|' \{\} \;
autoreconf -fi
%configure --disable-static
make %{?jobs:-j%jobs}
%install
%if 0%{?suse_version}
%makeinstall docdir=%{_docdir}/%{name}
%else
make install DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-%{version}
%endif
rm %buildroot%_libdir/cmpi/*.la
rm %buildroot%_libdir/*.la
# XXX -devel package needed?
rm %buildroot%_libdir/libRaToolsDhcp.so
install -d %buildroot/etc/UniqueKey
%find_lang %name
%clean
%{__rm} -rf %{buildroot}
%define REGISTRATIONS Linux_DHCPGlobal,Linux_DHCPGlobalForService,Linux_DHCPGroup,Linux_DHCPGroupsForEntity,Linux_DHCPHost,Linux_DHCPHostsForEntity,Linux_DHCPOptions,Linux_DHCPOptionsForEntity,Linux_DHCPParams,Linux_DHCPParamsForEntity,Linux_DHCPPool,Linux_DHCPPoolsForEntity,Linux_DHCPRegisteredProfile,Linux_DHCPService,Linux_DHCPServiceConfiguration,Linux_DHCPServiceConfigurationForService,Linux_DHCPSharednet,Linux_DHCPSharednetsForEntity,Linux_DHCPSubnet,Linux_DHCPSubnetsForEntity
%define SCHEMES %{REGISTRATIONS},Linux_DHCPElementConformsToProfile,Linux_DHCPEntity
%define INTEROP_REGISTRATIONS Linux_DHCPRegisteredProfile,Linux_DHCPElementConformsToProfile
%define INTEROP_SCHEMES %{INTEROP_REGISTRATIONS},Linux_DHCPService
%post
/sbin/ldconfig
# compile MOF
d=%_datadir/%name
$d/provider-register.sh -t sfcb -r $d/{%{REGISTRATIONS}}.registration -m $d/{%{SCHEMES}}.mof
$d/provider-register.sh -t sfcb -n "root/interop" -r $d/{%{INTEROP_REGISTRATIONS}}.registration -m $d/{%{INTEROP_SCHEMES}}.mof
###############################################################################
%preun
d=%_datadir/%name
$d/provider-register.sh -t sfcb -r $d/{%{REGISTRATIONS}}.registration -m $d/{%{SCHEMES}}.mof
$d/provider-register.sh -t sfcb -n "root/interop" -r $d/{%{INTEROP_REGISTRATIONS}}.registration -m $d/{%{INTEROP_SCHEMES}}.mof
###############################################################################
%postun -p /sbin/ldconfig
%files -f %name.lang
%defattr(-,root,root)
%config /etc/smt_dhcp_ra_support.conf
%dir /etc/UniqueKey
%{_libdir}/cmpi/*.so
%{_libdir}/*.so*
%{_datadir}/sblim-testsuite/*
%{_datadir}/%{name}/
%_mandir/man5/smt_dhcp_ra_support.conf*
%if 0%{?suse_version}
%doc %{_docdir}/%{name}
%else
%doc %{_docdir}/%{name}-%{version}
%endif
%changelog