diff --git a/Data-OptList-0.112.tar.gz b/Data-OptList-0.112.tar.gz new file mode 100644 index 0000000..515a699 --- /dev/null +++ b/Data-OptList-0.112.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62c60ccaae88d5339ae36bcc8940b03388cf84adbf27828b1f8b300307103bab +size 19764 diff --git a/perl-Data-OptList.spec b/perl-Data-OptList.spec index e1e83c8..3889c2a 100644 --- a/perl-Data-OptList.spec +++ b/perl-Data-OptList.spec @@ -1,72 +1,103 @@ -%define name perl-Data-OptList -%define version 1.0 -%define release 1 -Summary: This is what perl-Data-OptList does. -Name: %{name} -Version: %{version} -Release: %{release}%{?dist} -Source: %{name}-%{version}.tar.gz -License: GNU GPL version 2 -Group: SMEserver/addon -BuildRoot: %{_tmppath}/%{name}-buildroot -Prefix: %{_prefix} -BuildArchitectures: noarch -BuildRequires: smeserver-devtools -Requires: smeserver-release >= 11.0 -AutoReqProv: no +%if ! (0%{?rhel}) +# Run extra test +%bcond_without perl_Data_OptList_enables_extra_test +# Run optional test +%bcond_without perl_Data_OptList_enables_optional_test +%else +%bcond_with perl_Data_OptList_enables_extra_test +%bcond_with perl_Data_OptList_enables_optional_test +%endif +Name: perl-Data-OptList +Version: 0.112 +Release: 2%{?org_tag}%{?dist} +Summary: Parse and validate simple name/value option pairs +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/Data-OptList/ +Source0: http://www.cpan.org/authors/id/R/RJ/RJBS/Data-OptList-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +# Module Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl-interpreter +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.78 +# Module Runtime +BuildRequires: perl(Params::Util) >= 0.14 +BuildRequires: perl(List::Util) +BuildRequires: perl(strict) +BuildRequires: perl(Sub::Install) >= 0.921 +BuildRequires: perl(warnings) +# Test Suite +BuildRequires: perl(File::Spec) +BuildRequires: perl(Test::More) >= 0.96 +%if %{with perl_Data_OptList_enables_optional_test} +# Optional Tests +BuildRequires: perl(CPAN::Meta) >= 2.120900 +BuildRequires: perl(CPAN::Meta::Prereqs) +%endif +%if %{with perl_Data_OptList_enables_extra_test} +# Extra Tests +BuildRequires: perl(Test::Pod) >= 1.41 +%endif +# Dependencies +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) +Requires: perl(List::Util) +Requires: perl(Params::Util) >= 0.14 +Requires: perl(Sub::Install) >= 0.921 %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: - -$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. +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: -%changelog -* Day MMMM DD YYYY 1.0-1.sme -- Initial code - create RPM [SME:99999] +$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 +%setup -q -n Data-OptList-%{version} %build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT -(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) -rm -f %{name}-%{version}-filelist -/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ -> %{name}-%{version}-filelist -#echo "%doc COPYING" >> %{name}-%{version}-filelist -#--dir 'attr(755,user,grp)' \ -#--file 'attr(755,root,root)' \ +rm -rf %{buildroot} + +make pure_install PERL_INSTALL_ROOT=%{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 %clean -cd .. -rm -rf %{name}-%{version} +rm -rf %{buildroot} -%pre +%files +%defattr(-,root,root,-) +%doc Changes LICENSE README +%{perl_vendorlib}/* +%{_mandir}/man3/* -%preun +%changelog +* Thu Jan 23 2025 Jean-Philippe Pialasse 0.112-2.sme +- import to SME11 -%post +* Tue Jun 29 2021 Gavin Carr 0.112-1 +- Update to version 0.112. -%postun -#uninstall -%files -f %{name}-%{version}-filelist -%defattr(-,root,root) +* Thu Jul 07 2011 Gavin Carr 0.107-1 +- Update to 0.107. + +* Fri Feb 04 2011 Gavin Carr 0.106-1 +- Specfile autogenerated by cpanspec 1.78.