diff --git a/POSIX-strptime-0.13.tar.gz b/POSIX-strptime-0.13.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..094f77be88eec7afbaeece23423243c448a8e1f1 Binary files /dev/null and b/POSIX-strptime-0.13.tar.gz differ diff --git a/perl-POSIX-strptime.spec b/perl-POSIX-strptime.spec new file mode 100644 index 0000000000000000000000000000000000000000..6ff45375fc5385679e36bd246d1f7a028c0e3ac5 --- /dev/null +++ b/perl-POSIX-strptime.spec @@ -0,0 +1,81 @@ +Name: perl-POSIX-strptime +Version: 0.13 +Release: 1 +Summary: Perl extension to the POSIX date parsing strptime(3) function +License: GPL-1.0-or-later OR Artistic-1.0-Perl +URL: https://metacpan.org/release/POSIX-strptime +Source0: https://cpan.metacpan.org/authors/id/G/GO/GOZER/POSIX-strptime-%{version}.tar.gz +BuildRequires: findutils +BuildRequires: gcc +BuildRequires: make +BuildRequires: perl-interpreter +BuildRequires: perl-devel +BuildRequires: perl-generators +BuildRequires: perl(Exporter) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Module::Signature) +BuildRequires: perl(POSIX) +BuildRequires: perl(Socket) +BuildRequires: perl(strict) +BuildRequires: perl(Test::More) +BuildRequires: perl(vars) +BuildRequires: perl(warnings) +BuildRequires: perl(XSLoader) + +%{?perl_default_filter} + +%description +Perl interface to strptime(3). + +%package tests +Summary: Tests for %{name} +BuildArch: noarch +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 POSIX-strptime-%{version} +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F" + chmod +x "$F" +done + +%build +perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" +%{make_build} + +%install +%{make_install} +find %{buildroot} -type f -name .packlist -delete +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +# Remove author tests +rm -f %{buildroot}%{_libexecdir}/%{name}/t/00* +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 +%{_fixperms} %{buildroot}/* + +%check +make test + +%files +%doc Changes +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/POSIX* +%{_mandir}/man3/* + +%files tests +%{_libexecdir}/%{name} + +%changelog +* Mon Apr 01 2024 konglidong - 0.13-1 +- package init diff --git a/perl-POSIX-strptime.yaml b/perl-POSIX-strptime.yaml new file mode 100644 index 0000000000000000000000000000000000000000..390e2f950df4cb17f5ea0b6e22e0aef7ac912b04 --- /dev/null +++ b/perl-POSIX-strptime.yaml @@ -0,0 +1,4 @@ +version_control: metacpan +src_repo: POSIX-strptime +tag_prefix: "^" +separator: "."