# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: Miscellaneous timezone manipulation routines Name: perl-TimeDate Epoch: 1 Version: 2.33 Release: 10.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/TimeDate Source0: https://cpan.metacpan.org/modules/by-module/Time/TimeDate-%{version}.tar.gz Patch0: TimeDate-1.20-utf8.patch BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(base) BuildRequires: perl(Carp) BuildRequires: perl(Exporter) BuildRequires: perl(strict) BuildRequires: perl(Time::Local) BuildRequires: perl(utf8) BuildRequires: perl(vars) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Test::More) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description This module includes a number of smaller modules suited for manipulation of time and date strings with Perl. In particular, the Date::Format and Date::Parse modules can display and read times and dates in various formats, providing a more reliable interface to textual representations of points in time. %prep %setup -q -n TimeDate-%{version} # ChangeLog is ISO-8859-1 encoded - make it UTF-8 %patch -P 0 -p1 # Bogus exec permissions on some language modules chmod -c -x lib/Date/Language/{Russian_cp1251,Russian_koi8r,Turkish}.pm %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test %files %doc ChangeLog README %{perl_vendorlib}/Date/Format.pm %{perl_vendorlib}/Date/Language.pm %{perl_vendorlib}/Date/Language/ %{perl_vendorlib}/Date/Parse.pm %{perl_vendorlib}/Time/Zone.pm %{perl_vendorlib}/TimeDate.pm %{_mandir}/man3/Date::Format.3* %{_mandir}/man3/Date::Language.3* %{_mandir}/man3/Date::Language::Bulgarian.3* %{_mandir}/man3/Date::Language::Hungarian.3* %{_mandir}/man3/Date::Parse.3* %{_mandir}/man3/Time::Zone.3* %{_mandir}/man3/TimeDate.3* %changelog * Sat Jun 24 2023 Paul Howarth - 1:2.33-10 - Use SPDX-format license tag - Avoid use of deprecated patch syntax * Wed May 20 2020 Paul Howarth - 1:2.33-1 - Update to 2.33 - Remove pax headers in tarball using GNU tar * Thu Mar 5 2020 Paul Howarth - 1:2.32-1 - Update to 2.32 - Fix t/date.t to run on leap days * Fri Jan 17 2020 Paul Howarth - 1:2.31-1 - Update to 2.31 - Fix year 2020 bug in t/getdate.t - Fix warnings in t/date.t - Fix pod issue in lib/Date/Parse.pm - Fix for French language using English day suffixes in %%o - Fix Date::Parse::str2time century issue (CPAN RT#84075) - Adds Occitan language - Migrate GitHub repo and bugtracker to atoomic/perl-TimeDate - Use author-independent source URL * Wed Jun 5 2019 Paul Howarth - 1:2.30-17 - Perl 5.30 rebuild * Tue Apr 3 2018 Paul Howarth - 1:2.30-13 - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Fri Oct 14 2016 Paul Howarth - 1:2.30-9 - Classify buildreqs by usage - Simplify find command using -delete - Drop %%defattr, redundant since rpm 4.4 * Tue Feb 19 2013 Paul Howarth - 1:2.30-1 - Update to 2.30 - Syncing distribution version number with Date::Parse - Added Bulgarian language support - BR: perl(Test::More) * Tue Jun 12 2012 Paul Howarth - 1:1.20-7 - BR: perl(base), perl(Exporter) and perl(Time::Local) - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT - Use %%{_fixperms} macro rather than our own chmod incantation * Fri Oct 7 2011 Paul Howarth - 1:1.20-6 - Use a patch rather than scripted iconv to fix character encoding - Fix dist tag for CentOS 6 and Scientific Linux - BR: perl(Carp) * Tue Jun 28 2011 Paul Howarth - 1:1.20-5 - Rebuild for perl 5.14.1 in Rawhide - Nobody else likes macros for commands * Fri Jun 25 2010 Paul Howarth - 1:1.20-3 - Rebuild for perl 5.12.1 in Rawhide * Fri May 28 2010 Paul Howarth - 1:1.20-2 - Fix dist tag for RHEL-6 Beta * Mon Dec 21 2009 Paul Howarth - 1:1.20-1 - Update to 1.20 - Fix typo => s/timezome/timezone/ - CPAN RT#52387 Fix %%s formating to use timelocal when no timezone is given - CPAN RT#51664 fix str2time('16 Oct 09') to not give a negative result - Dist tag for Rawhide no longer needs special-casing * Sat Sep 26 2009 Paul Howarth - 1:1.19-1 - Update to 1.19 (replace Date::Language::Hungarian with version from CPAN) * Fri Sep 25 2009 Paul Howarth - 1:1.18-1 - Update to 1.18 (added Date::Language::Hungarian) * Mon Sep 21 2009 Paul Howarth - 1:1.17-1 - Update to 1.17 (many bug fixes, including CPAN RT#45067, 48164, 17396) - New manpage for Date::Language - Danish.pm now has proper line endings but various files have bogus exec permissions that need fixing * Sun Nov 2 2008 Paul Howarth - 1:1.16-4 - Tweak dist tag macros to work on current Rawhide with three-part releasenum - Clarify license as GPL version 1 or later, or Artistic (i.e. same as perl) - Recode ChangeLog as UTF8 * Sun Mar 18 2007 Paul Howarth - 1:1.16-3 - Fix dist tag for development releases and Fedora 7 onwards - Don't need to define %%{perl_vendorarch} for noarch package - Don't need to specify compiler optimization flags for noarch package - Remove %%{__perl_version} macro, used only once - Remove buildroot unconditionally in %%clean and %%install - Don't use macros in command paths, hardcode them instead - Fix argument order for find with -depth - Use search.cpan.org download URL - BuildRequire perl(ExtUtils::MakeMaker) * Fri Jun 3 2005 Paul Howarth - 1:1.16-2 - Rewrite spec file in (mainly) Fedora Extras style - Include full URL for source - Fix URL - Use MODULE_COMPAT dependency style and remove explicit perl dependency * Fri Feb 13 2004 Chip Turner - 1:1.16-1 - Update to 1.16, bump epoch since previous version was 1.1301 * Tue Aug 6 2002 Chip Turner - Automated release bump and build * Tue Aug 6 2002 Chip Turner - Update to 1.301 * Wed Jan 09 2002 Tim Powers - Automated rebuild * Wed Oct 24 2001 root - Spec file was autogenerated