import perl-DateTime-TimeZone-2.62-1.el9

c9 imports/c9/perl-DateTime-TimeZone-2.62-1.el9
MSVSphere Packaging Team 9 months ago
parent ad5af99798
commit a0b45329a5

4
.gitignore vendored

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

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

@ -1,12 +1,16 @@
# Run optional test # Run optional test
%if ! (0%{?rhel})
%bcond_without perl_DateTime_TimeZone_enables_optional_test %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 # Regenerate Perl library code from upstream Olson database of this date
%global tzversion 2021a %global tzversion 2024a
Name: perl-DateTime-TimeZone Name: perl-DateTime-TimeZone
Version: 2.47 Version: 2.62
Release: 3%{?dist} Release: 1%{?dist}
Summary: Time zone object base class and factory Summary: Time zone object base class and factory
# tzdata%%{tzversion}.tar.gz archive: Public Domain # tzdata%%{tzversion}.tar.gz archive: Public Domain
# other files: GPL+ or Artistic # other files: GPL+ or Artistic
@ -27,6 +31,7 @@ BuildRequires: coreutils
BuildRequires: make BuildRequires: make
BuildRequires: perl-generators BuildRequires: perl-generators
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict) BuildRequires: perl(strict)
BuildRequires: perl(warnings) BuildRequires: perl(warnings)
@ -109,17 +114,40 @@ Provides: bundled(tzdata)
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(DateTime::Duration\\) %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(DateTime::Duration\\)
%endif %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 %description
This class is the base class for all time zone objects. A time zone is 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 represented internally as a set of observances, each of which describes the
offset from GMT for a given time period. 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 %prep
%if !%{defined perl_bootstrap} && %{defined tzversion} %if !%{defined perl_bootstrap} && %{defined tzversion}
%setup -q -T -a 1 -c -n tzdata-%{tzversion} %setup -q -T -a 1 -c -n tzdata-%{tzversion}
%endif %endif
%setup -q -T -b 0 -n DateTime-TimeZone-%{version} %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 %build
%if !%{defined perl_bootstrap} && %{defined tzversion} %if !%{defined perl_bootstrap} && %{defined tzversion}
@ -134,7 +162,17 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_install} %{make_install}
%{_fixperms} %{buildroot}/* %{_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 %check
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
make test make test
%files %files
@ -143,7 +181,16 @@ make test
%{perl_vendorlib}/* %{perl_vendorlib}/*
%{_mandir}/man3/* %{_mandir}/man3/*
%files tests
%{_libexecdir}/%{name}
%changelog %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 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.47-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688 Related: rhbz#1991688

Loading…
Cancel
Save