68b22c
%if ! (0%{?rhel})
68b22c
# Run extra test
68b22c
%bcond_without perl_Data_OptList_enables_extra_test
68b22c
# Run optional test
68b22c
%bcond_without perl_Data_OptList_enables_optional_test
68b22c
%else
68b22c
%bcond_with perl_Data_OptList_enables_extra_test
68b22c
%bcond_with perl_Data_OptList_enables_optional_test
68b22c
%endif
68b22c
68b22c
Name:           perl-Data-OptList
68b22c
Version:        0.110
68b22c
Release:        7%{?dist}
68b22c
Summary:        Parse and validate simple name/value option pairs
68b22c
License:        GPL+ or Artistic
68b22c
Group:          Development/Libraries
68b22c
URL:            http://search.cpan.org/dist/Data-OptList/
68b22c
Source0:        http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Data-OptList-%{version}.tar.gz 
68b22c
BuildArch:      noarch
68b22c
# Module Build
68b22c
BuildRequires:  coreutils
68b22c
BuildRequires:  findutils
68b22c
BuildRequires:  make
68b22c
BuildRequires:  perl-interpreter
68b22c
BuildRequires:  perl-generators
68b22c
BuildRequires:  perl(ExtUtils::MakeMaker)
68b22c
# Module Runtime
68b22c
BuildRequires:  perl(List::Util)
68b22c
BuildRequires:  perl(Params::Util)
68b22c
BuildRequires:  perl(strict)
68b22c
BuildRequires:  perl(Sub::Install) >= 0.921
68b22c
BuildRequires:  perl(warnings)
68b22c
# Test Suite
68b22c
BuildRequires:  perl(File::Spec)
68b22c
BuildRequires:  perl(Test::More) >= 0.88
68b22c
%if %{with perl_Data_OptList_enables_optional_test}
68b22c
# Optional Tests
68b22c
BuildRequires:  perl(CPAN::Meta) >= 2.120900
68b22c
BuildRequires:  perl(CPAN::Meta::Prereqs)
68b22c
%endif
68b22c
%if %{with perl_Data_OptList_enables_extra_test}
68b22c
# Extra Tests
68b22c
BuildRequires:  perl(Test::Pod) >= 1.41
68b22c
%endif
68b22c
# Dependencies
68b22c
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
68b22c
68b22c
%description
68b22c
Hashes are great for storing named data, but if you want more than one entry
68b22c
for a name, you have to use a list of pairs. Even then, this is really boring
68b22c
to write:
68b22c
68b22c
$values = [
68b22c
    foo => undef,
68b22c
    bar => undef,
68b22c
    baz => undef,
68b22c
    xyz => { ... },
68b22c
];
68b22c
68b22c
With Data::OptList, you can do this instead:
68b22c
68b22c
$values = Data::OptList::mkopt([
68b22c
    qw(foo bar baz),
68b22c
    xyz => { ... },
68b22c
]);
68b22c
68b22c
This works by assuming that any defined scalar is a name and any reference
68b22c
following a name is its value.
68b22c
68b22c
%prep
68b22c
%setup -q -n Data-OptList-%{version}
68b22c
68b22c
# Fix shellbangs in tests
68b22c
for F in t/*; do
68b22c
    perl -MExtUtils::MakeMaker -e "ExtUtils::MM_Unix->fixin(q{$F})"
68b22c
done
68b22c
68b22c
%build
68b22c
perl Makefile.PL INSTALLDIRS=vendor
68b22c
make %{?_smp_mflags}
68b22c
68b22c
%install
68b22c
make pure_install DESTDIR=%{buildroot}
68b22c
find %{buildroot} -type f -name .packlist -delete
68b22c
%{_fixperms} %{buildroot}
68b22c
68b22c
%check
68b22c
make test
68b22c
%if %{with perl_Data_OptList_enables_extra_test}
68b22c
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
68b22c
%endif
68b22c
68b22c
%files
68b22c
%license LICENSE
68b22c
%doc Changes README t/
68b22c
%{perl_vendorlib}/Data/
68b22c
%{_mandir}/man3/Data::OptList.3*
68b22c
68b22c
%changelog
68b22c
* Fri Mar 29 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.110-7
68b22c
- Rebuild with enable hardening (bug #1636329)
68b22c
68b22c
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.110-6
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
68b22c
68b22c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.110-5
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
68b22c
68b22c
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.110-4
68b22c
- Perl 5.26 rebuild
68b22c
68b22c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.110-3
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
68b22c
68b22c
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.110-2
68b22c
- Perl 5.24 rebuild
68b22c
68b22c
* Fri Mar 25 2016 Paul Howarth <paul@city-fan.org> - 0.110-1
68b22c
- Update to 0.110
68b22c
  - Major optimization to mkopt
68b22c
- Use %%license
68b22c
- Simplify find expression using -delete
68b22c
68b22c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.109-7
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
68b22c
68b22c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.109-6
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
68b22c
68b22c
* Fri Jun 05 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.109-5
68b22c
- Perl 5.22 rebuild
68b22c
68b22c
* Thu Jan 15 2015 Petr Pisar <ppisar@redhat.com> - 0.109-4
68b22c
- Do not hard-code interpreter name
68b22c
- Specify all dependencies
68b22c
68b22c
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.109-3
68b22c
- Perl 5.20 rebuild
68b22c
68b22c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.109-2
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
68b22c
68b22c
* Fri Dec 13 2013 Paul Howarth <paul@city-fan.org> - 0.109-1
68b22c
- Update to 0.109:
68b22c
  - Update bugtracker and repo links
68b22c
68b22c
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.108-3
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
68b22c
68b22c
* Sun Jul 21 2013 Petr Pisar <ppisar@redhat.com> - 0.108-2
68b22c
- Perl 5.18 rebuild
68b22c
68b22c
* Sat Jul  6 2013 Paul Howarth <paul@city-fan.org> - 0.108-1
68b22c
- Update to 0.108:
68b22c
  - Repackage, new bug tracker
68b22c
- Explicitly run the extra tests
68b22c
- Don't need to remove empty directories from the buildroot
68b22c
- Drop obsoletes/provides for old -tests sub-package
68b22c
68b22c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.107-9
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
68b22c
68b22c
* Tue Nov 13 2012 Jitka Plesnikova <jplesnik@redhat.com> - 0.107-8
68b22c
- Fix wrong script interpreter
68b22c
68b22c
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.107-7
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
68b22c
68b22c
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 0.107-6
68b22c
- Perl 5.16 rebuild
68b22c
68b22c
* Sat Jan 21 2012 Paul Howarth <paul@city-fan.org> - 0.107-5
68b22c
- obsolete/provide old -tests subpackage to support upgrades
68b22c
68b22c
* Fri Jan 20 2012 Paul Howarth <paul@city-fan.org> - 0.107-4
68b22c
- drop -tests subpackage (general lack of interest in this), but include
68b22c
  them as documentation for the main package
68b22c
- drop redundant %%{?perl_default_filter}
68b22c
- don't use macros for commands
68b22c
- can't find any dependency cycle so drop %%{?perl_bootstrap} usage
68b22c
- drop ExtUtils::MakeMaker version requirement to 6.30, actual working minimum
68b22c
68b22c
* Wed Jan 11 2012 Paul Howarth <paul@city-fan.org> - 0.107-3
68b22c
- package LICENSE file
68b22c
- run test suite even when bootstrapping, as it should still pass
68b22c
- run release tests too
68b22c
- enhance %%description so it makes sense
68b22c
- BR: perl(Test::More)
68b22c
68b22c
* Tue Jun 28 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.107-2
68b22c
- Perl mass rebuild
68b22c
- add perl_bootstrap macro
68b22c
68b22c
* Wed May 11 2011 Iain Arnell <iarnell@gmail.com> 0.107-1
68b22c
- update to latest upstream version
68b22c
- clean up spec for modern rpmbuild
68b22c
68b22c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.106-4
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
68b22c
68b22c
* Thu Dec 16 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.106-3
68b22c
- rebuild to fix problems with vendorarch/lib (#661697)
68b22c
68b22c
* Fri Apr 30 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.106-2
68b22c
- Mass rebuild with perl-5.12.0
68b22c
68b22c
* Mon Mar 08 2010 Chris Weyl <cweyl@alumni.drew.edu> 0.106-1
68b22c
- update by Fedora::App::MaintainerTools 0.004
68b22c
- PERL_INSTALL_ROOT => DESTDIR
68b22c
- updating to latest GA CPAN version (0.106)
68b22c
- added a new br on perl(ExtUtils::MakeMaker) (version 6.42)
68b22c
- added a new br on perl(List::Util) (version 0)
68b22c
- altered br on perl(Sub::Install) (0.92 => 0.921)
68b22c
- added a new req on perl(List::Util) (version 0)
68b22c
- added a new req on perl(Params::Util) (version 0.14)
68b22c
- added a new req on perl(Sub::Install) (version 0.921)
68b22c
68b22c
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.104-4
68b22c
- rebuild against perl 5.10.1
68b22c
68b22c
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.104-3
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
68b22c
68b22c
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.104-2
68b22c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
68b22c
68b22c
* Wed Feb 11 2009 Chris Weyl <cweyl@alumni.drew.edu> 0.104-1
68b22c
- update to 0.104
68b22c
68b22c
* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.103-2
68b22c
- Rebuild for perl 5.10 (again)
68b22c
68b22c
* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.103-1
68b22c
- rebuild for new perl
68b22c
- bump to 0.103
68b22c
- fix license tag
68b22c
68b22c
* Thu Sep 07 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.101-2
68b22c
- bump
68b22c
68b22c
* Sat Sep 02 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.101-1
68b22c
- Specfile autogenerated by cpanspec 1.69.1.