diff --git a/perl-constant.spec b/perl-constant.spec index 8c6218d3333b1e634069e7f71b80e2f7a0f7eb37..b59b255c3cbfb2a375718b7f4354f159452e983c 100644 --- a/perl-constant.spec +++ b/perl-constant.spec @@ -1,47 +1,25 @@ -%define anolis_release 6 +%define anolis_release 7 +%global modname constant -Name: perl-constant +Name: perl-%{modname} Version: 1.33 Release: %{anolis_release}%{?dist} Summary: Perl pragma to declare constants License: GPL-1.0-or-later OR Artistic-1.0-Perl Group: Development/Libraries -URL: http://search.cpan.org/dist/constant/ -Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/constant-1.33.tar.gz +URL: http://search.cpan.org/dist/%{modname} +Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{modname}-%{version}.tar.gz -BuildArch: noarch -BuildRequires: make -BuildRequires: perl-interpreter -BuildRequires: perl-generators -BuildRequires: perl -BuildRequires: perl(ExtUtils::MakeMaker) -BuildRequires: perl(strict) -# Run-time: -BuildRequires: perl(Carp) -BuildRequires: perl(vars) -BuildRequires: perl(warnings::register) -# Tests: -BuildRequires: perl(Test::More) -BuildRequires: perl(utf8) -BuildRequires: perl(warnings) -%if !%{defined perl_bootstrap} -# Optional tests: -BuildRequires: perl(Test::Pod) >= 1.14 -BuildRequires: perl(Test::Pod::Coverage) >= 1.04 -%endif -Requires: perl(Carp) +BuildRequires: make perl-interpreter perl-generators perl(ExtUtils::MakeMaker) perl(strict) +BuildRequires: perl(Carp) perl(vars) perl(warnings::register) perl(Test::More) +BuildRequires: perl(utf8) perl(warnings) perl(Test::Pod) >= 1.14 perl(Test::Pod::Coverage) >= 1.04 -%description -This pragma allows you to declare constants at compile-time: +Requires: perl(Carp) -use constant PI => 4 * atan2(1, 1); +BuildArch: noarch -When you declare a constant such as "PI" using the method shown above, -each machine your script runs upon can have as many digits of accuracy -as it can use. Also, your program will be easier to read, more likely -to be maintained (and maintained correctly), and far less likely to -send a space probe to the wrong planet because nobody noticed the one -equation in which you wrote 3.14195. +%description +This pragma allows you to declare constants at compile-time. When a constant is used in an expression, Perl replaces it with its value at compile time, and may then optimize the expression further. @@ -57,28 +35,30 @@ BuildArch: noarch The %{name}-doc package contains documentation files for %{name}. %prep -%setup -q -n constant-%{version} +%autosetup -n %{modname}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} +%make_build %install -make pure_install DESTDIR=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; -%{_fixperms} $RPM_BUILD_ROOT/* +%make_install +%{_fixperms} -c %{buildroot} %check make test %files %{perl_vendorlib}/* -%{_mandir}/man3/* +%{_mandir}/man3/*.zst %files doc -%doc Changes README +%doc README Changes %changelog +* Mon Apr 10 2023 Yuanhong Peng - 1.33-7 +- Refactor the specfile + * Tue Feb 07 2023 Chunmei Xu - 1.33-6 - rebuild with perl_bootstrap disabled