Various clean-ups

- Use a patch rather than scripted iconv to fix character encoding
- Use rpm native provides filtering
- Make %files list more explicit
This commit is contained in:
Paul Howarth 2011-07-21 11:52:07 +01:00
parent 0a4f977991
commit af49a76c86
2 changed files with 53 additions and 20 deletions

View File

@ -0,0 +1,31 @@
--- NetAddr-IP-4.042/README 2011-03-23 10:56:16.137035463 +0000
+++ NetAddr-IP-4.042/README 2008-12-02 20:54:08.000000000 +0000
@@ -187,7 +187,7 @@
LICENSE AND WARRANTY
-This software is (c) Luis E. Muñoz and Michael A. Robinton. It can be
+This software is (c) Luis E. Muñoz and Michael A. Robinton. It can be
used under the terms of the perl artistic license provided that proper
credit for the work of the authors is preserved in the form of this
copyright notice and license for this module.
--- NetAddr-IP-4.042/Lite/Lite.pm 2011-03-22 22:37:05.000000000 +0000
+++ NetAddr-IP-4.042/Lite/Lite.pm 2011-03-23 10:56:55.768181188 +0000
@@ -1338,7 +1338,7 @@
=head1 AUTHOR
-Luis E. Muñoz E<lt>luismunoz@cpan.orgE<gt>,
+Luis E. Muñoz E<lt>luismunoz@cpan.orgE<gt>,
Michael Robinton E<lt>michael@bizsystems.comE<gt>
=head1 WARRANTY
@@ -1348,7 +1348,7 @@
=head1 LICENSE
- This software is (c) Luis E. Muñoz, 1999 - 2005
+ This software is (c) Luis E. Muñoz, 1999 - 2005
and (c) Michael Robinton, 2006 - 2010.
It can be used under the terms of the perl artistic license provided that

View File

@ -1,6 +1,6 @@
Name: perl-NetAddr-IP
Version: 4.044
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Manages IPv4 and IPv6 addresses and subnets
# Upstream explicitly gave permission for us to distribute under Artistic 2.0
# Will be reflected in next release.
@ -9,31 +9,25 @@ Group: Development/Libraries
URL: http://search.cpan.org/dist/NetAddr-IP/
Source0: http://search.cpan.org/CPAN/authors/id/M/MI/MIKER/NetAddr-IP-%{version}.tar.gz
Source1: License_of_perl-NetAddr-IP.txt
Patch0: NetAddr-IP-4.042-UTF8.patch
BuildRequires: perl(ExtUtils::MakeMaker), perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Don't "provide" private Perl libs or redundant unversioned provides
%global __provides_exclude ^(perl\\(NetAddr::IP(::Util(PP)?)?\\)$|Util\\.so)
%description
The perl-NetAddr-IP module provides an object-oriented abstraction on top
of IP addresses or IP subnets, that allows for easy manipulations.
Version 4.xx of NetAdder::IP will work older versions of Perl and does
not use Math::BigInt as in previous versions.
This module provides an object-oriented abstraction on top of IP addresses
or IP subnets, that allows for easy manipulations. Version 4.xx of
NetAddr::IP will work older versions of Perl and does not use
Math::BigInt as in previous versions.
%prep
%setup -q -n NetAddr-IP-%{version}
cp %{SOURCE1} .
%{?filter_setup:
%filter_from_provides /^perl(NetAddr::IP.*)$/d
%?perl_default_filter
}
# Fix UTF-8
iconv -f ISO_8859-1 -t UTF-8 -o tmp.pm IP.pm &&
mv -f tmp.pm IP.pm
iconv -f ISO_8859-1 -t UTF-8 -o tmp.pm Lite/Lite.pm &&
mv -f tmp.pm Lite/Lite.pm
iconv -f ISO_8859-1 -t UTF-8 -o README.new README &&
mv -f README.new README
%patch0 -p1
%build
@ -47,18 +41,26 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} %{buildroot}/*
%{_fixperms} %{buildroot}
%check
make test
%files
%doc Changes README TODO docs/rfc1884.txt License_of_perl-NetAddr-IP.txt
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/NetAddr*
%{_mandir}/man3/*
%{perl_vendorarch}/auto/NetAddr/
%{perl_vendorarch}/NetAddr/
%{_mandir}/man3/NetAddr::IP.3pm*
%{_mandir}/man3/NetAddr::IP::Lite.3pm*
%{_mandir}/man3/NetAddr::IP::Util.3pm*
%{_mandir}/man3/NetAddr::IP::UtilPP.3pm*
%changelog
* Thu Jul 21 2011 Paul Howarth <paul@city-fan.org> - 4.044-3
- use a patch rather than scripted iconv to fix character encoding
- use rpm native provides filtering
- make %%files list more explicit
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 4.044-2
- Perl mass rebuild