Name: perl-Sys-Virt
Version: 0.1.2
Release: 3%{?dist}
Summary: Represent and manage a libvirt hypervisor connection
License: GPLv2+ or Artistic
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
Patch1: %{name}-%{version}-free.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(XML::XPath)
BuildRequires: libvirt-devel >= 0.1.1
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}
%patch1 -p1
sed -i -e '/Sys-Virt\.spec/d' Makefile.PL
sed -i -e '/\.spec\.PL$/d' MANIFEST
rm -f *.spec.PL
# Disable 100-connect test.
sed -i -e '/^t\/100-connect\.t$/d' MANIFEST
rm -f t/100-connect.t
%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 \;
%{_fixperms} $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
* Fri Mar 07 2008 Daniel P. Berrange <berrange@redhat.com> - 0.1.2-3
- Fix calls to free() in XS binding
* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.2-2
Rebuild for new perl
* Wed Mar 05 2008 Steven Pritchard <steve@kspei.com> 0.1.2-1
- Update to 0.1.2.
- Drop Sys-Virt-doc.patch.
- BR XML::XPath.
- No longer need to BR pkgconfig or xen-devel.
- Disable 100-connect test.
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.1.1-10
- Autorebuild for GCC 4.3
* Tue Apr 17 2007 Steven Pritchard <steve@kspei.com> 0.1.1-9
- BR ExtUtils::MakeMaker.
* Tue Apr 17 2007 Steven Pritchard <steve@kspei.com> 0.1.1-8
- Use fixperms macro instead of our own chmod incantation.
* 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.