# 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-Package-Constants Epoch: 1 Version: 0.06 Release: 27.%{__distinit}%{__distvers} Summary: List all constants declared in a package License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Package-Constants Source0: https://cpan.metacpan.org/modules/by-module/Package/Package-Constants-%{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(if) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(constant) BuildRequires: perl(lib) BuildRequires: perl(Test::More) BuildRequires: perl(vars) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %if 0%{?fedora} > 19 || 0%{?rhel} > 7 BuildRequires: perl(deprecate) Requires: perl(deprecate) %endif %description Package::Constants lists all the constants defined in a certain package. This can be useful for, among others, setting up an auto-generated @EXPORT/@EXPORT_OK for a Constants.pm file. %prep %setup -q -n Package-Constants-%{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}/Package/ %{_mandir}/man3/Package::Constants.3* %changelog * Tue Jul 18 2023 Paul Howarth - 1:0.06-27 - Use SPDX-format license tag - Switch upstream from search.cpan.org to metacpan.org * Thu Apr 19 2018 Paul Howarth - 1:0.06-9 - 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 * Wed Sep 14 2016 Paul Howarth - 1:0.06-5 - Fix FTBFS when perl is not in the minimal buildroot - BR: perl-generators where available - Simplify find command using -delete * Tue Jan 6 2015 Paul Howarth - 1:0.06-1 - Update to 0.06 - Added minimum perl version 5.006 to the code, and added "use warnings", and use of our - Added minimum perl version 5.006 to metadata - Reformatted CHANGES as per CPAN::Changes::Spec - Added SEE ALSO section to docs - Classify buildreqs by usage - Drop %%defattr, redundant since rpm 4.4 * Fri Oct 25 2013 Paul Howarth - 1:0.04-1 - Update to 0.04 - Update Makefile.PL to add repository et al - Install into site by default if perl ≥ v5.12.0 - Add 'use deprecate' due to scheduled core removal - This release by BINGOS -> update source URL * Sun Jun 10 2012 Paul Howarth - 1:0.02-6 - 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} - Use DESTDIR rather than PERL_INSTALL_ROOT * Wed Jul 6 2011 Paul Howarth - 1:0.02-5 - 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:0.02-4 - Rebuild for perl 5.12.1 in Rawhide * Thu Jun 3 2010 Paul Howarth - 1:0.02-3 - Fix dist tag for RHEL-6 Beta * Tue Mar 2 2010 Paul Howarth - 1:0.02-2 - Dist tag for Rawhide no longer needs special-casing - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation * Tue May 5 2009 Paul Howarth - 1:0.02-1 - Import from Fedora - Update to 0.02 - Add same epoch as Fedora version for valid comparisons * Sun Dec 30 2007 Ralf Corsépius - 0.01-4 - BR: perl(Test::More) (BZ 419631) - Adjust License-tag * Wed Apr 18 2007 Steven Pritchard - 0.01-3 - Use fixperms macro instead of our own chmod incantation - BR ExtUtils::MakeMaker * Sat Sep 16 2006 Steven Pritchard - 0.01-2 - Fix find option order * Mon Jul 03 2006 Steven Pritchard - 0.01-1 - Specfile autogenerated by cpanspec 1.66 - Fixed License