From a003fc8d6b6a506058842c9d38d7cce1bfda9233 Mon Sep 17 00:00:00 2001
From: Paul Howarth <p...@city-fan.org>
Date: Wed, 2 Sep 2015 11:20:14 +0100
Subject: Update to 3.04
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- New upstream release 3.04
  - New upstream maintainer Mike Accardo
- This release by ACCARDO → update source URL
- Remove old spec cruft
- Add regression test for CPAN RT#56989
- Use %license where possible

diff --git a/.gitignore b/.gitignore
index b348101..30083b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-/Locale-US-1.2.tar.gz
-/Locale-US-2.112150.tar.gz
+/Locale-US-[0-9.]*.tar.gz
diff --git a/Locale-US-2.112140-rt56989.patch b/Locale-US-2.112140-rt56989.patch
new file mode 100644
index 0000000..92698cb
--- /dev/null
+++ b/Locale-US-2.112140-rt56989.patch
@@ -0,0 +1,21 @@
+--- Locale-US/t/1.t
++++ Locale-US/t/1.t
+@@ -6,7 +6,7 @@
+ # change 'tests => 1' to 'tests => last_test_to_print';
+ 
+ use Test;
+-BEGIN { plan tests => 3 };
++BEGIN { plan tests => 4 };
+ use Locale::US;
+ ok(1); # If we made it this far, we're ok.
+ 
+@@ -32,4 +32,8 @@ ok (
+     $u->{state2code}{$state}, $code
+    );
+ 
+-
++# rt #56989 Locale::US fails after second call to new
++my $v = Locale::US->new();
++ok (
++    $v->{code2state}{$code}, $state
++);
diff --git a/perl-Locale-US.spec b/perl-Locale-US.spec
index d9474a9..f14c9e5 100644
--- a/perl-Locale-US.spec
+++ b/perl-Locale-US.spec
@@ -1,21 +1,27 @@
 Name:           perl-Locale-US
-Version:        2.112150
-Release:        11%{?dist}
+Version:        3.04
+Release:        1%{?dist}
 Summary:        Two letter codes for state identification in the United States 
and vice versa
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Locale-US/
-Source0:        
http://www.cpan.org/authors/id/T/TB/TBONE/Locale-US-%{version}.tar.gz
+Source0:        
http://www.cpan.org/authors/id/A/AC/ACCARDO/Locale-US-%{version}.tar.gz
+Patch1:         Locale-US-2.112140-rt56989.patch
 BuildArch:      noarch
-BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.30
+# Build
+BuildRequires:  coreutils
+BuildRequires:  findutils
+BuildRequires:  make
+BuildRequires:  perl
+BuildRequires:  perl(ExtUtils::MakeMaker)
 # Run-time
-BuildRequires:  perl(Data::Dumper)
 BuildRequires:  perl(Data::Section::Simple)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(warnings)
 # Tests
 BuildRequires:  perl(Test)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo 
$version))
-
-%{?perl_default_filter}
+# Dependencies
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
 Map from US two-letter codes to states and vice versa.
@@ -23,31 +29,46 @@ Map from US two-letter codes to states and vice versa.
 %prep
 %setup -q -n Locale-US-%{version}
 
-# doesn't actually use Data::Dumper
-sed -i -e '/use Data::Dumper/d' lib/Locale/US.pm
+# Add regression test for CPAN RT#56989
+%patch1 -p1
+
+# Doesn't actually use Data::Dumper
+sed -i -e '/use Data::Dumper/d' lib/Locale/US.pm t/1.t
+
+# Script should be executable, even if it's just a doc
+chmod -c +x kruft2codes.pl
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
 make %{?_smp_mflags}
 
 %install
 make pure_install DESTDIR=%{buildroot}
-
-find %{buildroot} -type f -name kruft2codes.pl -exec rm -f {} \;
 find %{buildroot} -type f -name .packlist -exec rm -f {} \;
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
-
-%{_fixperms} %{buildroot}/*
+%{_fixperms} %{buildroot}
 
 %check
 make test
 
 %files
-%doc Changes README kruft2codes.pl
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%if 0%{?_licensedir:1}
+%license LICENSE
+%else
+%doc LICENSE
+%endif
+%doc Changes README codes.dat kruft.txt kruft2codes.pl
+%{perl_vendorlib}/Locale/
+%{_mandir}/man3/Locale::US*.3*
 
 %changelog
+* Wed Sep  2 2015 Paul Howarth <p...@city-fan.org> - 3.04-1
+- Update to 3.04
+  - New upstream maintainer Mike Accardo
+- This release by ACCARDO → update source URL
+- Remove old spec cruft
+- Add regression test for CPAN RT#56989
+- Use %%license where possible
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-...@lists.fedoraproject.org> 
- 2.112150-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
diff --git a/sources b/sources
index 8feadbe..0e99155 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-61adcf5097a87dea84c2a987f81cb2d9  Locale-US-2.112150.tar.gz
+20e475b152decc459d5b736dc6964b65  Locale-US-3.04.tar.gz
-- 
cgit v0.10.2


        
http://pkgs.fedoraproject.org/cgit/perl-Locale-US.git/commit/?h=master&id=a003fc8d6b6a506058842c9d38d7cce1bfda9233
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

Reply via email to