LFS-RPM/SPECS/perl-Data-OptList.spec

81 lines
2.1 KiB
RPMSpec
Raw Normal View History

2023-04-23 01:29:13 +08:00
%global cpanname Data-OptList
Name: perl-%{cpanname}
Version: 0.113
2023-04-24 02:00:47 +08:00
Release: %{?repo}0.rc3%{?dist}
2023-04-23 01:29:13 +08:00
Summary: Parse and validate simple name/value option pairs
BuildArch: noarch
Group: Development/Libraries
2023-04-24 02:00:47 +08:00
License: GPL-1.0-or-later or Artistic-1.0-Perl
2023-04-23 01:29:13 +08:00
URL: https://metacpan.org/dist/Data-OptList
Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpanname}-%{version}.tar.gz
2023-04-24 02:00:47 +08:00
BuildRequires: perl-devel
2023-04-23 01:29:13 +08:00
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.78
BuildRequires: perl(JSON::PP) >= 2.27300
# for test
2023-04-23 14:59:08 +08:00
%if 0%{?runtests:1} == 1
2023-04-23 01:29:13 +08:00
BuildRequires: perl(Test::More) >= 0.96
BuildRequires: perl(warnings)
BuildRequires: perl(CPAN::Meta) >= 2.120900
BuildRequires: perl(File::Spec)
BuildRequires: perl(List::Util)
BuildRequires: perl(Params::Util)
BuildRequires: perl(Sub::Install) >= 0.921
BuildRequires: perl(strict)
2023-04-23 14:59:08 +08:00
%endif
2023-04-23 01:29:13 +08:00
# Runtime
Requires: perl(List::Util)
Requires: perl(Params::Util)
Requires: perl(Sub::Install) >= 0.921
Requires: perl(strict)
Requires: perl(warnings)
2023-04-23 14:59:08 +08:00
%if 0%{?perl5_API:1} == 1
Requires: %{perl5_API}
%endif
2023-04-23 01:29:13 +08:00
%description
Data::OptList - parse and validate simple name/value option pairs.
%prep
%setup -n %{cpanname}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
%check
2023-04-23 14:59:08 +08:00
%if 0%{?runtests:1} == 1
2023-04-23 01:29:13 +08:00
make test > %{name}-make.test.log 2>&1
2023-04-23 14:59:08 +08:00
%else
echo "make test not run during package build." > %{name}-make.test.log
%endif
2023-04-23 01:29:13 +08:00
%install
make install DESTDIR=%{buildroot}
%{_fixperms} %{buildroot}%{perl5_vendorlib}
%files
%defattr(-,root,root,-)
%dir %{perl5_vendorlib}/Data
%attr(0444,root,root) %{perl5_vendorlib}/Data/OptList.pm
%attr(0644,root,root) %{_mandir}/man3/Data::OptList.3*
%license LICENSE
%doc Changes LICENSE README
%doc %{name}-make.test.log
%changelog
2023-04-24 02:00:47 +08:00
* Sun Apr 23 2023 Michael A. Peters <anymouseprophet@gmail.com> - 0.113-0.rc3
- BuildRequire perl-devel
2023-04-23 14:59:08 +08:00
* Sat Apr 22 2023 Michael A. Peters <anymouseprophet@gmail.com> - 0.113-0.rc2
- Require %%perl5_API and conditionally run test suite.
2023-04-23 01:29:13 +08:00
* Sat Apr 22 2023 Michael A. Peters <anymouseprophet@gmail.com> - 0.113-0.rc1
- Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3)