| |
@@ -1,15 +1,17 @@
|
| |
Name: perl-String-ShellQuote
|
| |
Version: 1.04
|
| |
- Release: 42%{?dist}
|
| |
+ Release: 43%{?dist}
|
| |
Summary: Perl module for quoting strings for passing through the shell
|
| |
License: (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-2.0-or-later
|
| |
URL: https://metacpan.org/release/String-ShellQuote
|
| |
Source0: https://cpan.metacpan.org/authors/id/R/RO/ROSCH/String-ShellQuote-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
# Build
|
| |
- BuildRequires: make
|
| |
- BuildRequires: perl-interpreter
|
| |
+ BuildRequires: coreutils
|
| |
+ BuildRequires: make
|
| |
BuildRequires: perl-generators
|
| |
+ BuildRequires: perl-interpreter
|
| |
+ BuildRequires: perl(Config)
|
| |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
# Runtime
|
| |
BuildRequires: perl(Carp)
|
| |
@@ -26,17 +28,40 @@
|
| |
are useful for quoting strings which are going to pass through the
|
| |
shell or a shell-like object.
|
| |
|
| |
+ %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 String-ShellQuote-%{version}
|
| |
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' test.t
|
| |
+ chmod +x test.t
|
| |
+
|
| |
%build
|
| |
- perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
|
| |
- make %{?_smp_mflags}
|
| |
+ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
+ %{make_build}
|
| |
|
| |
%install
|
| |
- make pure_install DESTDIR=%{buildroot}
|
| |
+ %{make_install}
|
| |
%{_fixperms} %{buildroot}/*
|
| |
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}/t
|
| |
+ cp -a test.t %{buildroot}%{_libexecdir}/%{name}/t
|
| |
+ perl -i -pe 's{blib/script}{%{_bindir}}' %{buildroot}%{_libexecdir}/%{name}/t/test.t
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/sh
|
| |
+ cd %{_libexecdir}/%{name} && exec prove -I . -r -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
+
|
| |
%check
|
| |
make test
|
| |
|
| |
@@ -44,10 +69,16 @@
|
| |
%doc Changes README
|
| |
%{_bindir}/shell-quote
|
| |
%{perl_vendorlib}/String
|
| |
- %{_mandir}/man1/*
|
| |
- %{_mandir}/man3/*
|
| |
+ %{_mandir}/man1/shell-quote*
|
| |
+ %{_mandir}/man3/String::ShellQuote*
|
| |
+
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
|
| |
%changelog
|
| |
+ * Thu Feb 08 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1.04-43
|
| |
+ - Package tests
|
| |
+
|
| |
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.04-42
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
| |
|
| |