From a8b1fd26684677d17ae71bdbfb7508f439fcb3fe Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 28 Jun 2021 13:14:22 +0200 Subject: [PATCH] Move normalize shebangs to %prep --- perl-Syntax-Keyword-Try.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/perl-Syntax-Keyword-Try.spec b/perl-Syntax-Keyword-Try.spec index 8af00a3..acd0ab3 100644 --- a/perl-Syntax-Keyword-Try.spec +++ b/perl-Syntax-Keyword-Try.spec @@ -58,16 +58,17 @@ with "%{_libexecdir}/%{name}/test". %prep %setup -q -n Syntax-Keyword-Try-%{version} +# Help file to recognise the 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 Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS" ./Build -# Help file to recognise the 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 - %install ./Build install --destdir=%{buildroot} --create_packlist=0 find %{buildroot} -type f -name '*.bs' -size 0 -delete