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

#
# spec file for package sblim-cmpi-dhcp (Version 0.5.5)
#
# 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-dhcp
Url:            http://sblim.sourceforge.net/wbemsmt.html
BuildRequires:  bison flex sblim-cmpi-base-devel sblim-cmpi-devel sblim-testsuite sblim-tools-libra-devel
Summary:        SBLIM CMPI dhcp Instrumentation
Version:        0.5.5
Release:        21
Group:          System/Management
License:        IBM Public License .. ; Common Public License 1.0, Eclipse Public License
Requires:       sblim-cmpi-base >= 1.2.3, cim-server
Source:         http://prdownloads.sourceforge.net/sblim/sblim-cmpi-dhcp-%{version}.tar.bz2
Patch1:         sblim-cmpi-dhcp-0.5.5-open-missing-mode.patch
Patch2:         sblim-cmpi-dhcp-0.5.5-paths.patch
Patch3:         sblim-cmpi-dhcp-0.5.5-interopnamespace.patch
Patch4:         sblim-cmpi-dhcp-0.5.5-automake.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
%patch4

%build
find . -name 'Makefile.am' -exec sed -i 's|#.-Werror.*|-Wall|' \{\} \;
autoreconf -fi
%configure --disable-static
make %{?jobs:-j%jobs}

%install
%makeinstall docdir=%{_docdir}/%{name}
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*
%doc %{_docdir}/%{name}

%changelog
openSUSE Build Service is sponsored by