perl-Sys-CPU/perl-Sys-CPU.spec
2022-06-16 15:14:26 +08:00

64 lines
2.1 KiB
RPMSpec

Name: perl-Sys-CPU
Version: 0.61
Release: 20
Summary: Getting CPU information
# Some code was copied from Unix::Processors, which is LGPLv3 or Artistic 2.0
# The rest of the code is under the standard Perl license (GPL+ or Artistic).
# See <https://bugzilla.redhat.com/show_bug.cgi?id=585336>.
License: (GPL+ or Artistic) and (LGPLv3 or Artistic 2.0)
URL: https://metacpan.org/release/Sys-CPU
Source0: https://cpan.metacpan.org/authors/id/M/MZ/MZSANFORD/Sys-CPU-%{version}.tar.gz
# Support cpu_type on ARM and AArch64, bug #1093266, CPAN RT#95400
Patch0: Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch
# Accept undefined cpu_clock on ARM and AArch64, bug #1093266, CPAN RT#95400
Patch1: Sys-CPU-0.61-cpu_clock-can-be-undefined-on-an-ARM.patch
Patch2: add-support-riscv64.patch
BuildRequires: findutils gcc make sed perl-devel perl-generators
BuildRequires: perl(Config) perl(ExtUtils::MakeMaker) perl(DynaLoader) perl(Exporter)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%{?perl_default_filter}
%description
Perl extension for getting CPU information.
Currently only number of CPU's supported.
%package_help
%prep
%autosetup -n Sys-CPU-%{version} -p1
sed -i 's/\r//' Changes README
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{make_build}
%check
make test TEST_VERBOSE=1
%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name CPU.bs -exec rm -f {} \;
%{_fixperms} %{buildroot}/*
%files
%doc Changes README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Sys/*
%files help
%{_mandir}/man3/*.3*
%changelog
* Wed Jan 05 2022 wujie <wujie@nj.iscas.ac.cn> - 0.61-20
- Add riscv64 support from http://fedora.riscv.rocks/koji/buildinfo?buildID=186681
Author is David Abdurachmanov <david.abdurachmanov@sifive.com>
* Fri Jun 18 2021 zhaoyao<zhaoyao32@huawei.com> - 0.61-19
- Remove redundant dependencies, Git is only for patching, user patches instead.
* Wed Dec 04 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.61-18
- Package init