File perl-Net-OpenWBEM.spec of Package perl-Net-OpenWBEM
#
# spec file for package owperlprovider (Version 0.32)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
# FIXME: split into perl-Net-OpenWBEM-{Provider,Client}?
Name: perl-Net-OpenWBEM
Version: 0.32
Release: 1
License: GPL, Artistic License
Group: Development/Libraries/Perl
Summary: Perl client and provider interface for OpenWBEM
Url: http://jason.long.name/owperl/
Source0: http://downloads.sourceforge.net/config4gnu/owperlprovider-%{version}.tar.gz
Patch0: owperlprovider-%{version}-build.dif
Patch1: owperlprovider-%{version}-vendor.dif
Patch2: detect-swig.patch
BuildRequires: openwbem-devel
BuildRequires: gcc-c++
BuildRequires: swig
BuildRequires: zlib-devel
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: libtool
%if 0%{?suse_version} >= 1030
BuildRequires: libopenssl-devel
BuildRequires: openssl
%else
BuildRequires: openssl-devel
%if 0%{?fedora_version}
BuildRequires: perl-ExtUtils-Embed
%endif
BuildRequires: perl-devel
BuildRequires: perl
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: openwbem
Requires: perl = %{perl_version}
Provides: owperlprovider
Autoreqprov: on
%description
This is owperlprovider, a Perl client and provider interface for OpenWBEM.
It lets you write OpenWBEM providers in Perl. It also includes client side
Perl bindings for OpenWBEM, which lets you write an OpenWBEM client in Perl.
This is not the same as the Perl provider interface that is bundled with
OpenWBEM, that is actually based on NPI (developed by IBM).
Owperlprovider differs from that by being developed directly for OpenWBEM,
and using SWIG (www.swig.org) to generate the wrappers for the objects and
classes.
The Swig-generated code provides an object-oriented way of accessing the
CIM elements; it also provides type-checking (i.e. if you use a CIMInstance
where a CIMObjectPath is expected, you'll get an error instead of crashing
the CIMOM).
%prep
%setup -q -n owperlprovider-%{version}
%patch0 -p0
%patch1 -p0
%patch2 -p0
%{?suse_update_config:%{suse_update_config -f}}
%build
aclocal --force
libtoolize -f
automake --foreign --add-missing --copy --force-missing
autoconf
CFLAGS="$RPM_OPT_FLAGS -fPIC" \
CXXFLAGS="$RPM_OPT_FLAGS" \
%configure --with-openwbem=%{_prefix}
make clean
touch src/*.i
make
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
make DESTDIR=$RPM_BUILD_ROOT install
find samples -type f ! -name "*.pl" ! -name "*.mof" | xargs -r rm -vf
find samples -type f | xargs -r chmod -x
find $RPM_BUILD_ROOT%{perl_vendorlib} $RPM_BUILD_ROOT%{_libdir} \
-type f -name "*.*a" | xargs -r rm -vf
#%perl_process_packlist
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(-,root,root,0755)
%doc AUTHORS BUGS ChangeLog COPYING*
%doc NEWS README RELEASE_NOTES TODO
%doc samples sample.conf
%{perl_vendorlib}/Net/OpenWBEM.pm
%{perl_vendorlib}/Net/OpenWBEM/Client.pm
%{perl_vendorlib}/Net/OpenWBEM/Provider.pm
%{perl_vendorlib}/auto/Net/OpenWBEM/OpenWBEM.*
%{perl_vendorlib}/auto/Net/OpenWBEM/Client/Client.*
%{perl_vendorlib}/owperl.pm
%{perl_vendorlib}/owperlclient.pm
%{_libdir}/openwbem/provifcs/libowperlprovifc.*
%{_libdir}/libowperlcore.*
%{_libdir}/libowperlrt.*
%{_mandir}/man3/Net::OpenWBEM.3pm.gz
%{_mandir}/man3/Net::OpenWBEM::Client.3pm.gz
%{_mandir}/man3/Net::OpenWBEM::Provider.3pm.gz
#/var/adm/perl-modules/%{name}