Add build-condition for shared-mime-info dependency

This commit is contained in:
Petr Písař 2017-05-04 11:43:06 +02:00
parent 431285aef1
commit 18de144064

View File

@ -1,5 +1,8 @@
# Run optional tests
%{bcond_without perl_File_MimeInfo_enables_optional_test}
# Require shared-mime-info to suppress warnings about missing
# /usr/share/mime/globs
%{bcond_without perl_File_MimeInfo_enables_shared_mime_info}
Name: perl-File-MimeInfo
Version: 0.28
@ -36,13 +39,17 @@ 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
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(File::BaseDir) >= 0.03
Requires: perl(File::DesktopEntry) >= 0.04