| |
@@ -8,9 +8,9 @@
|
| |
Name: perl-Module-Pluggable
|
| |
Epoch: 2
|
| |
Version: 5.2
|
| |
- Release: 21%{?dist}
|
| |
+ Release: 22%{?dist}
|
| |
Summary: Automatically give your module the ability to have plugins
|
| |
- License: GPL+ or Artistic
|
| |
+ License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
| |
URL: https://metacpan.org/release/Module-Pluggable
|
| |
Source0: https://cpan.metacpan.org/authors/id/S/SI/SIMONW/Module-Pluggable-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
@@ -63,17 +63,38 @@
|
| |
your name space that looks through a search path for .pm files and turn those
|
| |
into class names. Optionally it instantiates those classes for you.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n Module-Pluggable-%{version}
|
| |
find -type f -exec chmod -x {} +
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
- perl Makefile.PL INSTALLDIRS=vendor
|
| |
- make %{?_smp_mflags}
|
| |
+ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
+ %{make_build}
|
| |
|
| |
%install
|
| |
- make pure_install DESTDIR=%{buildroot}
|
| |
- find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
|
| |
+ %{make_install}
|
| |
+ # 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
|
| |
%{_fixperms} %{buildroot}/*
|
| |
|
| |
%check
|
| |
@@ -84,7 +105,15 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Thu Dec 01 2022 Michal Josef Špaček <mspacek@redhat.com> - 2:5.2-22
|
| |
+ - Package tests
|
| |
+ - Simplify build and install phases
|
| |
+ - Update license to SPDX format
|
| |
+
|
| |
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2:5.2-21
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
| |
|
| |