# 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-File-ShareDir-ProjectDistDir Version: 1.000009 Release: 19.%{__distinit}%{__distvers} Summary: Simple set-and-forget using of a '/share' directory in your project's root License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/File-ShareDir-ProjectDistDir Source0: https://cpan.metacpan.org/modules/by-module/File/File-ShareDir-ProjectDistDir-%{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(Carp) BuildRequires: perl(File::ShareDir) BuildRequires: perl(Path::FindDev) BuildRequires: perl(Path::IsDev) BuildRequires: perl(Path::Tiny) BuildRequires: perl(Sub::Exporter) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Class::Tiny) BuildRequires: perl(File::Spec) BuildRequires: perl(FindBin) BuildRequires: perl(lib) BuildRequires: perl(Test::More) # Optional Tests BuildRequires: perl(Capture::Tiny) >= 0.12 BuildRequires: perl(CPAN::Meta) >= 2.120900 BuildRequires: perl(Path::Class) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(Carp) Requires: perl(Path::Tiny) %description Simple set-and-forget using of a '/share' directory in your project's root. %prep %setup -q -n File-ShareDir-ProjectDistDir-%{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 %license LICENSE %doc Changes README %{perl_vendorlib}/File/ %{_mandir}/man3/File::ShareDir::ProjectDistDir.3* %changelog * Sun Jul 16 2023 Paul Howarth - 1.000009-19 - Use SPDX-format license tag - Use %%license unconditionally * Fri Jun 7 2019 Paul Howarth - 1.000009-8 - Modernize spec - Switch upstream from search.cpan.org to metacpan.org - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl - Don't explicitly clean buildroot in %%install section - Drop explicit %%clean section - Drop legacy BuildRoot: and Group: tags * Fri Mar 10 2017 Paul Howarth - 1.000009-1 - Update to 1.000009 - Fix tests failing with -Ddefault_inc_excludes_dot - Tests made more old-test-more friendly - No longer need to bundle Test::More 0.96 * Thu Aug 25 2016 Paul Howarth - 1.000008-3 - BR: perl-generators where available - Simplify find command using -delete * Wed Mar 2 2016 Paul Howarth - 1.000008-2 - Add support for old distributions now that Path::Tiny does * Sun Jul 12 2015 Paul Howarth - 1.000008-1 - Update to 1.000008 - Declare a minimum version for a working Capture::Tiny::capture_stderr * Sat Jun 27 2015 Paul Howarth - 1.000007-3 - Perl 5.22 rebuild * Wed Apr 22 2015 Paul Howarth - 1.000007-1 - Update to 1.000007 - Add a deterrent notice * Tue Apr 14 2015 Paul Howarth - 1.000005-1 - Update to 1.000005 - Dropped minimum perl version to 5.6 - Erroneous synopsis fixed (GH #15) * Fri Sep 5 2014 Paul Howarth - 1.000004-1 - Update to 1.000004 - No code changes - Tests updated - Metadata updated - Whitespace reduced - Minor documentation fixes - Use %%license * Mon Jun 16 2014 Paul Howarth - 1.000002-1 - Update to 1.000002 - Most tests refactored to have their dependent files inflated into existence during testing; this is to avoid issues with an HP-UX box that has a tar implementation that truncates filenames at 100 characters (https://github.com/kentfredric/File-ShareDir-ProjectDistDir/issues/13) * Tue Mar 4 2014 Paul Howarth - 1.000001-1 - Update to 1.000001 - Fixed test failure on Perls that don't like unsetting %%INC * Sat Mar 1 2014 Paul Howarth - 1.000000-1 - Update to 1.000000 - Seriously, read SIGNIFICANT CHANGES for details - Add 'strict' mode - Defer dev path and determination to call-time - Switch to float versions - Start warning about Path::Class usage - Stop depending on Path::Class - Stop using Path::Class - Use EUMM for tooling - Switch to ExtUtils::MakeMaker flow * Thu Sep 26 2013 Paul Howarth - 0.5.2-1 - Update to 0.5.2 - Use a compile test not known to break on Win32 * Mon Sep 16 2013 Paul Howarth - 0.5.1-1 - Update to 0.5.1 - Entire Heuristics system replaced with Path::IsDev/Path::FindDev - Internals re-written to use Path::Tiny - Please read SIGNIFICANT CHANGES section on ::ProjectDistDir for details - Drop support for old distributions since we need Path::Tiny, which can't work there due to its autodie version requirement * Sun Sep 15 2013 Paul Howarth - 0.4.4-1 - Initial RPM version