[perl-Data-OptList] Spec file clean-up

Paul Howarth pghmcfc at fedoraproject.org
Wed Jan 11 12:15:55 UTC 2012


commit 9bc1700736547fbd037fd2d2217cb27a2c80b0a0
Author: Paul Howarth <paul at city-fan.org>
Date:   Wed Jan 11 12:15:14 2012 +0000

    Spec file clean-up
    
    - package LICENSE file
    - run test suite even when bootstrapping, as it should still pass
    - run release tests too
    - enhance %description so it makes sense
    - BR: perl(Test::More)

 .gitignore             |    3 +--
 perl-Data-OptList.spec |   46 ++++++++++++++++++++++++++++++++++------------
 2 files changed, 35 insertions(+), 14 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index be32041..f60ecbd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-Data-OptList-0.106.tar.gz
-/Data-OptList-0.107.tar.gz
+/Data-OptList-[0-9.]*.tar.gz
diff --git a/perl-Data-OptList.spec b/perl-Data-OptList.spec
index 1678e04..9abc20a 100644
--- a/perl-Data-OptList.spec
+++ b/perl-Data-OptList.spec
@@ -1,7 +1,7 @@
 Name:           perl-Data-OptList
 Summary:        Parse and validate simple name/value option pairs
 Version:        0.107
-Release:        2%{?dist}
+Release:        3%{?dist}
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 Source0:        http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Data-OptList-%{version}.tar.gz 
@@ -13,6 +13,7 @@ BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.42
 BuildRequires:  perl(List::Util)
 BuildRequires:  perl(Params::Util)
 BuildRequires:  perl(Sub::Install) >= 0.921
+BuildRequires:  perl(Test::More)
 %if !%{defined perl_bootstrap}
 BuildRequires:  perl(Test::Pod)
 %endif
@@ -21,9 +22,26 @@ BuildRequires:  perl(Test::Pod)
 %{?perl_default_subpackage_tests}
 
 %description
-Hashes are great for storing named data, but if you want more than one
-entry for a name, you have to use a list of pairs. Even then, this is
-really boring to write:
+Hashes are great for storing named data, but if you want more than one entry
+for a name, you have to use a list of pairs. Even then, this is really boring
+to write:
+
+$values = [
+    foo => undef,
+    bar => undef,
+    baz => undef,
+    xyz => { ... },
+];
+
+With Data::OptList, you can do this instead:
+
+$values = Data::OptList::mkopt([
+    qw(foo bar baz),
+    xyz => { ... },
+]);
+
+This works by assuming that any defined scalar is a name and any reference
+following a name is its value.
 
 %prep
 %setup -q -n Data-OptList-%{version}
@@ -37,20 +55,24 @@ 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}/*
+%{_fixperms} %{buildroot}
 
 %check
-%if !%{defined perl_bootstrap}
-make test
-%endif
+make test RELEASE_TESTING=1
 
 %files
-%doc Changes README
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%doc Changes LICENSE README
+%{perl_vendorlib}/Data/
+%{_mandir}/man3/Data::OptList.3pm*
 
 %changelog
+* Wed Jan 11 2012 Paul Howarth <paul at city-fan.org> - 0.107-3
+- package LICENSE file
+- run test suite even when bootstrapping, as it should still pass
+- run release tests too
+- enhance %%description so it makes sense
+- BR: perl(Test::More)
+
 * Tue Jun 28 2011 Marcela Mašláňová <mmaslano at redhat.com> - 0.107-2
 - Perl mass rebuild
 - add perl_bootstrap macro


More information about the scm-commits mailing list