]> git.pld-linux.org Git - packages/perl-Sys-Virt.git/blob - perl-Sys-Virt.spec
- fix building with perl 5.26
[packages/perl-Sys-Virt.git] / perl-Sys-Virt.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # perform "make test" (requires libvirtd)
4 #
5 %define         pdir    Sys
6 %define         pnam    Virt
7 %include        /usr/lib/rpm/macros.perl
8 Summary:        Sys::Virt - Represent and manage a libvirt hypervisor connection
9 Summary(pl.UTF-8):      Sys::Virt - reprezentacja i zarządzanie połączeniem z hipernadzorcą libvirt
10 Name:           perl-Sys-Virt
11 Version:        2.5.0
12 Release:        4
13 License:        GPL v2+ or Artistic
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-module/Sys/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  d07fca31367bef924ffe5c62e0d5f18a
17 Patch0:         no-dot-in-inc.patch
18 URL:            http://search.cpan.org/dist/Sys-Virt/
19 BuildRequires:  libvirt-devel >= 1.2.19
20 BuildRequires:  perl-devel >= 1:5.8.0
21 BuildRequires:  pkgconfig
22 BuildRequires:  rpm-perlprov >= 4.1-13
23 %if %{with tests}
24 BuildRequires:  libvirt-daemon >= 1.2.19
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
31 %endif
32 Requires:       libvirt >= 1.2.19
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
39
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.
45
46 %prep
47 %setup -q -n %{pdir}-%{pnam}-%{version}
48 %patch0 -p1
49
50 %build
51 %{__perl} Makefile.PL \
52         INSTALLDIRS=vendor
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
65 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
66 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files
72 %defattr(644,root,root,755)
73 %doc AUTHORS Changes README
74 %{perl_vendorarch}/Sys/Virt.pm
75 %dir %{perl_vendorarch}/Sys/Virt
76 %{perl_vendorarch}/Sys/Virt/*.pm
77 %dir %{perl_vendorarch}/auto/Sys/Virt
78 %attr(755,root,root) %{perl_vendorarch}/auto/Sys/Virt/Virt.so
79 %{_mandir}/man3/Sys::Virt*.3pm*
80 %{_examplesdir}/%{name}-%{version}
This page took 0.051017 seconds and 4 git commands to generate.