| |
@@ -9,9 +9,9 @@
|
| |
|
| |
Name: perl-DynaLoader-Functions
|
| |
Version: 0.003
|
| |
- Release: 16%{?dist}
|
| |
+ Release: 17%{?dist}
|
| |
Summary: Deconstructed dynamic C library loading
|
| |
- License: GPL+ or Artistic
|
| |
+ License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
| |
URL: https://metacpan.org/release/DynaLoader-Functions
|
| |
Source0: https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM/DynaLoader-Functions-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
@@ -48,8 +48,25 @@
|
| |
correct use of these functions requires the programmer to be mindful of the
|
| |
space of platform variations.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: coreutils
|
| |
+ Requires: perl-Test-Harness
|
| |
+ Requires: perl(ExtUtils::CBuilder)
|
| |
+ Requires: perl(File::Spec)
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n DynaLoader-Functions-%{version}
|
| |
+ # 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 Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS"
|
| |
@@ -57,6 +74,22 @@
|
| |
|
| |
%install
|
| |
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ rm -fr %{buildroot}%{_libexecdir}/%{name}/t/pod*
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/bash
|
| |
+ set -e
|
| |
+ # Test t/rules-dbm.t write into CWD
|
| |
+ DIR=$(mktemp -d)
|
| |
+ cp -a %{_libexecdir}/%{name}/* "$DIR"
|
| |
+ pushd "$DIR"
|
| |
+ prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ popd
|
| |
+ rm -r "$DIR"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
%{_fixperms} $RPM_BUILD_ROOT/*
|
| |
|
| |
%check
|
| |
@@ -67,7 +100,14 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Mon Dec 19 2022 Michal Josef Špaček <mspacek@redhat.com> - 0.003-17
|
| |
+ - Package tests
|
| |
+ - Update license to SPDX format
|
| |
+
|
| |
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.003-16
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
| |
|
| |