From d45acfc753141010b8491ca46cad506af0bb31bc Mon Sep 17 00:00:00 2001 From: Yuanhong Peng Date: Fri, 14 Apr 2023 16:57:33 +0800 Subject: [PATCH] Refactor the specfile Signed-off-by: Yuanhong Peng --- perl-IPC-System-Simple.spec | 73 +++++++++++-------------------------- 1 file changed, 22 insertions(+), 51 deletions(-) diff --git a/perl-IPC-System-Simple.spec b/perl-IPC-System-Simple.spec index 9d9995d..90a2224 100644 --- a/perl-IPC-System-Simple.spec +++ b/perl-IPC-System-Simple.spec @@ -1,79 +1,47 @@ -%define anolis_release 3 +%define anolis_release 4 +%global modname IPC-System-Simple -# Run optional tests -%bcond_with perl_IPC_System_Simple_enables_optional_test - -Name: perl-IPC-System-Simple +Name: perl-%{modname} Version: 1.30 Release: %{anolis_release}%{?dist} License: GPL+ or Artistic Summary: Run commands simply, with detailed diagnostics -URL: https://metacpan.org/release/IPC-System-Simple -Source0: https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/IPC-System-Simple-%{version}.tar.gz +URL: https://metacpan.org/release/%{modname} +Source0: https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/%{modname}-%{version}.tar.gz + +BuildRequires: make findutils coreutils perl-generators perl-interpreter +BuildRequires: perl(ExtUtils::MakeMaker) perl(Carp) perl(Scalar::Util) +BuildRequires: perl(constant) perl(Config) perl(List::Util) perl(Exporter) +BuildRequires: perl(warnings) perl(strict) perl(re) perl(POSIX) +BuildRequires: perl(Test) perl(Test::More) perl(File::Basename) BuildArch: noarch -# Module Build -BuildRequires: coreutils -BuildRequires: findutils -BuildRequires: make -BuildRequires: perl-generators -BuildRequires: perl-interpreter -BuildRequires: perl(ExtUtils::MakeMaker) -# Module Runtime -BuildRequires: perl(Carp) -BuildRequires: perl(Config) -BuildRequires: perl(constant) -BuildRequires: perl(Exporter) -BuildRequires: perl(List::Util) -BuildRequires: perl(POSIX) -BuildRequires: perl(re) -BuildRequires: perl(Scalar::Util) -BuildRequires: perl(strict) -BuildRequires: perl(warnings) -# Test Suite -BuildRequires: perl(File::Basename) -BuildRequires: perl(Test) -BuildRequires: perl(Test::More) -%if %{with perl_IPC_System_Simple_enables_optional_test} -# Optional Tests -BuildRequires: perl(BSD::Resource) -BuildRequires: perl(Test::NoWarnings) -%endif -# Dependencies %description Calling Perl's in-built 'system()' function is easy; determining if it was successful is _hard_. Let's face it, '$?' isn't the nicest variable in the world to play with, and even if you _do_ check it, producing a -well-formatted error string takes a lot of work. 'IPC::System::Simple' -takes the hard work out of calling external commands. In fact, if you -want to be really lazy, you can just write: - - use IPC::System::Simple qw(system); - -and all of your "system" commands will either succeed (run to completion and -return a zero exit value), or die with rich diagnostic messages. +well-formatted error string takes a lot of work. %package doc Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{EVR} BuildArch: noarch %description doc The %{name}-doc package contains documentation files for %{name}. %prep -%setup -q -n IPC-System-Simple-%{version} +%autosetup -n %{modname}-%{version} -# Avoid doc-file dependencies -chmod -c -x examples/*.pl +chmod -x examples/*.pl %build perl Makefile.PL INSTALLDIRS=vendor -make %{?_smp_mflags} +%make_build %install -make pure_install DESTDIR=%{buildroot} +%make_install find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} @@ -81,14 +49,17 @@ find %{buildroot} -type f -name .packlist -delete make test %files -%license LICENSE %{perl_vendorlib}/IPC/ %{_mandir}/man3/IPC::System::Simple.3* +%license LICENSE %files doc -%doc Changes README examples/ +%doc examples/ README Changes %changelog +* Fri Apr 14 2023 Yuanhong Peng - 1.30-4 +- Refactor the specfile + * Mon Feb 06 2023 mgb01105731 - 1.30-3 - remove versioned MODULE_COMPAT_ requires -- Gitee