From e7b9601185bc1136433471396682f9778a4585bf Mon Sep 17 00:00:00 2001
From: Paul Howarth <p...@city-fan.org>
Date: Wed, 6 Jan 2016 15:11:58 +0000
Subject: Package clean-up

- Hide package declaration for JSON::PP::Boolean from rpm to avoid need for
  provides filtering
- Classify buildreqs by usage
- Use %license where possible
---
 Types-Serialiser-1.0-provides.patch | 12 ++++++++++++
 perl-Types-Serialiser.spec          | 39 ++++++++++++++++++++++++++-----------
 2 files changed, 40 insertions(+), 11 deletions(-)
 create mode 100644 Types-Serialiser-1.0-provides.patch

diff --git a/Types-Serialiser-1.0-provides.patch 
b/Types-Serialiser-1.0-provides.patch
new file mode 100644
index 0000000..cdaed42
--- /dev/null
+++ b/Types-Serialiser-1.0-provides.patch
@@ -0,0 +1,12 @@
+--- Serialiser.pm
++++ Serialiser.pm
+@@ -102,7 +102,8 @@ Returns false iff C<$value> is C<$Types:
+ BEGIN {
+    # for historical reasons, and to avoid extra dependencies in JSON::PP,
+    # we alias *Types::Serialiser::Boolean with JSON::PP::Boolean.
+-   package JSON::PP::Boolean;
++   package # hide from rpm
++      JSON::PP::Boolean;
+ 
+    *Types::Serialiser::Boolean:: = *JSON::PP::Boolean::;
+ }
diff --git a/perl-Types-Serialiser.spec b/perl-Types-Serialiser.spec
index eddadab..8ed9e98 100644
--- a/perl-Types-Serialiser.spec
+++ b/perl-Types-Serialiser.spec
@@ -1,23 +1,30 @@
 Name:          perl-Types-Serialiser
 Summary:       Simple data types for common serialization formats
 Version:       1.0
-Release:       5%{?dist}
+Release:       6%{?dist}
 License:       GPL+ or Artistic
 Group:         Development/Libraries
 URL:           http://search.cpan.org/dist/Types-Serialiser/
 Source0:       
http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Types-Serialiser-%{version}.tar.gz
 
+Patch0:                Types-Serialiser-1.0-provides.patch
 BuildArch:     noarch
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+# Module Build
+BuildRequires: coreutils
+BuildRequires: findutils
+BuildRequires: make
+BuildRequires: perl
+BuildRequires: perl(ExtUtils::MakeMaker)
+# Module Runtime
 BuildRequires: perl(Carp)
 BuildRequires: perl(common::sense)
-BuildRequires: perl(ExtUtils::MakeMaker)
 BuildRequires: perl(overload)
+# Test Suite
+# (no dependencies)
+# Runtime
 Requires:      perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 Requires:      perl(Carp)
 
-# Filter bogus provide of JSON::PP::Boolean (for rpm ≥ 4.9)
-%global __provides_exclude ^perl\\(JSON::PP::Boolean\\)
-
 %description
 This module provides some extra data types that are used by common
 serialization formats such as JSON or CBOR. The idea is to have a repository of
@@ -27,9 +34,8 @@ implementations so they become interoperable between each 
other.
 %prep
 %setup -q -n Types-Serialiser-%{version}
 
-# Filter bogus provide of JSON::PP::Boolean (for rpm < 4.9)
-%global provfilt /bin/sh -c "%{__perl_provides} | grep -v 
'^perl(JSON::PP::Boolean)'"
-%define __perl_provides %{provfilt}
+# Hide package declaration of JSON::PP::Boolean from rpm
+%patch0
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor
@@ -48,12 +54,23 @@ make test
 rm -rf %{buildroot}
 
 %files
-%doc Changes COPYING README
+%if 0%{?_licensedir:1}
+%license COPYING
+%else
+%doc COPYING
+%endif
+%doc Changes README
 %{perl_vendorlib}/Types/
-%{_mandir}/man3/Types::Serialiser.3pm*
-%{_mandir}/man3/Types::Serialiser::Error.3pm*
+%{_mandir}/man3/Types::Serialiser.3*
+%{_mandir}/man3/Types::Serialiser::Error.3*
 
 %changelog
+* Wed Jan  6 2016 Paul Howarth <p...@city-fan.org> - 1.0-6
+- Hide package declaration for JSON::PP::Boolean from rpm to avoid need for
+  provides filtering
+- Classify buildreqs by usage
+- Use %%license where possible
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-...@lists.fedoraproject.org> 
- 1.0-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
-- 
cgit v0.11.2


        
http://pkgs.fedoraproject.org/cgit/perl-Types-Serialiser.git/commit/?h=master&id=e7b9601185bc1136433471396682f9778a4585bf
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to