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

# spec file for package sblim-cmpi-samba (Version 0.5.6)
# 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

# norootforbuild

Name:           sblim-cmpi-samba
BuildRequires:  gcc-c++
BuildRequires:  sblim-cmpi-base-devel
BuildRequires:  sblim-cmpi-c++-devel
BuildRequires:  sblim-cmpi-devel
BuildRequires:  sblim-indication_helper-devel
BuildRequires:  sblim-sfcb
BuildRequires:  sblim-testsuite
BuildRequires:  sblim-tools-libra-devel
BuildRequires:  dos2unix
Version:        0.5.6
Release:        1
Group:          System/Management
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       sblim-cmpi-base, cim-server
Requires:       samba >= 3.0.10
Requires(pre):  /usr/bin/, /usr/bin/
#!BuildIgnore: tog-pegasus
License:        CPL-1.0
Patch:          autoconfiscate.patch
Patch1:         include-stdlib-stdio.patch
Patch2:         Makefile-dist.patch
Patch3:         smt_smb_array-compile.patch
Patch4:         fix-void-return.patch
Summary:        Samba CIM provider

The cmpi-samba package provides access to the samba configuration data 
via CIMOM technology/infrastructure.
It contains the Samba CIM Model, CMPI Provider with the Samba task specific 
Resource Access.
A web based client application is available on SourceForge. Please refer to to get more information the WBEM-SMT Client 

%Package devel
License:        CPL-1.0
Summary: Samba CIM provider - Header Development Files
Group:   Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release}

%Description devel
The package contains header files and
link libraries for dependent provider packages

%package test
License:        CPL-1.0
Summary:        Samba CIM provider - Testcase Files
Group:          System/Management
Requires:       %{name} = %{version}-%{release}

%description test
Samba CIM Provider Testcase Files for the SBLIM Testsuite

%setup -n %{name}-%{version}
%patch4 -p1

sh ./
%configure --disable-static
dos2unix resource-access/scripts/

%if 0%{?suse_version}
%makeinstall docdir=%{_docdir}/%{name}
make install DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-%{version}
rm %buildroot%_libdir/cmpi/*.la
rm %buildroot%_libdir/*.la

%{__rm} -rf %{buildroot}

# If upgrading/not new install/not removing, deregister old version
if [ $1 -gt 1 ]; then
  if [ -x /usr/sbin/sfcbd -a -x %{_datadir}/%{name}/ ]; then
    %{_datadir}/%{name}/ -t sfcb -d -r %{_datadir}/%{name}/*.registration -m %{_datadir}/%{name}/*.mof

# compile MOF
if [ -x /usr/sbin/sfcbd ]; then
  %{_datadir}/%{name}/ -t sfcb -r %{_datadir}/%{name}/*.registration -m %{_datadir}/%{name}/*.mof
/usr/bin/ -n root/cimv2 %{_datadir}/%{name}/Linux_samba.mof ||:

if [ "$1" = "0" ]; then
  if [ -x /usr/sbin/sfcbd -a -x %{_datadir}/%{name}/ ]; then
    %{_datadir}/%{name}/ -t sfcb -d -r %{_datadir}/%{name}/*.registration -m %{_datadir}/%{name}/*.mof
  /usr/bin/ -n root/cimv2 %{_datadir}/%{name}/Linux_samba.mof ||:

%postun -p /sbin/ldconfig

%if 0%{?suse_version}
%doc %{_docdir}/%{name}
%doc %{_docdir}/%{name}-%{version}
%dir %{_datadir}/%{name}/
%config /etc/smt_smb_ra_support.conf
%config /etc/smt_smb_ra_synonyms.conf

%files test

%files devel
%dir %{_includedir}/sblim