File sblim-cmpi-dns.spec of Package sblim-cmpi-dns
#
# spec file for package sblim-cmpi-dns
#
# Copyright (c) 2014 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/
#
Summary: SBLIM DNS Instrumentation
License: EPL-1.0
Group: System/Management
Name: sblim-cmpi-dns
Version: 1.0
Release: 0
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: dos2unix
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: sblim-cmpi-c++-devel
BuildRequires: sblim-cmpi-devel
BuildRequires: sblim-sfcb
BuildRequires: sblim-testsuite
BuildRequires: sblim-tools-libra-devel
Requires: bind
Requires: cim-schema
Requires: sblim-sfcb
Source0: http://sourceforge.net/projects/sblim/files/sblim-wbemsmt/%{version}/%{name}-%{version}.tar.bz2
Patch0: %{name}-%{version}.dif
Url: http://sblim.wiki.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: tog-pegasus
%description
The cmpi-dns package provides access to the dns configuration data via
CIMOM technology/infrastructure. It contains the Dns CIM Model, CMPI
Provider with the Samba task specific Resource Access.
%package devel
Summary: SBLIM WBEM-SMT Dns - Header Development Files
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release}
%description devel
SBLIM WBEM-SMT Dns Development Package contains header files and link
libraries for dependent provider packages
%package test
Summary: SBLIM WBEM-SMT Dns - Testcase Files
Group: System/Management
Requires: %{name} = %{version}-%{release}
%description test
SBLIM WBEM-SMT DNS Provider Testcase Files for the SBLIM Testsuite
%prep
%setup -n %{name}-%{version}
%patch0 -p0
%build
autoreconf -f -i
%configure \
TESTSUITEDIR=%{_datadir}/sblim-testsuite \
CIMSERVER=sfcb \
PROVIDERDIR=%{_libdir}/cmpi
make RPM_OPT_FLAGS=$(RPM_OPT_FLAGS)
dos2unix COPYING
%clean
%{__rm} -rf "$RPM_BUILD_ROOT"
%install
mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/cmpi
mkdir -p $RPM_BUILD_ROOT/usr/include/cmpi
mkdir -p $RPM_BUILD_ROOT/usr/share/cmpi/mof
make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_lib}
rm -f $RPM_BUILD_ROOT/%{_libdir}/*a
rm -f $RPM_BUILD_ROOT/%{_libdir}/cmpi/*a
find $RPM_BUILD_ROOT
# Conditional definition of schema and registration files
%define SCHEMA Linux_Dns_Profile,Linux_Dns
%define REGISTRATION Linux_Dns
%define INTEROP_SCHEMA Linux_Dns_Profile
%define INTEROP_REGISTRATION Linux_Dns_Profile
%define INTEROP_NS "root/interop"
%post
# compile MOF
/sbin/ldconfig
d=%{_datadir}/%{name}
$d/provider-register.sh -t sfcb -r $d/%{REGISTRATION}.registration -m $d/{%{SCHEMA}}.mof
$d/provider-register.sh -t sfcb -n %{INTEROP_NS} -r $d/%{INTEROP_REGISTRATION}.registration -m $d/%{INTEROP_SCHEMA}.mof
%preun
if [ "$1" = "0" ]; then
d=%{_datadir}/%{name}
$d/provider-register.sh -t sfcb -d -r $d/%{REGISTRATION}.registration -m $d/{%{SCHEMA}}.mof
$d/provider-register.sh -t sfcb -d -n %{INTEROP_NS} -r $d/%{INTEROP_REGISTRATION}.registration -m $d/%{INTEROP_SCHEMA}.mof
fi
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,0755)
%doc %{_datadir}/doc/packages/%{name}
%defattr(-,root,root,0644)
%doc %{_mandir}/man5/smt_dns_ra_support.conf.5.gz
%config(noreplace) %{_sysconfdir}/smt_dns*.conf
%defattr(-,root,root,0755)
%{_datadir}/%{name}
%defattr(-,root,root,0644)
%{_libdir}/libIBM_DnsProviderTooling.so.*
%{_libdir}/libLinux_DnsGeneralProviderBasic.so.*
%{_libdir}/libRaToolsDns.so.*
%{_libdir}/cmpi/libcmpiDnsCIM_ConcreteJob.so
%{_libdir}/cmpi/libcmpiLinux_Dns*.so
%files devel
%defattr(-,root,root)
%dir %{_includedir}/sblim
%{_includedir}/sblim/smt_dns*.h
%{_libdir}/libIBM_DnsProviderTooling.so
%{_libdir}/libLinux_DnsGeneralProviderBasic.so
%{_libdir}/libRaToolsDns.so
%files test
%defattr(-,root,root,0755)
%{_datadir}/sblim-testsuite/test-cmpi-dns.sh
%defattr(-,root,root,0644)
%{_datadir}/sblim-testsuite/buffalo.example2.com.conf
%{_datadir}/sblim-testsuite/cobra.example1.com.conf
%{_datadir}/sblim-testsuite/elephant.example2.com.conf
%{_datadir}/sblim-testsuite/named.conf
%{_datadir}/sblim-testsuite/rhino.example1.com.conf
%{_datadir}/sblim-testsuite/testlocaldomain.zone
%{_datadir}/sblim-testsuite/testlocalhost.zone
%{_datadir}/sblim-testsuite/testnamed.broadcast
%{_datadir}/sblim-testsuite/testnamed.ca
%{_datadir}/sblim-testsuite/testnamed.ip6.local
%{_datadir}/sblim-testsuite/testnamed.local
%{_datadir}/sblim-testsuite/testnamed.zero
%{_datadir}/sblim-testsuite/cim/Linux_Dns*
%{_datadir}/sblim-testsuite/system/linux/Linux_Dns*
%changelog