From ac7275c6dd2bafc970090ffeeff814601b1125b5 Mon Sep 17 00:00:00 2001
From: Paul Howarth <p...@city-fan.org>
Date: Wed, 14 Oct 2015 09:31:56 +0100
Subject: Fix FTBFS and tidy up

- Classify buildreqs by usage
- Drop %defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
- Don't use macros for commands
- Make %files list more explicit
---
 perl-Net-CIDR-Lite.spec | 41 ++++++++++++++++++++++++++++-------------
 1 file changed, 28 insertions(+), 13 deletions(-)

diff --git a/perl-Net-CIDR-Lite.spec b/perl-Net-CIDR-Lite.spec
index 15d19de..0ea304d 100644
--- a/perl-Net-CIDR-Lite.spec
+++ b/perl-Net-CIDR-Lite.spec
@@ -1,18 +1,31 @@
 Name:           perl-Net-CIDR-Lite
 Version:        0.21
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        Perl extension for merging IPv4 or IPv6 CIDR addresses
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Net-CIDR-Lite/
 Source0:        
http://www.cpan.org/authors/id/D/DO/DOUGW/Net-CIDR-Lite-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildArch:      noarch
+# Build
+BuildRequires:  coreutils
+BuildRequires:  findutils
+BuildRequires:  make
+BuildRequires:  perl
 BuildRequires:  perl(ExtUtils::MakeMaker)
+# Runtime
+BuildRequires:  perl(Carp)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(vars)
+# Tests
+BuildRequires:  perl(Test)
 BuildRequires:  perl(Test::More)
-BuildRequires:  perl(Test::Pod)
+# Optional Tests
+BuildRequires:  perl(Test::Pod) >= 1.00
 BuildRequires:  perl(Test::Pod::Coverage)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo 
$version))
+# Explicit Requirements
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
 Faster alternative to Net::CIDR when merging a large number of CIDR address
@@ -22,18 +35,14 @@ ranges. Works for IPv4 and IPv6 addresses.
 %setup -q -n Net-CIDR-Lite-%{version}
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
 make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
-
 find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
-%{_fixperms} $RPM_BUILD_ROOT/*
+%{_fixperms} $RPM_BUILD_ROOT
 
 %check
 make test
@@ -42,12 +51,18 @@ make test
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root,-)
 %doc Changes README
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%{perl_vendorlib}/Net/
+%{_mandir}/man3/Net::CIDR::Lite.3*
 
 %changelog
+* Wed Oct 14 2015 Paul Howarth <p...@city-fan.org> - 0.21-14
+- Classify buildreqs by usage
+- Drop %%defattr, redundant since rpm 4.4
+- Don't need to remove empty directories from the buildroot
+- Don't use macros for commands
+- Make %%files list more explicit
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-...@lists.fedoraproject.org> 
- 0.21-13
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
-- 
cgit v0.11.2


        
http://pkgs.fedoraproject.org/cgit/perl-Net-CIDR-Lite.git/commit/?h=master&id=ac7275c6dd2bafc970090ffeeff814601b1125b5
--
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