# 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: A Module::Build class for building XS modules Name: perl-Module-Build-XSUtil Version: 0.19 Release: 17.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://github.com/hideo55/Module-Build-XSUtil Source0: https://cpan.metacpan.org/modules/by-module/Module/Module-Build-XSUtil-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(File::Spec) BuildRequires: perl(utf8) # Module BuildRequires: perl-devel BuildRequires: perl(Config) BuildRequires: perl(Devel::CheckCompiler) BuildRequires: perl(Devel::PPPort) BuildRequires: perl(ExtUtils::CBuilder) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Path) BuildRequires: perl(Module::Build) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Test BuildRequires: perl(Capture::Tiny) BuildRequires: perl(Cwd::Guard) BuildRequires: perl(File::Copy::Recursive::Reduced) >= 0.002 BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(File::Temp) BuildRequires: perl(Test::More) >= 0.88 # Runtime %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl-devel Requires: perl(Devel::CheckCompiler) Requires: perl(Devel::PPPort) Requires: perl(ExtUtils::CBuilder) %description Module::Build::XSUtil is a subclass of Module::Build to support building XS modules. It adds a number of compiler-related optional parameters to Module::Build's "new" method. %prep %setup -q -n Module-Build-XSUtil-%{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.md %{perl_vendorlib}/Module/ %{_mandir}/man3/Module::Build::XSUtil.3* %changelog * Tue Jan 24 2023 Paul Howarth - 0.19-17 - Spec tidy-up - Use SPDX-format license tag - Use %%license unconditionally - Fix permissions of installed files - Avoid redundant perl(:MODULE_COMPAT_*) dependency * Thu Jun 6 2019 Paul Howarth - 0.19-5 - Perl 5.30 rebuild * Wed Apr 18 2018 Paul Howarth - 0.19-1 - Update to 0.19 - Use File::Copy::Recursive::Reduced instead of File::Copy::Recursive (GH#13) * Thu Nov 2 2017 Paul Howarth - 0.18-1 - Update to 0.18 - Remove Module::Build::Tiny from deps - Treat perl-devel as a runtime dependency * Wed Nov 1 2017 Paul Howarth - 0.17-1 - Update to 0.17 - Support pure-perl build - BR: perl-devel for test suite - 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 - Drop workaround for building with Test::More < 0.88 * Tue Sep 6 2016 Paul Howarth - 0.16-3 - BR: perl-generators where available * Tue Jun 30 2015 Paul Howarth - 0.16-1 - Update to 0.16 - Fix regexp of _gcc_version for Ubuntu and Debian - Set -std=c99 explicitly for older GCC * Wed Jun 24 2015 Paul Howarth - 0.15-3 - Perl 5.22 rebuild * Fri Apr 24 2015 Paul Howarth - 0.15-1 - Update to 0.15 - Update XSHelper to fix STATIC_INLINE for gcc -std=c89 * Sat Oct 4 2014 Paul Howarth - 0.14-1 - Initial RPM version