Name: perl-Sys-Virt
Version: 0.1.1
Release: 7%{?dist}
Summary: Represent and manage a libvirt hypervisor connection
License: GPL
Group: Development/Libraries
URL: http://search.cpan.org/dist/Sys-Virt/
Source0: http://www.cpan.org/authors/id/D/DA/DANBERR/Sys-Virt-%{version}.tar.gz
Patch0: Sys-Virt-doc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: libvirt-devel >= 0.1.1
# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202320
BuildRequires: /usr/bin/pkg-config
%if %{!?fedora:0}%{?fedora} >= 6
BuildRequires: xen-devel
# libvirt/xen are only available on these:
ExclusiveArch: i386 x86_64 ia64
%else
# libvirt/xen are only available on these:
ExclusiveArch: i386 x86_64
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
The Sys::Virt module provides a Perl XS binding to the libvirt virtual
machine management APIs. This allows machines running within arbitrary
virtualization containers to be managed with a consistent API.
%prep
%setup -q -n Sys-Virt-%{version}
%patch -p1
sed -i -e '/Sys-Virt\.spec/d' Makefile.PL
sed -i -e '/\.spec\.PL$/d' MANIFEST
rm -f *.spec.PL
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGES LICENSE README examples/
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Sys*
%{_mandir}/man3/*
%changelog
* Mon Aug 28 2006 Steven Pritchard <steve@kspei.com> 0.1.1-7
- Rebuild.
* Sat Aug 19 2006 Steven Pritchard <steve@kspei.com> 0.1.1-6
- More documentation fixes.
* Fri Aug 18 2006 Steven Pritchard <steve@kspei.com> 0.1.1-5
- Make this spec work on FC5 or FC6.
- Add ExclusiveArch to match xen and libvirt.
* Fri Aug 18 2006 Steven Pritchard <steve@kspei.com> 0.1.1-4
- BR xen-devel.
* Fri Aug 18 2006 Steven Pritchard <steve@kspei.com> 0.1.1-3
- BR Test::Pod and Test::Pod::Coverage.
* Sat Aug 12 2006 Steven Pritchard <steve@kspei.com> 0.1.1-2
- Add Sys-Virt-Domain-doc.patch.
* Sat Aug 12 2006 Steven Pritchard <steve@kspei.com> 0.1.1-1
- Specfile autogenerated by cpanspec 1.68.
- BR libvirt-devel and pkgconfig.
- Fix License.
- Drop non-doc autobuild.sh and add the examples directory.
- Don't try to build the included perl-Sys-Virt.spec.