File perl-Sys-Virt.spec of Package perl-Sys-Virt
#
# spec file for package perl-Sys-Virt
#
# Copyright (c) 2016 SUSE LINUX 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/
#
Name: perl-Sys-Virt
Version: 2.0.0
Release: 0
%define cpan_name Sys-Virt
Summary: Represent and manage a libvirt hypervisor connection
License: GPL-2.0+ or ClArtistic
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Sys-Virt/
Source: %{cpan_name}-%{version}.tar.gz
Patch0: suse-set-migration-constraints.patch
BuildRequires: libvirt-devel >= %{version}
%if 0%{?suse_version} < 1140
BuildRequires: perl-macros
%endif
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(XML::XPath)
BuildRequires: perl(XML::XPath::XMLParser)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
%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 %{cpan_name}-%{version}
%patch0 -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="%{optflags}"
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(644,root,root,755)
%doc AUTHORS Changes HACKING LICENSE perl-Sys-Virt.spec README
%changelog