diff --git a/Linux-Pid-0.04.tar.gz b/Linux-Pid-0.04.tar.gz new file mode 100644 index 0000000..3632af8 Binary files /dev/null and b/Linux-Pid-0.04.tar.gz differ diff --git a/perl-Linux-Pid.spec b/perl-Linux-Pid.spec new file mode 100644 index 0000000..3490c05 --- /dev/null +++ b/perl-Linux-Pid.spec @@ -0,0 +1,67 @@ +Name: perl-Linux-Pid +Version: 0.04 +Release: 1 +Summary: Get the native PID and the PPID on Linux +License: GPL+ or Artistic +URL: https://metacpan.org/release/Linux-Pid +Source0: https://cpan.metacpan.org/modules/by-module/Linux/Linux-Pid-%{version}.tar.gz + +BuildRequires: make +BuildRequires: gcc +BuildRequires: perl-interpreter +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) +# Run-time: +# Carp not used at tests +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) +# Tests: +BuildRequires: perl(Config) +BuildRequires: perl(Test::More) +BuildRequires: perl(threads) +BuildRequires: perl(threads::shared) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(Carp) + +%{?perl_default_filter} + +%description +Linux::Pid gets the native PID and the PPID on Linux. It's useful with +multithreaded programs. Linux's C library returns different values of +the PID and the PPID from different threads. This module forces Perl +to call the underlying C functions getpid() and getppid(). + + +%prep +%setup -q -n Linux-Pid-%{version} + + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" +make %{?_smp_mflags} + + +%install +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' +find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' +find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' +chmod -R u+w $RPM_BUILD_ROOT/* + + +%check +make test + + +%files +%doc README Changes +%{perl_vendorarch}/auto/Linux +%{perl_vendorarch}/Linux +%{_mandir}/man3/Linux::Pid.3pm.gz + + +%changelog +* Wed Jan 04 2023 Zeng Liwen - 0.04-1 +- init.