| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-Algorithm-C3
|
| |
Version: 0.11
|
| |
- Release: 4%{?dist}
|
| |
+ Release: 5%{?dist}
|
| |
Summary: Module for merging hierarchies using the C3 algorithm
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/Algorithm-C3
|
| |
@@ -22,14 +22,32 @@
|
| |
# Runtime
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
| |
|
| |
+ # Remove under-specified dependencies
|
| |
+ %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Test::More)\\)$
|
| |
+
|
| |
%description
|
| |
This module implements the C3 algorithm. Most of the uses I have for C3
|
| |
revolve around class building and metamodels but it could also be used for
|
| |
things like dependency resolution as well since it tends to do such a nice
|
| |
job of preserving local precedence orderings.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+ Requires: perl(Test::More) >= 0.47
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -q -n Algorithm-C3-%{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
|
| |
@@ -39,6 +57,14 @@
|
| |
make pure_install DESTDIR=%{buildroot}
|
| |
find %{buildroot} -type f -name .packlist -delete
|
| |
%{_fixperms} -c %{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 -r -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
|
| |
%check
|
| |
make test
|
| |
@@ -49,7 +75,13 @@
|
| |
%{perl_vendorlib}/Algorithm/
|
| |
%{_mandir}/man3/Algorithm::C3.3*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Tue Aug 03 2021 Michal Josef Špaček <mspacek@redhat.com> - 0.11-5
|
| |
+ - Package tests
|
| |
+
|
| |
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-4
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
| |
|
| |