# 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-CPAN-Requirements-Dynamic Version: 0.001 Release: 1.%{__distinit}%{__distvers} Summary: Dynamic prerequisites in meta files License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/CPAN-Requirements-Dynamic Source0: https://cpan.metacpan.org/modules/by-module/CPAN/CPAN-Requirements-Dynamic-%{version}.tar.gz BuildArch: noarch # Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(:VERSION) >= 5.6 BuildRequires: perl(ExtUtils::MakeMaker) # Module BuildRequires: perl(Carp) BuildRequires: perl(CPAN::Meta::Prereqs) BuildRequires: perl(CPAN::Meta::Requirements::Range) BuildRequires: perl(ExtUtils::Config) BuildRequires: perl(ExtUtils::HasCompiler) BuildRequires: perl(IPC::Cmd) BuildRequires: perl(Module::Metadata) BuildRequires: perl(Parse::CPAN::Meta) BuildRequires: perl(Perl::OSType) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Config) BuildRequires: perl(Test::More) >= 0.88 # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(CPAN::Meta::Prereqs) Requires: perl(CPAN::Meta::Requirements::Range) Requires: perl(ExtUtils::Config) Requires: perl(ExtUtils::HasCompiler) Requires: perl(IPC::Cmd) Requires: perl(Module::Metadata) Requires: perl(Perl::OSType) %description This module implements a format for describing dynamic prerequisites of a distribution. %prep %setup -q -n CPAN-Requirements-Dynamic-%{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}/CPAN/ %{_mandir}/man3/CPAN::Requirements::Dynamic.3* %changelog * Mon Apr 29 2024 Paul Howarth - 0.001-1 - Initial RPM version