Specify all dependencies
shared-mime-info is now mandatory for the tests. Though it would be possible to patch it out.
This commit is contained in:
parent
b655f25490
commit
d2243dfb52
@ -4,13 +4,14 @@
|
||||
%else
|
||||
%{bcond_with perl_File_MimeInfo_enables_optional_test}
|
||||
%endif
|
||||
# Require shared-mime-info to suppress warnings about missing
|
||||
# /usr/share/mime/globs
|
||||
%{bcond_without perl_File_MimeInfo_enables_shared_mime_info}
|
||||
# Use IO::Scalar to support processing a standard input in a mimetype tool
|
||||
%{bcond_without perl_File_MimeInfo_enables_stdin}
|
||||
# Use Pod::Usage to support printing a usage text by a mimetype tool
|
||||
%{bcond_without perl_File_MimeInfo_enables_usage}
|
||||
|
||||
Name: perl-File-MimeInfo
|
||||
Version: 0.29
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Determine file type and open application
|
||||
License: GPL+ or Artistic
|
||||
URL: https://metacpan.org/release/File-MimeInfo
|
||||
@ -31,32 +32,42 @@ BuildRequires: perl(Fcntl)
|
||||
BuildRequires: perl(File::BaseDir) >= 0.03
|
||||
BuildRequires: perl(File::DesktopEntry) >= 0.04
|
||||
BuildRequires: perl(File::Spec)
|
||||
# Optional run-time:
|
||||
%if %{with perl_File_MimeInfo_enables_stdin}
|
||||
BuildRequires: perl(IO::Scalar)
|
||||
%endif
|
||||
%if %{with perl_File_MimeInfo_enables_usage}
|
||||
BuildRequires: perl(Pod::Usage)
|
||||
%endif
|
||||
# Tests:
|
||||
BuildRequires: perl(FindBin)
|
||||
BuildRequires: perl(Test::More) >= 0.88
|
||||
# t/11mimeinfo.t executes ./mimetype that returns an unexpected MIME type
|
||||
# without shared-mime-info database
|
||||
BuildRequires: shared-mime-info
|
||||
%if %{with perl_File_MimeInfo_enables_optional_test}
|
||||
# Optional tests:
|
||||
%if !%{defined perl_bootstrap}
|
||||
# Break build cycle: perl-Path-Tiny → perl-Unicode-UTF8 →
|
||||
# perl-Module-Install-ReademFromPod → perl-IO-All → perl-File-MimeInfo
|
||||
# perl-Module-Install-ReadmeFromPod → perl-IO-All → perl-File-MimeInfo
|
||||
BuildRequires: perl(Path::Tiny)
|
||||
%endif
|
||||
BuildRequires: perl(Test::Pod) >= 1.00
|
||||
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
|
||||
%if %{with perl_File_MimeInfo_enables_shared_mime_info}
|
||||
# needed for some tests otherwise there are warnings
|
||||
BuildRequires: shared-mime-info
|
||||
%endif
|
||||
%endif
|
||||
%if %{with perl_File_MimeInfo_enables_shared_mime_info}
|
||||
# there is also a mimeinfo.cache file created by desktop-file-utils
|
||||
# needed. It won't be there if building in a chroot, even if
|
||||
# desktop-file-utils is installed if desktop-file-utils was never run.
|
||||
Requires: shared-mime-info
|
||||
# Test::Pod::No404s not used
|
||||
%endif
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
Requires: perl(File::BaseDir) >= 0.03
|
||||
Requires: perl(File::DesktopEntry) >= 0.04
|
||||
%if %{with perl_File_MimeInfo_enables_stdin}
|
||||
Recommends: perl(IO::Scalar)
|
||||
%endif
|
||||
%if %{with perl_File_MimeInfo_enables_usage}
|
||||
Recommends: perl(Pod::Usage)
|
||||
%endif
|
||||
# It's optional, but without it File::MimeInfo produces an annoying warning
|
||||
# about a missing /usr/share/mime/globs and returns inaccurate results.
|
||||
Recommends: shared-mime-info
|
||||
|
||||
# Filter under-specified dependencies
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((File::BaseDir|File::DesktopEntry)\\)$
|
||||
@ -78,6 +89,7 @@ find $RPM_BUILD_ROOT -type f -name .packlist -delete
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%check
|
||||
unset EXTENDED_TESTING
|
||||
make test
|
||||
|
||||
%files
|
||||
@ -89,6 +101,9 @@ make test
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 23 2020 Petr Pisar <ppisar@redhat.com> - 0.29-7
|
||||
- Specify all dependencies
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user