-
Notifications
You must be signed in to change notification settings - Fork 4
/
perl-Sys-Virt-TCK.spec.PL
116 lines (99 loc) · 3.08 KB
/
perl-Sys-Virt-TCK.spec.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# -*- rpm-spec -*-
# Copyright (C) 2006 Daniel Berrange <[email protected]>
#
use strict;
die unless (scalar @ARGV == 1);
my $VERSION;
open PM, 'lib/Sys/Virt/TCK.pm';
while (<PM>) {
if (/\$VERSION\s*=\s*'v(.*)'/) {
$VERSION=$1;
}
}
local $/ = undef;
$_ = <DATA>;
s/\@VERSION\@/$VERSION/g;
open SPEC, ">$ARGV[0]" or die "$!";
print SPEC $_;
close SPEC;
__DATA__
# Automatically generated by perl-Sys-Virt-TCK.spec.PL
%define appname Sys-Virt-TCK
Summary: Sys::Virt::TCK - libvirt Technology Compatibility Kit
Name: perl-%{appname}
Version: @VERSION@
Release: 1%{?dist}
License: GPL-2.0-or-later
Source: http://libvirt.org/sources/tck/%{appname}-v%{version}.tar.gz
Url: http://libvirt.org/
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: libvirt-client
BuildRequires: perl-interpreter
BuildRequires: perl-generators
BuildRequires: perl(accessors)
BuildRequires: perl(App::Prove)
BuildRequires: perl(Cwd)
BuildRequires: perl(File::Spec::Functions)
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Path)
BuildRequires: perl(File::Slurp)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(IO::String)
BuildRequires: perl(IO::Uncompress::Gunzip)
BuildRequires: perl(IO::Uncompress::Bunzip2)
BuildRequires: perl(Module::Build)
BuildRequires: perl(TAP::Formatter::HTML)
BuildRequires: perl(TAP::Formatter::JUnit)
BuildRequires: perl(TAP::Harness)
BuildRequires: perl(TAP::Harness::Archive)
BuildRequires: perl(Test::Builder)
BuildRequires: perl(Test::More)
BuildRequires: perl(Sub::Uplevel)
BuildRequires: perl(Sys::Virt)
BuildRequires: perl(XML::Twig)
BuildRequires: perl(XML::Writer)
BuildRequires: perl(XML::XPath)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(YAML)
# RPM autoprovides misses these as they are just
# referenced as strings passed to App::Prove
# not directly imported
Requires: perl(TAP::Formatter::HTML)
Requires: perl(TAP::Formatter::JUnit)
# The way we use Net::OpenSSH requires this add-on
# which is not mandatory, so we must ask for it
Requires: perl(IO::Pty)
Requires: guestfs-tools
BuildArchitectures: noarch
%description
Sys::Virt::TCK provides an integration test suite for validating
correct operation of libvirt drivers with underlying virtualization
technology.
%prep
%setup -q -n %{appname}-v%{version}
%build
%{__perl} Build.PL installdirs=vendor
./Build
%install
rm -rf $RPM_BUILD_ROOT
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 \
--install_path conf=%{_sysconfdir}/libvirt-tck \
--install_path pkgdata=%{_datadir}/libvirt-tck/tests
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%__install -m 0755 -d $RPM_BUILD_ROOT%{_localstatedir}/cache/libvirt-tck
%files
%defattr(-,root,root)
%license LICENSE
%doc README.rst Changes
%dir %{_sysconfdir}/libvirt-tck
%config(noreplace) %{_sysconfdir}/libvirt-tck/default.yml
%{_bindir}/libvirt-tck
%dir %{_datadir}/libvirt-tck
%{_datadir}/libvirt-tck/*
%{_mandir}/man1/*
%{perl_vendorlib}/Sys/Virt/TCK.pm
%{perl_vendorlib}/Sys/Virt/TCK/
%dir %{_localstatedir}/cache/libvirt-tck
%changelog