Import from AlmaLinux stable repository

This commit is contained in:
eabdullin 2024-05-15 08:36:46 +00:00
parent 4d7c8fc6da
commit f417d78607
3 changed files with 55 additions and 8 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
SOURCES/DateTime-TimeZone-2.47.tar.gz
SOURCES/tzdata2021a.tar.gz
SOURCES/DateTime-TimeZone-2.62.tar.gz
SOURCES/tzdata2024a.tar.gz

View File

@ -1,2 +1,2 @@
ff6107fd00ccab56459d9d7d21b6abcdc528b307 SOURCES/DateTime-TimeZone-2.47.tar.gz
a22a72dbe159402753a7d78ec0aa1cba6148b106 SOURCES/tzdata2021a.tar.gz
1308f657eb5e9d0e030984cd867815d8ff7f6764 SOURCES/DateTime-TimeZone-2.62.tar.gz
310a281e4551e4e9a11db4f9ceea85a6529af4af SOURCES/tzdata2024a.tar.gz

View File

@ -1,12 +1,16 @@
# Run optional test
%if ! (0%{?rhel})
%bcond_without perl_DateTime_TimeZone_enables_optional_test
%else
%bcond_with perl_DateTime_TimeZone_enables_optional_test
%endif
# Regenerate Perl library code from upstream Olson database of this date
%global tzversion 2021a
%global tzversion 2024a
Name: perl-DateTime-TimeZone
Version: 2.47
Release: 3%{?dist}
Version: 2.62
Release: 1%{?dist}
Summary: Time zone object base class and factory
# tzdata%%{tzversion}.tar.gz archive: Public Domain
# other files: GPL+ or Artistic
@ -27,6 +31,7 @@ BuildRequires: coreutils
BuildRequires: make
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
@ -109,17 +114,40 @@ Provides: bundled(tzdata)
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(DateTime::Duration\\)
%endif
# Filter modules bundled for tests
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(T::RequireDateTime\\)
%description
This class is the base class for all time zone objects. A time zone is
represented internally as a set of observances, each of which describes the
offset from GMT for a given time period.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
%if %{with perl_DateTime_TimeZone_enables_optional_test}
Requires: perl(Test::Output)
Requires: perl(Test::Taint)
%endif
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
%prep
%if !%{defined perl_bootstrap} && %{defined tzversion}
%setup -q -T -a 1 -c -n tzdata-%{tzversion}
%endif
%setup -q -T -b 0 -n DateTime-TimeZone-%{version}
%patch0 -p1
%patch -P0 -p1
# Help generators to recognize Perl scripts
for F in t/*.t t/*.pl; do
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
chmod +x "$F"
done
%build
%if !%{defined perl_bootstrap} && %{defined tzversion}
@ -134,7 +162,17 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_install}
%{_fixperms} %{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 -I . -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
@ -143,7 +181,16 @@ make test
%{perl_vendorlib}/*
%{_mandir}/man3/*
%files tests
%{_libexecdir}/%{name}
%changelog
* Mon Feb 05 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.62-1
- 2.62 bump (2024a Olson database)
* Wed Dec 13 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.60-1
- 2.60 bump (2023c Olson database)
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.47-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688