|
|
|
|
@ -1,37 +1,33 @@
|
|
|
|
|
# Suspect that upstream prefers single-decimal versions
|
|
|
|
|
%global cpan_version 3.75
|
|
|
|
|
%global rpm_version 3.7.5
|
|
|
|
|
%global cpanversion 3.74
|
|
|
|
|
%global rpmversion 3.7.4
|
|
|
|
|
|
|
|
|
|
# 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: %{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-%{cpan_version}.tar.gz
|
|
|
|
|
Version: %{rpmversion}
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
URL: http://search.cpan.org/dist/common-sense
|
|
|
|
|
Source0: http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/common-sense-%{cpanversion}.tar.gz
|
|
|
|
|
Patch1: common-sense-3.71-podenc.patch
|
|
|
|
|
# Module Build
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
|
|
|
|
|
BuildRequires: coreutils
|
|
|
|
|
BuildRequires: findutils
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl-interpreter
|
|
|
|
|
BuildRequires: perl(Config)
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
|
|
|
BuildRequires: perl(feature)
|
|
|
|
|
BuildRequires: perl(strict)
|
|
|
|
|
BuildRequires: perl(utf8)
|
|
|
|
|
BuildRequires: perl(warnings)
|
|
|
|
|
BuildRequires: /usr/bin/pod2man
|
|
|
|
|
BuildRequires: /usr/bin/pod2text
|
|
|
|
|
# Module Runtime
|
|
|
|
|
# (no additional dependencies)
|
|
|
|
|
# Test Suite
|
|
|
|
|
# (no additional dependencies)
|
|
|
|
|
# Dependencies
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
|
|
|
|
|
|
# Obsolete/provide old -tests subpackage (can be removed in F19 development cycle)
|
|
|
|
|
Obsoletes: %{name}-tests < %{version}-%{release}
|
|
|
|
|
Provides: %{name}-tests = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This module implements some sane defaults for Perl programs, as defined
|
|
|
|
|
@ -39,7 +35,7 @@ by two typical (or not so typical - use your common sense) specimens of
|
|
|
|
|
Perl coders:
|
|
|
|
|
|
|
|
|
|
It's supposed to be mostly the same, with much lower memory usage, as:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use utf8;
|
|
|
|
|
use strict qw(vars subs);
|
|
|
|
|
use feature qw(say state switch);
|
|
|
|
|
@ -47,159 +43,49 @@ It's supposed to be mostly the same, with much lower memory usage, as:
|
|
|
|
|
no feature qw(array_base);
|
|
|
|
|
no warnings;
|
|
|
|
|
use warnings qw(FATAL closed threads internal debugging pack
|
|
|
|
|
prototype inplace io pipe unpack malloc
|
|
|
|
|
portable prototype inplace io pipe unpack malloc
|
|
|
|
|
deprecated glob digit printf layer
|
|
|
|
|
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-%{cpan_version}
|
|
|
|
|
%setup -q -n common-sense-%{cpanversion}
|
|
|
|
|
|
|
|
|
|
# Specify POD encoding
|
|
|
|
|
%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
|
|
|
|
|
%patch1
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
make pure_install DESTDIR=%{buildroot}
|
|
|
|
|
find %{buildroot} -type f -name .packlist -delete
|
|
|
|
|
%{_fixperms} -c %{buildroot}
|
|
|
|
|
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
|
|
|
|
%{_fixperms} %{buildroot}
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
|
* 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 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
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.5-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jun 27 2020 Jitka Plesnikova <jplesnik@redhat.com> - 3.7.5-3
|
|
|
|
|
- Perl 5.32 re-rebuild updated packages
|
|
|
|
|
|
|
|
|
|
* Mon Jun 22 2020 Jitka Plesnikova <jplesnik@redhat.com> - 3.7.5-2
|
|
|
|
|
- Perl 5.32 rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Apr 2 2020 Paul Howarth <paul@city-fan.org> - 3.7.5-1
|
|
|
|
|
- Update to 3.75
|
|
|
|
|
- Make build (more) reproducible
|
|
|
|
|
- Removed "portable" from the warnings list, as 32-bit perls (as opposed to
|
|
|
|
|
32-bit platforms) are practically extinct and it warns about a weird subset
|
|
|
|
|
of operations, e.g. 64-bit hex() is not ok, 64-bit addition is fine, makes
|
|
|
|
|
no sense; additionally, other than hex/oct etc. harassment, there is
|
|
|
|
|
nothing in this category that otherwise could be useful
|
|
|
|
|
- Specify all build dependencies
|
|
|
|
|
- Drop ancient obsoletes/provides for removed tests sub-package
|
|
|
|
|
- Drop redundant buildroot cleaning in %%install section
|
|
|
|
|
- Simplify find command using -delete
|
|
|
|
|
- Fix permissions verbosely
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.4-14
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.4-13
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 3.7.4-12
|
|
|
|
|
- Perl 5.30 rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.4-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.4-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 3.7.4-9
|
|
|
|
|
- Perl 5.28 rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.4-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|