Skip to content

Commit 8c88392

Browse files
authored
Upgrade: perl-File-Slurper version to 0.014 (#12760)
1 parent d828b79 commit 8c88392

3 files changed

Lines changed: 47 additions & 12 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"perl-File-Slurper-0.012.tar.gz": "4efb2ea416b110a1bda6f8133549cc6ea3676402e3caf7529fce0313250aa578"
3+
"File-Slurper-0.014.tar.gz": "d5a36487339888c3cd758e648160ee1d70eb4153cacbaff57846dbcefb344b0c"
44
}
5-
}
5+
}

SPECS-EXTENDED/perl-File-Slurper/perl-File-Slurper.spec

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
Name: perl-File-Slurper
2-
Version: 0.012
3-
Release: 8%{?dist}
2+
Version: 0.014
3+
Release: 1%{?dist}
44
Summary: Simple, sane and efficient module to slurp a file
5-
License: GPL+ or Artistic
5+
License: GPL-1.0-or-later OR Artistic-1.0-Perl
66
Vendor: Microsoft Corporation
77
Distribution: Azure Linux
88
URL: https://metacpan.org/release/File-Slurper
9-
Source0: https://cpan.metacpan.org/authors/id/L/LE/LEONT/File-Slurper-%{version}.tar.gz#/perl-File-Slurper-%{version}.tar.gz
9+
Source0: https://cpan.metacpan.org/authors/id/L/LE/LEONT/File-Slurper-%{version}.tar.gz
1010
BuildArch: noarch
1111
# Build
12+
BuildRequires: coreutils
1213
BuildRequires: make
1314
BuildRequires: perl-generators
1415
BuildRequires: perl-interpreter
16+
BuildRequires: perl(Config)
1517
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
1618
BuildRequires: perl(strict)
1719
BuildRequires: perl(warnings)
@@ -28,25 +30,51 @@ BuildRequires: perl(File::Temp)
2830
BuildRequires: perl(FindBin)
2931
BuildRequires: perl(Test::More)
3032
BuildRequires: perl(Test::Warnings)
31-
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
3233
Recommends: perl(PerlIO::utf8_strict)
3334

3435
%description
3536
This module provides functions for fast and correct slurping and spewing.
3637
All functions are optionally exported.
3738

39+
%package tests
40+
Summary: Tests for %{name}
41+
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
42+
Requires: perl-Test-Harness
43+
44+
%description tests
45+
Tests from %{name}. Execute them
46+
with "%{_libexecdir}/%{name}/test".
47+
3848
%prep
3949
%setup -q -n File-Slurper-%{version}
4050

51+
# Help generators to recognize Perl scripts
52+
for F in t/*.t; do
53+
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
54+
chmod +x "$F"
55+
done
56+
4157
%build
42-
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
43-
make %{?_smp_mflags}
58+
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
59+
%{make_build}
4460

4561
%install
46-
make pure_install DESTDIR=%{buildroot}
62+
%{make_install}
4763
%{_fixperms} %{buildroot}/*
4864

65+
# Install tests
66+
mkdir -p %{buildroot}%{_libexecdir}/%{name}
67+
cp -a t %{buildroot}%{_libexecdir}/%{name}
68+
mkdir -p %{buildroot}%{_libexecdir}/%{name}/lib/File
69+
ln -s %{perl_vendorlib}/File/Slurper.pm %{buildroot}%{_libexecdir}/%{name}/lib/File
70+
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
71+
#!/bin/sh
72+
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
73+
EOF
74+
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
75+
4976
%check
77+
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
5078
make test
5179

5280
%files
@@ -55,7 +83,14 @@ make test
5583
%{perl_vendorlib}/*
5684
%{_mandir}/man3/*
5785

86+
%files tests
87+
%{_libexecdir}/%{name}
88+
5889
%changelog
90+
* Mon Feb 27 2025 Sumit Jena <v-sumitjena@microsoft.com> - 0.014-1
91+
- Update to version 0.014
92+
- License verified
93+
5994
* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 0.012-8
6095
- Initial CBL-Mariner import from Fedora 32 (license: MIT).
6196

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17693,8 +17693,8 @@
1769317693
"type": "other",
1769417694
"other": {
1769517695
"name": "perl-File-Slurper",
17696-
"version": "0.012",
17697-
"downloadUrl": "https://cpan.metacpan.org/authors/id/L/LE/LEONT/File-Slurper-0.012.tar.gz"
17696+
"version": "0.014",
17697+
"downloadUrl": "https://cpan.metacpan.org/authors/id/L/LE/LEONT/File-Slurper-0.014.tar.gz"
1769817698
}
1769917699
}
1770017700
},

0 commit comments

Comments
 (0)