generated from smedev/Template-for-SMEServer-Core-Perl
* Thu Jan 23 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.112-2.sme
- import to SME11
This commit is contained in:
parent
ea189da71f
commit
0150b74b7e
BIN
Data-OptList-0.112.tar.gz
(Stored with Git LFS)
Normal file
BIN
Data-OptList-0.112.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,72 +1,103 @@
|
|||||||
%define name perl-Data-OptList
|
%if ! (0%{?rhel})
|
||||||
%define version 1.0
|
# Run extra test
|
||||||
%define release 1
|
%bcond_without perl_Data_OptList_enables_extra_test
|
||||||
Summary: This is what perl-Data-OptList does.
|
# Run optional test
|
||||||
Name: %{name}
|
%bcond_without perl_Data_OptList_enables_optional_test
|
||||||
Version: %{version}
|
%else
|
||||||
Release: %{release}%{?dist}
|
%bcond_with perl_Data_OptList_enables_extra_test
|
||||||
Source: %{name}-%{version}.tar.gz
|
%bcond_with perl_Data_OptList_enables_optional_test
|
||||||
License: GNU GPL version 2
|
%endif
|
||||||
Group: SMEserver/addon
|
Name: perl-Data-OptList
|
||||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
Version: 0.112
|
||||||
Prefix: %{_prefix}
|
Release: 2%{?org_tag}%{?dist}
|
||||||
BuildArchitectures: noarch
|
Summary: Parse and validate simple name/value option pairs
|
||||||
BuildRequires: smeserver-devtools
|
License: GPL+ or Artistic
|
||||||
Requires: smeserver-release >= 11.0
|
Group: Development/Libraries
|
||||||
AutoReqProv: no
|
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
|
%description
|
||||||
Hashes are great for storing named data, but if you want more than one entry
|
Hashes are great for storing named data, but if you want more than one
|
||||||
for a name, you have to use a list of pairs. Even then, this is really boring to write:
|
entry for a name, you have to use a list of pairs. Even then, this is
|
||||||
|
really boring to write:
|
||||||
$values = [
|
$values = [ foo => undef, bar => undef, baz => undef, xyz => { ... }, ];
|
||||||
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.
|
|
||||||
|
|
||||||
|
With Data::OptList, you can do this instead:
|
||||||
|
|
||||||
%changelog
|
$values = Data::OptList::mkopt([ qw(foo bar baz), xyz => { ... }, ]);
|
||||||
* Day MMMM DD YYYY <brianr@koozali.org> 1.0-1.sme
|
|
||||||
- Initial code - create RPM [SME:99999]
|
This works by assuming that any defined scalar is a name and any reference following a name is its value.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%setup -q -n Data-OptList-%{version}
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf %{buildroot}
|
||||||
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
|
||||||
rm -f %{name}-%{version}-filelist
|
make pure_install PERL_INSTALL_ROOT=%{buildroot}
|
||||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
|
||||||
> %{name}-%{version}-filelist
|
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
|
||||||
#echo "%doc COPYING" >> %{name}-%{version}-filelist
|
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
|
||||||
#--dir <dir> 'attr(755,user,grp)' \
|
|
||||||
#--file <file> 'attr(755,root,root)' \
|
%{_fixperms} %{buildroot}/*
|
||||||
|
|
||||||
|
%check
|
||||||
|
make test
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
cd ..
|
rm -rf %{buildroot}
|
||||||
rm -rf %{name}-%{version}
|
|
||||||
|
|
||||||
%pre
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc Changes LICENSE README
|
||||||
|
%{perl_vendorlib}/*
|
||||||
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%preun
|
%changelog
|
||||||
|
* Thu Jan 23 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.112-2.sme
|
||||||
|
- import to SME11
|
||||||
|
|
||||||
%post
|
* Tue Jun 29 2021 Gavin Carr <gavin@openfusion.com.au> 0.112-1
|
||||||
|
- Update to version 0.112.
|
||||||
|
|
||||||
%postun
|
* Thu Jul 07 2011 Gavin Carr <gavin@openfusion.com.au> 0.107-1
|
||||||
#uninstall
|
- Update to 0.107.
|
||||||
%files -f %{name}-%{version}-filelist
|
|
||||||
%defattr(-,root,root)
|
* Fri Feb 04 2011 Gavin Carr <gavin@openfusion.com.au> 0.106-1
|
||||||
|
- Specfile autogenerated by cpanspec 1.78.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user