blob: 40e4d66a68f74fc0c9f5474d4e25f7f539cda523 (
plain)
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
|
Name: perl-Alien-Build-Plugin-Download-GitLab
Version: 0.01
Release: 1
Summary: Alien::Build plugin to download from GitLab
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/release/Alien-Build-Plugin-Download-GitLab
Source0: https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-Build-Plugin-Download-GitLab-%{version}.tar.gz
BuildArch: noarch
# Build
BuildRequires: coreutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(:VERSION) >= 5.8.4
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time
BuildRequires: perl(Alien::Build::Plugin)
BuildRequires: perl(Carp)
BuildRequires: perl(File::Basename)
BuildRequires: perl(JSON::PP)
BuildRequires: perl(Path::Tiny)
BuildRequires: perl(URI)
BuildRequires: perl(URI::Escape)
# Tests
BuildRequires: perl(Config)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test2::V0) >= 0.000121
%description
This plugin is designed for downloading assets from a GitLab instance.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
Requires: perl(Test::More)
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%setup -q -n Alien-Build-Plugin-Download-GitLab-%{version}
# Help generators to recognize Perl scripts
for F in t/*.t; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%install
%{make_install}
%{_fixperms} %{buildroot}/*
# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t %{buildroot}%{_libexecdir}/%{name}
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/sh
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
%check
make test
%files
%license LICENSE
%doc Changes README
%{perl_vendorlib}/*
%{_mandir}/man3/*
%files tests
%{_libexecdir}/%{name}
%changelog
* Wed Dec 25 2024 Funda Wang <fundawang@yeah.net> - 0.01-1
- Import package
|