# 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 # Upstream inconsistent about how many digits to use, which is problematic for rpm %global upstream_version 1.298 %global downstream_version 1.29.8 Summary: Read simple configuration file formats Name: perl-ConfigReader-Simple Version: %{downstream_version} Release: 1.%{__distinit}%{__distvers} License: Artistic-2.0 URL: https://metacpan.org/release/ConfigReader-Simple Source0: https://cpan.metacpan.org/authors/id/B/BR/BRIANDFOY/ConfigReader-Simple-%{upstream_version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(File::Spec) BuildRequires: perl(File::Spec::Functions) # Module Runtime BuildRequires: perl(Carp) BuildRequires: perl(strict) BuildRequires: perl(subs) BuildRequires: perl(vars) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Data::Dumper) BuildRequires: perl(Test::More) >= 0.94 BuildRequires: perl(Test::Output) BuildRequires: perl(Test::Warn) BuildRequires: perl(version) >= 0.86 # Optional Tests BuildRequires: perl(Test::Manifest) >= 1.21 BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Test::Pod::Coverage) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description ConfigReader::Simple reads and parses simple configuration files. It is designed to be smaller and simpler than the ConfigReader module and is more suited to simple configuration files. %prep %setup -q -n ConfigReader-Simple-%{upstream_version} chmod -c -x eg/example.pl %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} %install %{make_install} %{_fixperms} -c %{buildroot} %check make test %files %license LICENSE %doc Changes eg/* README.pod SECURITY.md %{perl_vendorlib}/ConfigReader/ %{_mandir}/man3/ConfigReader::Simple.3* %changelog * Mon Apr 14 2025 Paul Howarth - 1.29.8-1 - Update to 1.298 - Require a newer version.pm for v5.10.1 tests - Use %%{make_build} and %%{make_install} * Sun Jan 5 2025 Paul Howarth - 1.29.7-1 - Update to 1.297 - Refresh distro and move to BRIANDFOY - Package new file SECURITY.md * Tue Jan 23 2024 Paul Howarth - 1.29.6-1 - Update to 1.296 - Refresh distro, update email address, update repo URL * Sun Jul 16 2023 Paul Howarth - 1.29.5-2 - Use SPDX-format license tag * Sun Jan 9 2022 Paul Howarth - 1.29.5-1 - Update to 1.295 - Fix a link in the README.pod * Fri Jan 15 2021 Paul Howarth - 1.29.4-1 - Update to 1.294 - Freshen distro, remove Travis CI, add GitHub Actions - Fix problem with blank line ending processing (GH#2) - Switch upstream from search.cpan.org to metacpan.org - Drop support for EOL distributions prior to F-19, EL-7 - Drop workarounds for building with ExtUtils::MakeMaker < 6.64 - Use %%license unconditionally * Thu Apr 26 2018 Paul Howarth - 1.29.3-1 - Update to 1.293 - Clarify that it's Artistic License 2.0 * Thu Nov 24 2016 Paul Howarth - 1.29.1-1 - Update to 1.291 - Remove the prereq test - License changed to Artistic 2.0 - Our flow does not require ExtUtils::MakeMaker ≥ 6.64, so patch out the version requirement and reduce it to 6.30 - Avoid installing README.pod with old ExtUtils::MakeMaker versions * Wed Aug 10 2016 Paul Howarth - 1.29-2 - Classify buildreqs by usage - Simplify find command using -delete * Thu Sep 4 2014 Paul Howarth - 1.29-1 - Update to 1.29 - Check for reference arguments without using UNIVERSAL::isa - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Mon Jul 9 2012 Paul Howarth - 1.28-6 - BR: perl(Carp), perl(Data::Dumper), perl(File::Spec::Functions), perl(Test::Manifest) and perl(Test::More) - 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 Jun 22 2011 Paul Howarth - 1.28-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.28-4 - Rebuild for perl 5.12.1 in Rawhide * Thu May 13 2010 Paul Howarth - 1.28-3 - Fix dist tag for RHEL-6 Beta * Mon Feb 8 2010 Paul Howarth - 1.28-2 - Dist tag for Rawhide no longer needs special-casing - Use %%{_fixperms} macro rather than our own %%{__chmod} incantation * Wed Jun 10 2009 Paul Howarth - 1.28-1 - Update to 1.28 (upstream cleanup) - BR: perl(Test::Prereq), perl(Test::Output) - Update to SLES-compatible dist tag macros * Thu Aug 21 2008 Paul Howarth - 1.27-1 - Update to 1.27 - Tweak dist tag macros to work on current Rawhide with three-part releasenum * Tue Mar 11 2008 Paul Howarth - 1.26-2 - Rebuild for perl 5.10.0 on Fedora 9 * Mon Nov 12 2007 Paul Howarth - 1.26-1 - Update to 1.26 - Clarify license as GPL version 1 or later, or Artistic (i.e. same as perl) - Turn off exec bit in example script to avoid bogus dependency * Mon Mar 19 2007 Paul Howarth - 1.25-1 - Update to 1.25 - Fix dist tag for Fedora 7 onwards - Fix argument order for find with -depth - BuildRequire perl(ExtUtils::MakeMaker) * Wed Jan 10 2007 Paul Howarth - 1.24-1 - Update to 1.24 - Include LICENSE file * Fri Sep 1 2006 Paul Howarth - 1.23-2 - Fix distribution tags for development releases * Tue Apr 11 2006 Paul Howarth - 1.23-1 - Update to 1.23 - Simplify distribution-detection - Remove __perl_package macro, used only twice - Remove __perl_version macro, used only once - Use search.cpan.org URLs - Remove buildroot unconditionally in %%clean and %%install - Don't use macros in build-time command paths, hardcode them instead * Thu Aug 25 2005 Paul Howarth - 1.21-1 - Update to 1.21 - Add Test::Warn, Test::Pod, and Test::Pod::Coverage buildreqs * Wed Jul 13 2005 Paul Howarth - 1.18-3 - Fix bogus Group: tag - Fix directory ownership issues - Remove optimization flags in %%build, not needed for noarch package * Thu May 19 2005 Paul Howarth - 1.18-2 - Rewrite spec file in (mainly) Fedora Extras style - Include full URL for source - Fix URL - Use MODULE_COMPAT dependency style and remove explicit perl dependency - Remove MANIFEST from %%doc and add example script * Mon May 10 2004 Paul Howarth - 1.18-1 - Initial build