# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Name: perl-ExtUtils-HasCompiler Version: 0.025 Release: 1.%{__distinit}%{__distvers} Summary: Check for the presence of a compiler License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/ExtUtils-HasCompiler Source0: https://cpan.metacpan.org/modules/by-module/ExtUtils/ExtUtils-HasCompiler-%{version}.tar.gz BuildArch: noarch BuildRequires: coreutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Run-time BuildRequires: perl(base) BuildRequires: perl(Carp) BuildRequires: perl(Config) BuildRequires: perl(DynaLoader) BuildRequires: perl(Exporter) BuildRequires: perl(ExtUtils::Mksymlists) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(File::Temp) # Tests BuildRequires: gcc BuildRequires: perl-devel BuildRequires: perl(blib) BuildRequires: perl(Cwd) BuildRequires: perl(File::Path) BuildRequires: perl(File::Spec) BuildRequires: perl(IO::Handle) BuildRequires: perl(IPC::Open3) BuildRequires: perl(Test::More) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(DynaLoader) Requires: perl(ExtUtils::Mksymlists) %description This module tries to check if the current system is capable of compiling, linking and loading an XS module. %prep %setup -q -n ExtUtils-HasCompiler-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test %files %license LICENSE %doc Changes README %{perl_vendorlib}/ExtUtils* %{_mandir}/man3/ExtUtils::HasCompiler* %changelog * Tue May 7 2024 Paul Howarth - 0.025-1 - Update to 0.025 - Skip static test on dynamic perls - BR: gcc and perl-devel for tests * Mon Apr 29 2024 Paul Howarth - 0.024-1 - Import from Fedora