diff --git a/PathTools-3.75-Upgrade-to-3.78.patch b/0002-PathTools-3.75-Upgrade-to-3.78.patch similarity index 100% rename from PathTools-3.75-Upgrade-to-3.78.patch rename to 0002-PathTools-3.75-Upgrade-to-3.78.patch diff --git a/PathTools-3.78-Upgrade-to-3.80.patch b/0003-PathTools-3.78-Upgrade-to-3.80.patch similarity index 100% rename from PathTools-3.78-Upgrade-to-3.80.patch rename to 0003-PathTools-3.78-Upgrade-to-3.80.patch diff --git a/PathTools-3.80-Upgrade-to-3.84.patch b/0004-PathTools-3.80-Upgrade-to-3.84.patch similarity index 100% rename from PathTools-3.80-Upgrade-to-3.84.patch rename to 0004-PathTools-3.80-Upgrade-to-3.84.patch diff --git a/perl-PathTools.spec b/perl-PathTools.spec index 2f360ce4fae62ca1f5faadcf728b3aae8ce6e4c9..152e236ad1609ff6616f076fb1dcfeedfd0318d1 100644 --- a/perl-PathTools.spec +++ b/perl-PathTools.spec @@ -1,61 +1,38 @@ -%define anolis_release 1 +%define anolis_release 2 + %global base_version 3.75 Name: perl-PathTools Version: 3.84 Release: %{anolis_release}%{?dist} Summary: PathTools Perl module (Cwd, File::Spec) -# Cwd.xs: BSD -# other files: GPL+ or Artistic License: (GPL+ or Artistic) and BSD URL: https://metacpan.org/release/PathTools Source0: https://cpan.metacpan.org/authors/id/X/XS/XSAWYERX/PathTools-%{base_version}.tar.gz -# Disable VMS tests as it works on VMS only, so can not locate perl-File-Spec-VMS -Patch0: 0001-PathTools-3.74-Disable-VMS-tests.patch -# Unbundled from perl 5.29.10 -Patch1: PathTools-3.75-Upgrade-to-3.78.patch -# Unbundled from perl 5.34.0 -Patch2: PathTools-3.78-Upgrade-to-3.80.patch -# Unbundled from perl 5.35.11 -Patch3: PathTools-3.80-Upgrade-to-3.84.patch - -BuildRequires: coreutils -BuildRequires: findutils -BuildRequires: gcc -BuildRequires: make -BuildRequires: perl-devel -BuildRequires: perl-generators -BuildRequires: perl-interpreter + +Patch0001: 0001-PathTools-3.74-Disable-VMS-tests.patch +Patch0002: 0002-PathTools-3.75-Upgrade-to-3.78.patch +Patch0003: 0003-PathTools-3.78-Upgrade-to-3.80.patch +Patch0004: 0004-PathTools-3.80-Upgrade-to-3.84.patch + +BuildRequires: gcc make findutils coreutils BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl-generators perl-interpreter perl-devel # Run-time: -BuildRequires: perl(Carp) -BuildRequires: perl(constant) -BuildRequires: perl(Errno) -BuildRequires: perl(Exporter) -# File::Basename not needed because of removed File::Spec::VMS -BuildRequires: perl(Scalar::Util) -BuildRequires: perl(strict) -# Optional run-time: -BuildRequires: perl(XSLoader) +BuildRequires: perl(XSLoader) perl(strict) perl(Scalar::Util) +BuildRequires: perl(Exporter) perl(Errno) perl(constant) perl(Carp) # Tests: -BuildRequires: perl(Carp::Heavy) -BuildRequires: perl(Config) -BuildRequires: perl(File::Path) -BuildRequires: perl(File::Temp) -BuildRequires: perl(lib) -BuildRequires: perl(Test::More) >= 0.88 -BuildRequires: perl(warnings) -Requires: perl(Carp) -Requires: perl(Errno) -Requires: perl(Scalar::Util) -# XSLoader is optional only because miniperl does not support XS. With perl we -# almost certainly want it. +BuildRequires: perl(lib) perl(File::Temp) perl(File::Path) +BuildRequires: perl(Test::More) >= 0.88 perl(warnings) perl(Config) perl(Carp::Heavy) + +Requires: perl(Carp) perl(Scalar::Util) perl(Errno) Recommends: perl(XSLoader) %{?perl_default_filter} %description -This is the combined distribution for the File::Spec and Cwd modules. +perl-PathTools is a package that provides tools for working with directory and file +names in Perl programming language %package doc Summary: Documentation files for %{name} @@ -66,15 +43,9 @@ BuildArch: noarch The %{name}-doc package contains documentation files for %{name}. %prep -%setup -q -n PathTools-%{base_version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - +%autosetup -p1 -n PathTools-%{base_version} # Do not distribute File::Spec::VMS as it works on VMS only rm lib/File/Spec/VMS.pm -#perl -i -ne 'print $_ unless m{^\Qlib/File/Spec/VMS.pm\E}' MANIFEST %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" @@ -82,8 +53,8 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_ %install %{make_install} -find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete -%{_fixperms} $RPM_BUILD_ROOT/* +find %{buildroot} -type f -name '*.bs' -size 0 -delete +%{_fixperms} %{buildroot}/* %check make test @@ -98,6 +69,9 @@ make test %doc Changes %changelog +* Sat Apr 15 2023 yuanhui - 3.84-2 +- Optimize the spec file + * Wed Feb 08 2023 mgb01105731 - 3.84-1 - remove versioned MODULE_COMPAT_ requires - update to version 3.84