# 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 Summary: Simplified source filtering Name: perl-Filter-Simple Version: 0.94 Release: 2.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/dist/Filter-Simple Source0: https://cpan.metacpan.org/modules/by-module/Filter/Filter-Simple-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(strict) # Module Runtime BuildRequires: perl(Carp) BuildRequires: perl(Filter::Util::Call) BuildRequires: perl(Text::Balanced) BuildRequires: perl(vars) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Exporter) BuildRequires: perl(parent) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif # Avoid doc-file provides and requires %global __provides_exclude_from ^%{_datadir}/doc/%{name} %global __requires_exclude_from ^%{_datadir}/doc/%{name} %description The Filter::Simple module provides a simplified interface to Filter::Util::Call; one that is sufficient for most common cases. %prep %setup -q -n Filter-Simple-%{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 demo/ %{perl_vendorlib}/Filter/ %{_mandir}/man3/Filter::Simple.3* %changelog * Mon Jul 17 2023 Paul Howarth - 0.94-2 - Use SPDX-format license tag - Switch upstream from search.cpan.org to metacpan.org * Fri Aug 4 2017 Paul Howarth - 0.94-1 - Update to 0.94 - Remove use of deprecated \C regex feature - Filter::Simple was erroneously signalling eof if it encountered a 'no MyFilter' right after 'use': use MyFilter; no MyFilter; In this case it should simply not filter anything - Classify buildreqs by usage - Simplify find command using -delete - Modernize requires/provides filtering - 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 - Drop %%defattr, redundant since rpm 4.4 * Fri Mar 7 2014 Paul Howarth - 0.91-1 - Update to 0.91 - Various small documentation fixes - Swap out base.pm use for parent.pm - Drop support for old distributions prior to FC-3 * Tue Dec 20 2011 Paul Howarth - 0.88-1 - Update to 0.88 - Make Filter::Simple match variables better (Perl RT#92436) - Filter::Simple can't find end of POD (Perl RT#92436) * Tue Oct 18 2011 Paul Howarth - 0.87-2 - Fix dist tag for CentOS 6 and Scientific Linux * Fri May 20 2011 Paul Howarth - 0.87-1 - Update to 0.87 - Port changes from core: whitespace fix that is significant for POD correctness - Nobody else likes macros for commands - Use %%{_fixperms} macro instead of our own chmod incantation * Mon Sep 6 2010 Paul Howarth - 0.85-1 - Update to 0.85 - Port changes from core: remove unnecessary PERL_CORE check from tests - Simplify dist tag macros * Wed Sep 16 2009 Paul Howarth - 0.84-1 - Initial RPM package