diff --git a/perl-Socket.spec b/perl-Socket.spec index f1f483f085d83a77d12bfe5e0d7077714f455bb8..02860104f87ca8fe30ed7fa7dbc2a986edd80a11 100644 --- a/perl-Socket.spec +++ b/perl-Socket.spec @@ -1,74 +1,55 @@ -%define anolis_release 3 +%define anolis_release 4 + Name: perl-Socket Epoch: 4 Version: 2.036 Release: %{anolis_release}%{?dist} -Summary: Networking constants and support functions License: GPL+ or Artistic +Summary: Networking constants and support functions URL: https://metacpan.org/release/Socket Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Socket-%{version}.tar.gz -BuildRequires: coreutils -BuildRequires: findutils -BuildRequires: gcc -BuildRequires: make -BuildRequires: perl-devel -BuildRequires: perl-macros -BuildRequires: perl-generators -BuildRequires: perl-interpreter -BuildRequires: perl(Config) -BuildRequires: perl(ExtUtils::CBuilder) -BuildRequires: perl(ExtUtils::Constant) >= 0.23 -# ExtUtils::Constant::ProxySubs not used -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: perl(strict) -BuildRequires: perl(warnings) + +BuildRequires: gcc make findutils coreutils +BuildRequires: perl-macros perl-devel perl-generators perl-interpreter +BuildRequires: perl(warnings) perl(strict) perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(ExtUtils::Constant) >= 0.23 perl(ExtUtils::CBuilder) perl(Config) # Run-time: -BuildRequires: perl(:VERSION) >= 5.6.1 -BuildRequires: perl(Carp) -BuildRequires: perl(Exporter) -# Scalar::Util is needed only if getaddrinfo(3) does not exist. Not our case. -BuildRequires: perl(warnings::register) -BuildRequires: perl(XSLoader) +BuildRequires: perl(XSLoader) perl(warnings::register) +BuildRequires: perl(Carp) perl(Exporter) perl(:VERSION) >= 5.6.1 # Tests only: -BuildRequires: perl(Errno) -BuildRequires: perl(Test::More) +BuildRequires: perl(Test::More) perl(Errno) + Requires: perl(:VERSION) >= 5.6.1 +Obsoletes: %{name}-tests < %{EVR} + %{?perl_default_filter} %description -This Perl module provides a variety of constants, structure manipulators and -other functions related to socket-based networking. The values and functions -provided are useful when used in conjunction with Perl core functions such as -socket(), setsockopt() and bind(). It also provides several other support -functions, mostly for dealing with conversions of network addresses between -human-readable and native binary forms, and for hostname resolver operations. +This module provides a variety of constants, structure manipulators and other +functions related to socket-based networking. The values and functions provided +are useful when used in conjunction with Perl core functions such as socket(), +setsockopt() and bind(). It also provides several other support functions, +mostly for dealing with conversions of network addresses between human-readable +and native binary forms, and for hostname resolver operations. + +Some constants and functions are exported by default by this module; but for +backward-compatibility any recently-added symbols are not exported by default +and must be requested explicitly. When an import list is provided to the use +Socket line, the default exports are not automatically imported. It is +therefore best practice to always to explicitly list all the symbols required. %package doc Summary: Documentation files for %{name} -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{EVR} BuildArch: noarch %description doc The %{name}-doc package contains documentation files for %{name}. -%package tests -Summary: Tests for %{name} -Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} -Requires: perl-Test-Harness - -%description tests -Tests from %{name}. Execute them -with "%{_libexecdir}/%{name}/test". - %prep -%setup -q -n Socket-%{version} +%autosetup -p1 -n Socket-%{version} -# Help file to recognise the Perl scripts -for F in t/*.t; do - perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" - chmod +x "$F" -done %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" @@ -79,15 +60,6 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete %{_fixperms} $RPM_BUILD_ROOT/* -# 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 export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test @@ -101,10 +73,10 @@ make test %files doc %doc Changes -%files tests -%{_libexecdir}/%{name} - %changelog +* Sat Apr 15 2023 yuanhui - 4:2.036-4 +- Optimize the spec file + * Thu Feb 09 2023 mgb01105731 - 4:2.036-3 - remove versioned MODULE_COMPAT_ requires