From dcfd53d383831c551e2a60d3b0ae3871dd4278a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 2 Jun 2021 16:40:01 +0200 Subject: [PATCH] Subpackage XS::Parse::Keyword::Builder --- macros.perl-XS-Parse-Keyword | 1 + perl-XS-Parse-Keyword.spec | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 macros.perl-XS-Parse-Keyword diff --git a/macros.perl-XS-Parse-Keyword b/macros.perl-XS-Parse-Keyword new file mode 100644 index 0000000..8fd411e --- /dev/null +++ b/macros.perl-XS-Parse-Keyword @@ -0,0 +1 @@ +%perl_XS_Parse_Keyword_ABI perl(:XS_Parse_Keyword_ABI_%(perl -e 'require XS::Parse::Keyword::Builder; open my $f, q{<}, $INC{q{XS/Parse/Keyword/Builder.pm}}; while (<$f>) {print $1 if m{^#define XSPARSEKEYWORD_ABI_VERSION (\\d+)}}')) diff --git a/perl-XS-Parse-Keyword.spec b/perl-XS-Parse-Keyword.spec index 05ca5af..266c134 100644 --- a/perl-XS-Parse-Keyword.spec +++ b/perl-XS-Parse-Keyword.spec @@ -8,6 +8,7 @@ Summary: XS functions to assist in parsing keyword syntax License: GPL+ or Artistic 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 @@ -45,6 +46,19 @@ 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 +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +# Subpackaged in 0.06 +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} @@ -74,6 +88,7 @@ perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS" ./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} # Install tests mkdir -p %{buildroot}%{_libexecdir}/%{name} cp -a t %{buildroot}%{_libexecdir}/%{name} @@ -96,8 +111,15 @@ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print %license LICENSE %doc Changes README %{perl_vendorarch}/auto/* -%{perl_vendorarch}/XS* -%{_mandir}/man3/* +%dir %{perl_vendorarch}/XS +%dir %{perl_vendorarch}/XS/Parse +%{perl_vendorarch}/XS/Parse/Keyword.pm +%{_mandir}/man3/XS::Parse::Keyword.* + +%files Builder +%{perl_vendorarch}/XS/Parse/Keyword +%{_mandir}/man3/XS::Parse::Keyword::* +%{_rpmmacrodir}/macros.%{name} %files tests %{_libexecdir}/%{name} @@ -105,6 +127,7 @@ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print %changelog * Wed Jun 02 2021 Petr Pisar - 0.06-1 - 0.06 bump +- Subpackage XS::Parse::Keyword::Builder * Tue Jun 01 2021 Petr Pisar - 0.05-1 - 0.05 bump