|
|
|
@ -1,11 +1,14 @@
|
|
|
|
|
# Enable optional dependencies
|
|
|
|
|
%bcond_without perl_File_ShareDir_enables_optional_deps
|
|
|
|
|
|
|
|
|
|
Name: perl-File-ShareDir
|
|
|
|
|
Version: 1.118
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Release: 13%{?dist}
|
|
|
|
|
Summary: Locate per-dist and per-module shared files
|
|
|
|
|
# other files: GPL+ or Artistic
|
|
|
|
|
## not in binary packages
|
|
|
|
|
# inc/latest/private.pm: ASL 2.0
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
|
|
|
|
URL: https://metacpan.org/release/File-ShareDir
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-ShareDir-%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
@ -14,6 +17,7 @@ BuildRequires: make
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl-interpreter
|
|
|
|
|
BuildRequires: perl(Carp)
|
|
|
|
|
BuildRequires: perl(Config)
|
|
|
|
|
BuildRequires: perl(Exporter)
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
|
|
|
BuildRequires: perl(File::ShareDir::Install)
|
|
|
|
@ -29,8 +33,10 @@ BuildRequires: perl(base)
|
|
|
|
|
BuildRequires: perl(Class::Inspector) >= 1.12
|
|
|
|
|
BuildRequires: perl(constant)
|
|
|
|
|
# Optional run-time
|
|
|
|
|
%if %{with perl_File_ShareDir_enables_optional_deps}
|
|
|
|
|
BuildRequires: perl(List::MoreUtils) >= 0.428
|
|
|
|
|
BuildRequires: perl(Params::Util) >= 1.07
|
|
|
|
|
%endif
|
|
|
|
|
# Tests
|
|
|
|
|
BuildRequires: perl(Cwd)
|
|
|
|
|
BuildRequires: perl(File::Basename)
|
|
|
|
@ -40,13 +46,17 @@ BuildRequires: perl(POSIX)
|
|
|
|
|
BuildRequires: perl(Test::More) >= 0.47
|
|
|
|
|
# Optional tests
|
|
|
|
|
BuildRequires: perl(CPAN::Meta)
|
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
|
Requires: perl(Class::Inspector) >= 1.12
|
|
|
|
|
%if %{with perl_File_ShareDir_enables_optional_deps}
|
|
|
|
|
Recommends: perl(List::MoreUtils) >= 0.428
|
|
|
|
|
Recommends: perl(Params::Util) >= 1.07
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{?perl_default_filter}
|
|
|
|
|
%global __requires_exclude %{?__requires_exclude}|perl\\(Class::Inspector\\)$
|
|
|
|
|
# Filter modules bundled for tests
|
|
|
|
|
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
|
|
|
|
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(ShareDir::TestClass\\)
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
The intent of File::ShareDir is to provide a companion to Class::Inspector
|
|
|
|
@ -54,8 +64,22 @@ and File::HomeDir, modules that take a process that is well-known by
|
|
|
|
|
advanced Perl developers but gets a little tricky, and make it more
|
|
|
|
|
available to the larger Perl community.
|
|
|
|
|
|
|
|
|
|
%package tests
|
|
|
|
|
Summary: Tests for %{name}
|
|
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
Requires: perl-Test-Harness
|
|
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
|
Tests from %{name}. Execute them
|
|
|
|
|
with "%{_libexecdir}/%{name}/test".
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n File-ShareDir-%{version}
|
|
|
|
|
# Help generators to recognize Perl scripts
|
|
|
|
|
for F in t/*.t; do
|
|
|
|
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
|
|
|
|
chmod +x "$F"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
|
@ -69,6 +93,21 @@ chmod 644 share/subdir/sample.txt
|
|
|
|
|
rm -rf %{buildroot}/blib/lib/auto/share/dist/File-ShareDir/
|
|
|
|
|
rm -rf %{buildroot}/blib/lib/auto/share/module/File-ShareDir/test_file.txt
|
|
|
|
|
|
|
|
|
|
# Install tests
|
|
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
|
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
DIR=$(mktemp -d)
|
|
|
|
|
pushd "$DIR"
|
|
|
|
|
cp -a %{_libexecdir}/%{name}/* ./
|
|
|
|
|
prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
|
|
|
|
popd
|
|
|
|
|
rm -rf "$DIR"
|
|
|
|
|
EOF
|
|
|
|
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
make test AUTOMATED_TESTING=1
|
|
|
|
|
|
|
|
|
@ -78,13 +117,45 @@ make test AUTOMATED_TESTING=1
|
|
|
|
|
%{perl_vendorlib}/*
|
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
|
|
%files tests
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.118-4
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Tue Nov 26 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.118-13
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Wed Jul 24 2024 Jitka Plesnikova <jplesnik@redhat.com> - 1.118-13
|
|
|
|
|
- Package tests
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.118-12
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue May 31 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.118-6
|
|
|
|
|
- Perl 5.36 rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.118-3
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.118-3
|
|
|
|
|
- Perl 5.34 rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.118-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|