# 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-DateTime-Calendar-Mayan Version: 0.0601 Release: 41.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl Summary: Mayan Long Count Calendar URL: https://metacpan.org/release/DateTime-Calendar-Mayan Source0: https://cpan.metacpan.org/modules/by-module/DateTime/DateTime-Calendar-Mayan-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(Module::Build) # Module Runtime BuildRequires: perl(constant) BuildRequires: perl(DateTime) >= 0.15 BuildRequires: perl(Params::Validate) >= 0.64 BuildRequires: perl(strict) BuildRequires: perl(vars) # Test Suite BuildRequires: perl(DateTime::Duration) BuildRequires: perl(Test::More) BuildRequires: perl(warnings) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description An implementation of the Mayan Long Count, Haab, and Tzolkin calendars as defined in "Calendrical Calculations The Millennium Edition". Supplemented by "Frequently Asked Questions about Calendars". %prep %setup -q -n DateTime-Calendar-Mayan-%{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 Todo %{perl_vendorlib}/DateTime/ %{_mandir}/man3/DateTime::Calendar::Mayan.3* %changelog * Mon Mar 27 2023 Paul Howarth - 0.0601-41 - Use SPDX-format license tag - Use %%license unconditionally * Sun Jun 9 2019 Paul Howarth - 0.0601-30 - Perl 5.30 rebuild * Fri Jul 6 2018 Paul Howarth - 0.0601-27 - Switch upstream from search.cpan.org to metacpan.org - 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 * Mon Aug 15 2016 Paul Howarth - 0.0601-21 - BR: perl-generators where available * Tue Sep 16 2014 Paul Howarth - 0.0601-17 - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible - Classify buildreqs by usage * Fri Jul 13 2012 Paul Howarth - 0.0601-11 - Switch to Module::Build flow since Module::Build is required anyway - 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 test suite with LC_ALL=C * Mon Jan 23 2012 Paul Howarth - 0.0601-10 - Resync with Rawhide package * Thu Jun 23 2011 Paul Howarth - 0.0601-7 - 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 - 0.0601-6 - Rebuild for perl 5.12.1 in Rawhide * Wed May 19 2010 Paul Howarth - 0.0601-5 - Fix dist tag for RHEL-6 Beta * Fri Jan 29 2010 Paul Howarth - 0.0601-4 - Import from Fedora * Mon Dec 7 2009 Stepan Kasal - 0.0601-3 - Rebuild against perl 5.10.1 * Sat Jul 25 2009 Fedora Release Engineering - 0.0601-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon May 18 2009 Chris Weyl - 0.0601-1 - Submission * Mon May 18 2009 Chris Weyl - 0.0601-0 - Initial RPM packaging - Generated with cpan2dist (CPANPLUS::Dist::RPM version 0.0.8)