From cea4fc49ac4762446edd21ab7ee25615aaf6bb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 12 Jan 2022 10:47:56 +0100 Subject: [PATCH] Package the tests --- perl-Crypt-RC4.rpmlintrc | 1 + perl-Crypt-RC4.spec | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 perl-Crypt-RC4.rpmlintrc diff --git a/perl-Crypt-RC4.rpmlintrc b/perl-Crypt-RC4.rpmlintrc new file mode 100644 index 0000000..a5d5f5e --- /dev/null +++ b/perl-Crypt-RC4.rpmlintrc @@ -0,0 +1 @@ +addFilter('-tests\.noarch: W: no-documentation') diff --git a/perl-Crypt-RC4.spec b/perl-Crypt-RC4.spec index 1db69cf..e2d0253 100644 --- a/perl-Crypt-RC4.spec +++ b/perl-Crypt-RC4.spec @@ -29,6 +29,15 @@ shows that the period of the cipher is overwhelmingly likely to be greater than the cipher can be expected to run very quickly in software. Independent analysts have scrutinized the algorithm and it is considered secure. +%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 Crypt-RC4-%{version} @@ -39,6 +48,14 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %install %{make_install} %{_fixperms} %{buildroot}/* +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a test.pl %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +cd %{_libexecdir}/%{name} && exec prove -I . test.pl +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test %check make test @@ -48,9 +65,13 @@ make test %{perl_vendorlib}/* %{_mandir}/man3/* +%files tests +%{_libexecdir}/%{name} + %changelog * Wed Jan 12 2022 Petr Pisar - 2.02-30 - Correct dependencies +- Package the tests * Thu Jul 22 2021 Fedora Release Engineering - 2.02-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild