|
|
|
@ -1,17 +1,17 @@
|
|
|
|
|
# Suspect that upstream prefers single-decimal versions
|
|
|
|
|
%global cpanversion 3.75
|
|
|
|
|
%global rpmversion 3.7.5
|
|
|
|
|
%global cpan_version 3.75
|
|
|
|
|
%global rpm_version 3.7.5
|
|
|
|
|
|
|
|
|
|
# This arch-specific package has no binaries and generates no debuginfo
|
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
Name: perl-common-sense
|
|
|
|
|
Summary: "Common sense" Perl defaults
|
|
|
|
|
Version: %{rpmversion}
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
Version: %{rpm_version}
|
|
|
|
|
Release: 20%{?dist}
|
|
|
|
|
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
|
|
|
|
URL: https://metacpan.org/release/common-sense
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/common-sense-%{cpanversion}.tar.gz
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/common-sense-%{cpan_version}.tar.gz
|
|
|
|
|
Patch1: common-sense-3.71-podenc.patch
|
|
|
|
|
# Module Build
|
|
|
|
|
BuildRequires: coreutils
|
|
|
|
@ -19,6 +19,7 @@ BuildRequires: findutils
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl-interpreter
|
|
|
|
|
BuildRequires: perl(Config)
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
|
|
|
BuildRequires: perl(feature)
|
|
|
|
|
BuildRequires: perl(strict)
|
|
|
|
@ -31,7 +32,6 @@ BuildRequires: /usr/bin/pod2text
|
|
|
|
|
# Test Suite
|
|
|
|
|
# (no additional dependencies)
|
|
|
|
|
# Dependencies
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This module implements some sane defaults for Perl programs, as defined
|
|
|
|
@ -52,11 +52,26 @@ It's supposed to be mostly the same, with much lower memory usage, as:
|
|
|
|
|
reserved taint closure semicolon);
|
|
|
|
|
no warnings qw(exec newline unopened);
|
|
|
|
|
|
|
|
|
|
%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 common-sense-%{cpanversion}
|
|
|
|
|
%setup -q -n common-sense-%{cpan_version}
|
|
|
|
|
|
|
|
|
|
# Specify POD encoding
|
|
|
|
|
%patch1
|
|
|
|
|
%patch -P 1
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
@ -70,28 +85,76 @@ find %{buildroot} -type f -name .packlist -delete
|
|
|
|
|
# Have a non-empty manpage
|
|
|
|
|
pod2man sense.pod > %{buildroot}%{_mandir}/man3/common::sense.3pm
|
|
|
|
|
|
|
|
|
|
# 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 . -r -j "$(getconf _NPROCESSORS_ONLN)"
|
|
|
|
|
EOF
|
|
|
|
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
|
|
|
|
make test
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%if 0%{?_licensedir:1}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%else
|
|
|
|
|
%doc LICENSE
|
|
|
|
|
%endif
|
|
|
|
|
%doc Changes README t/
|
|
|
|
|
%dir %{perl_vendorarch}/common/
|
|
|
|
|
%{perl_vendorarch}/common/sense.pm
|
|
|
|
|
%doc %{perl_vendorarch}/common/sense.pod
|
|
|
|
|
%{_mandir}/man3/common::sense.3*
|
|
|
|
|
|
|
|
|
|
%files tests
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.7.5-7
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.7.5-20
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
|
|
|
|
|
* Thu Jun 27 2024 Jitka Plesnikova <jplesnik@redhat.com> - 3.7.5-19
|
|
|
|
|
- Package tests
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.7.5-18
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-17
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-16
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 14 2024 Paul Howarth <paul@city-fan.org> - 3.7.5-15
|
|
|
|
|
- Use %%license unconditionally
|
|
|
|
|
|
|
|
|
|
* Wed Aug 09 2023 Petr Pisar <ppisar@redhat.com> - 3.7.5-14
|
|
|
|
|
- Adapt a spec file to rpm-4.18.92
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-13
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu May 04 2023 Michal Josef Špaček <mspacek@redhat.com> - 3.7.5-12
|
|
|
|
|
- Update license to SPDX format
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 3.7.5-9
|
|
|
|
|
- Perl 5.36 rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.7.5-6
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 3.7.5-6
|
|
|
|
|
- Perl 5.34 rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|