init package
Signed-off-by: cherry530 <707078654@qq.com>
This commit is contained in:
parent
89583a7868
commit
54285c46a6
BIN
XS-Parse-Keyword-0.33.tar.gz
Normal file
BIN
XS-Parse-Keyword-0.33.tar.gz
Normal file
Binary file not shown.
2
macros.perl-XS-Parse-Keyword
Normal file
2
macros.perl-XS-Parse-Keyword
Normal file
@ -0,0 +1,2 @@
|
||||
%perl_XS_Parse_Infix_ABI perl(:XS_Parse_Infix_ABI_%(perl -e 'require XS::Parse::Infix::Builder_data; print $1 if XS::Parse::Infix::Builder_data::XSPARSEINFIX_H() =~ m{^#define XSPARSEINFIX_ABI_VERSION (\\d+)}m'))
|
||||
%perl_XS_Parse_Keyword_ABI perl(:XS_Parse_Keyword_ABI_%(perl -e 'require XS::Parse::Keyword::Builder_data; print $1 if XS::Parse::Keyword::Builder_data::XSPARSEKEYWORD_H() =~ m{^#define XSPARSEKEYWORD_ABI_VERSION (\\d+)}m'))
|
||||
135
perl-XS-Parse-Keyword.spec
Normal file
135
perl-XS-Parse-Keyword.spec
Normal file
@ -0,0 +1,135 @@
|
||||
%bcond_without perl_XS_Parse_Keyword_enables_optional_test
|
||||
|
||||
Name: perl-XS-Parse-Keyword
|
||||
Version: 0.33
|
||||
Release: 1
|
||||
Summary: XS functions to assist in parsing keyword syntax
|
||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||
URL: https://metacpan.org/release/XS-Parse-Keyword
|
||||
Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/XS-Parse-Keyword-%{version}.tar.gz
|
||||
Source1: macros.perl-XS-Parse-Keyword
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: perl-devel
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(:VERSION) >= 5.14
|
||||
BuildRequires: perl(B)
|
||||
BuildRequires: perl(base)
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(ExtUtils::CBuilder)
|
||||
BuildRequires: perl(ExtUtils::CChecker)
|
||||
BuildRequires: perl(lib)
|
||||
BuildRequires: perl(Module::Build)
|
||||
BuildRequires: perl(strict)
|
||||
BuildRequires: perl(Text::ParseWords)
|
||||
BuildRequires: perl(warnings)
|
||||
# Run-time:
|
||||
BuildRequires: perl(constant)
|
||||
BuildRequires: perl(XSLoader)
|
||||
# Tests:
|
||||
BuildRequires: perl(B::Deparse)
|
||||
BuildRequires: perl(ExtUtils::ParseXS) >= 3.16
|
||||
BuildRequires: perl(overload)
|
||||
BuildRequires: perl(Test::More) >= 0.88
|
||||
BuildRequires: perl(utf8)
|
||||
%if %{with perl_XS_Parse_Keyword_enables_optional_test}
|
||||
# Optional tests:
|
||||
BuildRequires: perl(Test::Pod) >= 1.00
|
||||
%endif
|
||||
Provides: perl(:XS_Parse_Keyword_ABI_1)
|
||||
Provides: perl(:XS_Parse_Keyword_ABI_2)
|
||||
Provides: perl(:XS_Parse_Infix_ABI_1)
|
||||
Provides: perl(:XS_Parse_Infix_ABI_2)
|
||||
|
||||
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Test::More\\)$
|
||||
%global __requires_exclude %{__requires_exclude}|^perl\\(testcase\\)
|
||||
%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\(testcase\\)
|
||||
|
||||
%description
|
||||
This module provides some XS functions to assist in writing syntax modules
|
||||
that provide new perl-visible syntax, primarily for authors of keyword plugins
|
||||
using the PL_keyword_plugin hook mechanism.
|
||||
|
||||
%package Builder
|
||||
Summary: Build-time support for XS::Parse::Keyword
|
||||
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-interpreter
|
||||
Conflicts: %{name}%{?_isa} < 0.06
|
||||
|
||||
%description Builder
|
||||
This module provides a build-time helper to assist authors writing XS modules
|
||||
that use XS::Parse::Keyword. It prepares a Module::Build-using distribution to
|
||||
be able to make use of XS::Parse::Keyword.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
Requires: perl(Test::More) >= 0.88
|
||||
Requires: perl(XSLoader)
|
||||
|
||||
%description tests
|
||||
Tests from %{name}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n XS-Parse-Keyword-%{version}
|
||||
%if !%{with perl_XS_Parse_Keyword_enables_optional_test}
|
||||
rm t/99pod.t
|
||||
perl -i -ne 'print $_ unless m{\A\Qt/99pod.t\E\b}' MANIFEST
|
||||
%endif
|
||||
chmod +x t/*.t
|
||||
|
||||
%build
|
||||
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
|
||||
./Build
|
||||
./Build testlib
|
||||
|
||||
%install
|
||||
./Build install --destdir=%{buildroot} --create_packlist=0
|
||||
find %{buildroot} -type f -name '*.bs' -size 0 -delete
|
||||
%{_fixperms} %{buildroot}/*
|
||||
install -D -m 0644 -t %{buildroot}%{_rpmmacrodir} %{SOURCE1}
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||
find %{buildroot}%{_libexecdir}/%{name} -type f \
|
||||
\( -name '*.bs' -o -name '*.c' -o -name '*.o' \) -delete
|
||||
%if %{with perl_XS_Parse_Keyword_enables_optional_test}
|
||||
rm %{buildroot}%{_libexecdir}/%{name}/t/99pod.t
|
||||
%endif
|
||||
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}')
|
||||
./Build test
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc Changes README
|
||||
%dir %{perl_vendorarch}/auto/XS
|
||||
%dir %{perl_vendorarch}/auto/XS/Parse
|
||||
%{perl_vendorarch}/auto/XS/Parse/Keyword
|
||||
%dir %{perl_vendorarch}/XS
|
||||
%dir %{perl_vendorarch}/XS/Parse
|
||||
%{perl_vendorarch}/XS/Parse/Infix.pm
|
||||
%{perl_vendorarch}/XS/Parse/Keyword.pm
|
||||
%{_mandir}/man3/XS::Parse::Infix.*
|
||||
%{_mandir}/man3/XS::Parse::Keyword.*
|
||||
|
||||
%files Builder
|
||||
%{perl_vendorarch}/XS/Parse/Infix
|
||||
%{perl_vendorarch}/XS/Parse/Keyword
|
||||
%{_mandir}/man3/XS::Parse::Infix::*
|
||||
%{_mandir}/man3/XS::Parse::Keyword::*
|
||||
%{_rpmmacrodir}/macros.%{name}
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu May 11 2023 xu_ping <707078654@qq.com> - 0.33-1
|
||||
- init package
|
||||
4
perl-XS-Parse-Keyword.yaml
Normal file
4
perl-XS-Parse-Keyword.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: metacpan
|
||||
src_repo: XS-Parse-Keyword
|
||||
tag_prefix: "^v"
|
||||
seperator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user