From 8d77f3b01167beacf06a8e52771a54d1119cbeef Mon Sep 17 00:00:00 2001 From: Shawn Wang Date: Tue, 11 Apr 2023 16:45:30 +0800 Subject: [PATCH] Optimize the spec file Signed-off-by: Shawn Wang --- perl-Time-Local.spec | 47 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/perl-Time-Local.spec b/perl-Time-Local.spec index e299eeb..6a4b617 100644 --- a/perl-Time-Local.spec +++ b/perl-Time-Local.spec @@ -1,35 +1,33 @@ -%define anolis_release 4 -%global cpan_version 1.30 +%define anolis_release 5 + Name: perl-Time-Local Epoch: 2 -Version: %{cpan_version} +Version: 1.30 Release: %{anolis_release}%{?dist} Summary: Efficiently compute time from local and GMT time License: GPL+ or Artistic URL: https://metacpan.org/release/Time-Local -Source0: https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Time-Local-%{cpan_version}.tar.gz +Source0: https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Time-Local-%{version}.tar.gz BuildArch: noarch -BuildRequires: make -BuildRequires: perl-generators -BuildRequires: perl-interpreter -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: perl(strict) -BuildRequires: perl(warnings) -BuildRequires: perl(Carp) -BuildRequires: perl(constant) -BuildRequires: perl(Exporter) -BuildRequires: perl(parent) -BuildRequires: perl(File::Spec) + +BuildRequires: make perl-generators perl-interpreter perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) perl(warnings) +BuildRequires: perl(Carp) perl(constant) perl(Exporter) perl(parent) perl(File::Spec) BuildRequires: perl(Test::More) >= 0.96 %description This module provides functions that are the inverse of built-in perl functions -localtime() and gmtime(). They accept a date as a six-element array, and -return the corresponding time(2) value in seconds since the system epoch +`localtime()` and `gmtime()`. They accept a date as a six-element array, and +return the corresponding `time(2)` value in seconds since the system epoch (Midnight, January 1, 1970 GMT on Unix, for example). This value can be positive or negative, though POSIX only requires support for positive values, so dates before the system's epoch may not work on all operating systems. +It is worth drawing particular attention to the expected ranges for the values +provided. The value for the day of the month is the actual day (i.e. 1..31), +while the month is the number of months since January (0..11). This is +consistent with the values returned from `localtime()` and `gmtime()`. + %package doc Summary: Documentation files for %{name} Requires: %{name} = %{epoch}:%{version}-%{release} @@ -39,18 +37,18 @@ BuildArch: noarch The %{name}-doc package contains documentation files for %{name}. %prep -%setup -q -n Time-Local-%{cpan_version} +%autosetup -n Time-Local-%{version} %build -perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 -%{make_build} +perl Makefile.PL NO_PACKLIST=1 NO_PERLLOCAL=1 INSTALLDIRS=vendor +%make_build %install -%{make_install} +%make_install %{_fixperms} $RPM_BUILD_ROOT/* %check -make test +%make_build test %files %license LICENSE @@ -58,9 +56,12 @@ make test %{_mandir}/man3/* %files doc -%doc Changes CODE_OF_CONDUCT.md CONTRIBUTING.md README.md +%doc README.md CODE_OF_CONDUCT.md CONTRIBUTING.md Changes %changelog +* Tue Apr 11 2023 Shawn Wang - 2:1.30-5 +- Optimize the spec file + * Fri Feb 03 2023 mgb01105731 - 2:1.30-4 - remove versioned MODULE_COMPAT_ requires -- Gitee