From 77594eb792f841bb60c67c0c37569ef757914ba0 Mon Sep 17 00:00:00 2001
From: Paul Howarth <p...@city-fan.org>
Date: Wed, 5 Apr 2017 13:19:03 +0100
Subject: Clean up spec a bit

- Classify buildreqs by usage
- Use gnupg2 rather than gnupg
- Use %license where possible
- Turn off exec bits in examples to avoid doc-file dependencies
- Drop legacy Group: tag
---
 .rpmlint              |  3 +++
 perl-Test-Assert.spec | 58 +++++++++++++++++++++++++++++++++++----------------
 2 files changed, 43 insertions(+), 18 deletions(-)
 create mode 100644 .rpmlint

diff --git a/.rpmlint b/.rpmlint
new file mode 100644
index 0000000..38ee748
--- /dev/null
+++ b/.rpmlint
@@ -0,0 +1,3 @@
+from Config import *
+addFilter("incorrect-fsf-address /usr/share/.*/LICENSE");
+addFilter("patch-not-applied Patch0: Test-Assert-0.0504-Critic.patch");
diff --git a/perl-Test-Assert.spec b/perl-Test-Assert.spec
index 8e31cc5..a197c7f 100644
--- a/perl-Test-Assert.spec
+++ b/perl-Test-Assert.spec
@@ -1,33 +1,42 @@
 Name:          perl-Test-Assert
 Version:       0.0504
-Release:       17%{?dist}
+Release:       18%{?dist}
 Summary:       Assertion methods for those who like JUnit
 License:       GPL+ or Artistic
-Group:         Development/Libraries
 URL:           http://search.cpan.org/dist/Test-Assert/
 Source0:       
http://search.cpan.org/CPAN/authors/id/D/DE/DEXTER/Test-Assert-%{version}.tar.gz
 # Upstream signing key, bug #1118362
 Source1:       C0B10A5B.pub
 Patch0:                Test-Assert-0.0504-Critic.patch
 BuildArch:     noarch
+# Module Build
+BuildRequires: coreutils
+BuildRequires: findutils
+BuildRequires: gnupg2
+BuildRequires: make
 BuildRequires: perl
 BuildRequires: perl-generators
-BuildRequires: perl(Carp)
-BuildRequires: perl(Class::Inspector)
+BuildRequires: perl(Module::Build)
+# Module Runtime
 BuildRequires: perl(constant)
 BuildRequires: perl(constant::boolean) >= 0.02
-BuildRequires: perl(Cwd)
 BuildRequires: perl(Exception::Base) >= 0.21
-BuildRequires: perl(File::Spec)
-BuildRequires: perl(Module::Build)
-BuildRequires: perl(parent)
 BuildRequires: perl(strict)
 BuildRequires: perl(Symbol::Util) >= 0.0202
+BuildRequires: perl(warnings)
+# Test Suite
+BuildRequires: perl(Carp)
+BuildRequires: perl(Class::Inspector)
+BuildRequires: perl(Cwd)
+BuildRequires: perl(File::Basename)
+BuildRequires: perl(File::Spec)
+BuildRequires: perl(parent)
 BuildRequires: perl(Test::Builder)
 BuildRequires: perl(Test::More) >= 0.88
 BuildRequires: perl(Test::Unit::Lite) >= 0.11
-BuildRequires: perl(warnings)
 # Release test requirements
+BuildRequires: patch
+BuildRequires: perl(File::Find)
 BuildRequires: perl(File::Slurp)
 BuildRequires: perl(Test::CheckChanges)
 BuildRequires: perl(Test::Distribution)
@@ -38,11 +47,9 @@ BuildRequires:       perl(Test::Pod) >= 1.14
 BuildRequires: perl(Test::Pod::Coverage) >= 1.04
 BuildRequires: perl(Test::Signature)
 BuildRequires: perl(Test::Spelling), hunspell-en
+# Dependencies
 Requires:      perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
-# Avoid doc-file dependencies
-%{?perl_default_filter}
-
 %description
 This class provides a set of assertion methods useful for writing tests.
 The API is based on JUnit4 and Test::Unit and the methods die on failure.
@@ -53,6 +60,9 @@ The API is based on JUnit4 and Test::Unit and the methods die 
on failure.
 # Copy up documentation for convenience with %%doc
 cp -a Test-Assert-%{version}/{Changes,eg,LICENSE,README} .
 
+# Drop exec bits and avoid doc-file dependencies
+chmod -c -x eg/*
+
 %build
 cd Test-Assert-%{version}
 perl Build.PL --installdirs=vendor
@@ -63,7 +73,7 @@ cd -
 cd Test-Assert-%{version}
 ./Build install --destdir=%{buildroot} --create_packlist=0
 cd -
-%{_fixperms} %{buildroot}
+%{_fixperms} -c %{buildroot}
 
 %check
 cd Test-Assert-%{version}
@@ -90,9 +100,9 @@ RELEASE_TESTS="$(echo $RELEASE_TESTS | sed 
's|xt/perlcritic.t||')"
 
 # Use bundled signing key
 export GNUPGHOME=$(mktemp -d)
-gpg --import '%{SOURCE1}'
+gpg2 --import '%{SOURCE1}'
 
-./Build test --test_files "$RELEASE_TESTS"
+RELEASE_TESTING=1 ./Build test --test_files "$RELEASE_TESTS"
 
 # Clean bundled signing key
 rm -r "$GNUPGHOME"
@@ -121,13 +131,25 @@ mv xt/pod_spellrc.orig xt/pod_spellrc
 cd -
 
 %files
-%doc Changes LICENSE README eg/
+%if 0%{?_licensedir:1}
+%license LICENSE
+%else
+%doc LICENSE
+%endif
+%doc Changes README eg/
 %{perl_vendorlib}/Exception/
 %{perl_vendorlib}/Test/
-%{_mandir}/man3/Exception::Assertion.3pm*
-%{_mandir}/man3/Test::Assert.3pm*
+%{_mandir}/man3/Exception::Assertion.3*
+%{_mandir}/man3/Test::Assert.3*
 
 %changelog
+* Wed Apr  5 2017 Paul Howarth <p...@city-fan.org> - 0.0504-18
+- Classify buildreqs by usage
+- Use gnupg2 rather than gnupg
+- Use %%license where possible
+- Turn off exec bits in examples to avoid doc-file dependencies
+- Drop legacy Group: tag
+
 * Sat Feb 11 2017 Fedora Release Engineering <rel...@fedoraproject.org> - 
0.0504-17
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
 
-- 
cgit v1.1


        
https://src.fedoraproject.org/cgit/perl-Test-Assert.git/commit/?h=master&id=77594eb792f841bb60c67c0c37569ef757914ba0
_______________________________________________
perl-devel mailing list -- perl-devel@lists.fedoraproject.org
To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org

Reply via email to