]>
Commit | Line | Data |
---|---|---|
76469483 JR |
1 | # |
2 | # Conditional build: | |
97668cfd | 3 | %bcond_with tests # functional tests (require libvirtd) |
76469483 JR |
4 | # |
5 | %define pdir Sys | |
6 | %define pnam Virt | |
76469483 | 7 | Summary: Sys::Virt - Represent and manage a libvirt hypervisor connection |
e35f49f6 | 8 | Summary(pl.UTF-8): Sys::Virt - reprezentacja i zarządzanie połączeniem z hipernadzorcą libvirt |
76469483 | 9 | Name: perl-Sys-Virt |
177372a7 | 10 | Version: 10.2.0 |
97668cfd | 11 | Release: 1 |
e35f49f6 | 12 | License: GPL v2+ or Artistic |
76469483 | 13 | Group: Development/Languages/Perl |
c59ff651 | 14 | Source0: http://www.cpan.org/modules/by-module/Sys/%{pdir}-%{pnam}-v%{version}.tar.gz |
177372a7 | 15 | # Source0-md5: 813624d1cae4964cb94cb432f4d0bf44 |
97668cfd | 16 | URL: https://metacpan.org/dist/Sys-Virt |
177372a7 | 17 | BuildRequires: libvirt-devel >= 10.2.0 |
dce81713 JB |
18 | BuildRequires: perl-devel >= 1:5.16 |
19 | BuildRequires: perl-Module-Build | |
e35f49f6 | 20 | BuildRequires: pkgconfig |
76469483 | 21 | BuildRequires: rpm-perlprov >= 4.1-13 |
dce81713 | 22 | BuildRequires: rpmbuild(macros) >= 1.745 |
76469483 | 23 | %if %{with tests} |
177372a7 | 24 | BuildRequires: libvirt-daemon >= 10.2.0 |
e35f49f6 JB |
25 | BuildRequires: perl-CPAN-Changes |
26 | BuildRequires: perl-Test-Pod | |
27 | BuildRequires: perl-Test-Pod-Coverage | |
28 | BuildRequires: perl-Test-Simple | |
29 | BuildRequires: perl-Time-HiRes | |
30 | BuildRequires: perl-XML-XPath | |
76469483 | 31 | %endif |
177372a7 | 32 | Requires: libvirt >= 10.2.0 |
76469483 JR |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
aac3af46 JR |
36 | The Sys::Virt module provides a Perl XS binding to the libvirt virtual |
37 | machine management APIs. This allows machines running within arbitrary | |
38 | virtualization containers to be managed with a consistent API. | |
76469483 | 39 | |
e35f49f6 JB |
40 | %description -l pl.UTF-8 |
41 | Moduł Sys::Virt dostarcza wiązanie XS Perla do API zarządzania | |
42 | maszynami wirtualnymi libvirt. Pozwala na zarządzanie poprzez | |
43 | jednolite API maszynami wirtualnymi działającymi w dowolnych | |
44 | kontenerach. | |
76469483 JR |
45 | |
46 | %prep | |
c59ff651 | 47 | %setup -q -n %{pdir}-%{pnam}-v%{version} |
76469483 JR |
48 | |
49 | %build | |
50 | %{__perl} Makefile.PL \ | |
51 | INSTALLDIRS=vendor | |
c59ff651 | 52 | |
76469483 JR |
53 | %{__make} -j1 \ |
54 | CC="%{__cc}" \ | |
55 | OPTIMIZE="%{rpmcflags}" | |
56 | ||
57 | %{?with_tests:%{__make} test} | |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %{__make} pure_install \ | |
63 | DESTDIR=$RPM_BUILD_ROOT | |
64 | ||
c59ff651 JB |
65 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Sys/Virt/Virt.bs |
66 | ||
76469483 JR |
67 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
68 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
69 | ||
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %files | |
74 | %defattr(644,root,root,755) | |
e35f49f6 JB |
75 | %doc AUTHORS Changes README |
76 | %{perl_vendorarch}/Sys/Virt.pm | |
76469483 | 77 | %dir %{perl_vendorarch}/Sys/Virt |
76469483 JR |
78 | %{perl_vendorarch}/Sys/Virt/*.pm |
79 | %dir %{perl_vendorarch}/auto/Sys/Virt | |
e35f49f6 JB |
80 | %attr(755,root,root) %{perl_vendorarch}/auto/Sys/Virt/Virt.so |
81 | %{_mandir}/man3/Sys::Virt*.3pm* | |
76469483 | 82 | %{_examplesdir}/%{name}-%{version} |