# 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 # Use same epoch and version as perl package from distro %global perl_epoch 4 %global perl_version %(perl -Mversion -e 'print substr version->parse($])->normal, 1' || echo %{?perl_srpm}%{!?perl_srpm:5.0.0}) Name: perl-interpreter Epoch: %{perl_epoch} Version: %{perl_version} Release: 100.%{__distinit}%{__distvers} Summary: The perl language interpreter License: GPL+ or Artistic URL: http://www.perl.org/ BuildArch: noarch # This package just has to pull in the perl package (for Fedora 26 and earlier) Requires: perl # Add virtual provide for perl-generators where package does not exist in Fedora %if 0%{?fedora:1} && 0%{?fedora} < 21 Provides: perl-generators = 0.9-1 %endif # Add virtual provide for perl(:VERSION) where it does not exist in Fedora or RHEL %if 0%{?fedora} < 23 && 0%{?rhel} < 8 BuildRequires: perl BuildRequires: perl(version) Provides: perl(:VERSION) = %{perl_version} %endif %description Perl is a high-level programming language with roots in C, sed, awk and shell scripting. Perl is good at handling processes and files, and is especially good at handling text. Perl's hallmarks are practicality and efficiency. While it is used to do a lot of different things, Perl's most common applications are system administration utilities and web programming. Install this package if you want to program in Perl or enable your system to handle Perl scripts with /usr/bin/perl interpreter. %prep %build %install %check %files %changelog * Wed Dec 13 2017 Paul Howarth - Use same epoch and version as perl package from distro * Mon Jul 24 2017 Paul Howarth - 1.0-3 - Add virtual provide for perl(:VERSION) where it does not exist in Fedora or RHEL * Thu Jul 13 2017 Paul Howarth - 1.0-2 - Add virtual provide for perl-generators where package does not exist in Fedora * Wed Jul 12 2017 Paul Howarth - 1.0-1 - Initial metapackage version