Modernize the spec file

This commit is contained in:
Petr Písař 2020-02-05 08:57:55 +01:00
parent 4f12049802
commit 6f3740df63

View File

@ -24,7 +24,6 @@ BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(strict)
BuildRequires: sed
# Run-time
BuildRequires: perl(:VERSION) >= 5.6
BuildRequires: perl(Carp)
@ -74,8 +73,7 @@ sees it.
%setup -q -n Filter-%{version}
# Clean examples
find examples -type f -exec chmod -x -- {} +
sed -i -e '1 s|.*|%(perl -MConfig -e 'print $Config{startperl}')|' \
examples/filtdef
perl -i -MConfig -pe 's/^#!.*/$Config{startperl}/' examples/filtdef
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"
@ -87,6 +85,7 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
%{_fixperms} $RPM_BUILD_ROOT/*
%check
unset AUTHOR_TESTING FULLPERL IS_MAINTAINER PERL_CORE RELEASE_TESTING TRAVIS
make test
%files