# 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-Mail-SPF-Test Version: 1.001 Release: 11.%{__distinit}%{__distvers} Summary: SPF test-suite class License: BSD-3-Clause URL: https://metacpan.org/dist/Mail-SPF-Test Source0: https://cpan.metacpan.org/modules/by-module/Mail/Mail-SPF-Test-v%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: perl-generators BuildRequires: perl-interpreter # Disregard version 0.2805 requirement for Module::Build as perl-Module-Build 0.3000 provides Module::Build = 0.30 BuildRequires: perl(Module::Build) # Module Runtime BuildRequires: perl(base) BuildRequires: perl(constant) BuildRequires: perl(IO::File) BuildRequires: perl(Net::DNS) >= 0.58 BuildRequires: perl(Net::DNS::RR) BuildRequires: perl(NetAddr::IP) >= 4 BuildRequires: perl(strict) BuildRequires: perl(version) BuildRequires: perl(warnings) BuildRequires: perl(YAML) >= 0.50 BuildRequires: perl(YAML::Dumper) BuildRequires: perl(YAML::Loader) # Test Suite # (there is no test suite) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(Net::DNS) >= 0.58 Requires: perl(NetAddr::IP) >= 4 Requires: perl(YAML) >= 0.50 Requires: perl(YAML::Dumper) Requires: perl(YAML::Loader) %description Mail::SPF::Test is a class for reading and manipulating SPF test-suite data. %prep %setup -q -n Mail-SPF-Test-v%{version} %build perl Build.PL --installdirs=vendor ./Build %install ./Build install --destdir=%{buildroot} --create_packlist=0 %{_fixperms} -c %{buildroot} %check ./Build test %files %license LICENSE %doc CHANGES README %{perl_vendorlib}/Mail/ %{_mandir}/man3/Mail::SPF::Test.3* %{_mandir}/man3/Mail::SPF::Test::Base.3* %{_mandir}/man3/Mail::SPF::Test::Case.3* %{_mandir}/man3/Mail::SPF::Test::Scenario.3* %changelog * Wed Mar 29 2023 Paul Howarth - 1.001-11 - Switch upstream from search.cpan.org to metacpan.org - Use SPDX-format license tag - Use %%license unconditionally * Fri Apr 27 2018 Paul Howarth - 1.001-10 - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Fri Sep 2 2016 Paul Howarth - 1.001-9 - Classify buildreqs by usage * Fri Sep 12 2014 Paul Howarth - 1.001-8 - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Tue Jul 3 2012 Paul Howarth - 1.001-7 - BR: perl(base), perl(constant) and perl(IO::File) - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Don't need to run the test suite with LC_ALL=C * Tue Jun 28 2011 Paul Howarth - 1.001-6 - Rebuild for perl 5.14.1 in Rawhide - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Fri Jun 25 2010 Paul Howarth - 1.001-5 - Rebuild for perl 5.12.1 in Rawhide * Fri Jun 4 2010 Paul Howarth - 1.001-4 - Fix dist tag for RHEL-6 Beta * Sat Feb 27 2010 Paul Howarth - 1.001-3 - Dist tag for Rawhide no longer needs special-casing - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation * Fri Sep 18 2009 Paul Howarth - 1.001-2 - Define RPM macros in global scope * Thu Oct 16 2008 Paul Howarth - 1.001-1 - Initial RPM version