[perl-Locale-US] initial import (rhbz#673030)
Iain Arnell
iarnell at fedoraproject.org
Tue Mar 22 16:46:18 UTC 2011
commit 5930fa4fe24c8ac96c9976e7b45fd86e1c1b3c75
Author: Iain Arnell <iarnell at gmail.com>
Date: Tue Mar 22 17:33:40 2011 +0100
initial import (rhbz#673030)
.gitignore | 1 +
locale_us.patch | 20 +++++++++++++++++++
perl-Locale-US.spec | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 75 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2553c6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Locale-US-1.2.tar.gz
diff --git a/locale_us.patch b/locale_us.patch
new file mode 100644
index 0000000..0e213f5
--- /dev/null
+++ b/locale_us.patch
@@ -0,0 +1,20 @@
+diff -up Locale-US-1.2/US.pm.orig Locale-US-1.2/US.pm
+--- Locale-US-1.2/US.pm.orig 2007-07-17 01:06:51.000000000 +0200
++++ Locale-US-1.2/US.pm 2011-01-27 06:19:26.000000000 +0100
+@@ -36,6 +36,7 @@ sub new {
+
+ my $class = shift;
+ my $self = {} ;
++ my $start_pos = tell( DATA );
+
+ while ( <DATA>) {
+ chomp;
+@@ -46,6 +47,8 @@ sub new {
+ $self->{state2code}{$state} = $code;
+ }
+
++ seek( DATA, $start_pos, 0 );
++
+ # warn Dumper $self;
+ bless $self, $class;
+ }
diff --git a/perl-Locale-US.spec b/perl-Locale-US.spec
new file mode 100644
index 0000000..3ceacf5
--- /dev/null
+++ b/perl-Locale-US.spec
@@ -0,0 +1,53 @@
+Name: perl-Locale-US
+Version: 1.2
+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
+# https://rt.cpan.org/Public/Bug/Display.html?id=56989
+Patch0: locale_us.patch
+BuildArch: noarch
+BuildRequires: perl(ExtUtils::MakeMaker)
+Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+
+%{?perl_default_filter}
+
+%description
+Map from US two-letter codes to states and vice versa.
+
+%prep
+%setup -q -n Locale-US-%{version}
+%patch0 -p1
+
+# doesn't actually use Data::Dumper
+sed -i -e '/use Data::Dumper/d' US.pm
+
+# we don't need this
+rm -f kruft2codes.pl
+
+%build
+%{__perl} Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
+
+%install
+make pure_install DESTDIR=%{buildroot}
+
+find %{buildroot} -type f -name .packlist -exec rm -f {} \;
+find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
+
+%{_fixperms} %{buildroot}/*
+
+%check
+make test
+
+%files
+%defattr(-,root,root,-)
+%doc Changes README
+%{perl_vendorlib}/*
+%{_mandir}/man3/*
+
+%changelog
+* Thu Jan 27 2011 Iain Arnell <iarnell at gmail.com> 1.2-1
+- Specfile autogenerated by cpanspec 1.78.
diff --git a/sources b/sources
index e69de29..e21af16 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d748870d0b657f78d7ea044cbf35eacc Locale-US-1.2.tar.gz
More information about the perl-devel
mailing list