# 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-Date-Range Version: 1.41 Release: 6.%{__distinit}%{__distvers} License: GPL-2.0-or-later Summary: Work with a range of dates URL: https://metacpan.org/release/Date-Range Source0: https://cpan.metacpan.org/modules/by-module/Date/Date-Range-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(Carp) BuildRequires: perl(Date::Simple) >= 0.03 BuildRequires: perl(strict) # Test Suite BuildRequires: perl(Test::More) >= 0.04 # Optional Tests BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Pod::Coverage) >= 1.00 # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(Date::Simple) >= 0.03 %description Quite often, when dealing with dates, we don't just want to know information about one particular date, but about a range of dates. For example, we may wish to know whether a given date is in a particular range, or what the overlap is between one range and another. This module lets you ask such questions. %prep %setup -q -n Date-Range-%{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 %doc Changes README %{perl_vendorlib}/Date/ %{_mandir}/man3/Date::Range.3* %changelog * Mon Mar 27 2023 Paul Howarth - 1.41-6 - Use SPDX-format license tag * Fri Aug 6 2021 Paul Howarth - 1.41-2 - Make Date::Simple a run-time dependency, not just a test dependency (#1977229) - Fix dist tags for Alma and Rocky Linux * Mon Jun 28 2021 Paul Howarth - 1.41-1 - Initial RPM version