!2 init package
From: @leeffo Reviewed-by: @wk333 Signed-off-by: @wk333
This commit is contained in:
commit
e9a946e268
BIN
Tie-Handle-Offset-0.004.tar.gz
Normal file
BIN
Tie-Handle-Offset-0.004.tar.gz
Normal file
Binary file not shown.
78
perl-Tie-Handle-Offset.spec
Normal file
78
perl-Tie-Handle-Offset.spec
Normal file
@ -0,0 +1,78 @@
|
||||
Name: perl-Tie-Handle-Offset
|
||||
Version: 0.004
|
||||
Release: 1
|
||||
Summary: Tied handle that hides the beginning of a file
|
||||
License: Apache-2.0
|
||||
URL: https://metacpan.org/release/Tie-Handle-Offset
|
||||
Source0: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Tie-Handle-Offset-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
# Build
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
BuildRequires: perl(strict)
|
||||
BuildRequires: perl(warnings)
|
||||
# Runtime
|
||||
BuildRequires: perl(Tie::Handle)
|
||||
# Tests only
|
||||
BuildRequires: perl(File::Spec)
|
||||
BuildRequires: perl(Test::More)
|
||||
Requires: perl(warnings)
|
||||
|
||||
%description
|
||||
This modules provides a file handle that hides the beginning of a file.
|
||||
After opening, the file is positioned at the offset location. seek() and
|
||||
tell() calls are modified to preserve the offset.
|
||||
|
||||
%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 Tie-Handle-Offset-%{version}
|
||||
|
||||
# Help generators to recognize 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
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
%{_fixperms} %{buildroot}/*
|
||||
|
||||
# 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
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc Changes CONTRIBUTING.mkdn README
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Wed Jul 12 2023 leeffo <liweiganga@uniontech.com> - 0.004-1
|
||||
- init package
|
||||
4
perl-Tie-Handle-Offset.yaml
Normal file
4
perl-Tie-Handle-Offset.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: metacpan
|
||||
src_repo: Tie-Handle-Offset
|
||||
tag_prefix: ^v
|
||||
separator: .
|
||||
Loading…
x
Reference in New Issue
Block a user