|
|
|
|
@ -1,77 +1,58 @@
|
|
|
|
|
# Run optional tests
|
|
|
|
|
%if ! (0%{?rhel})
|
|
|
|
|
%{bcond_without perl_File_MimeInfo_enables_optional_test}
|
|
|
|
|
%else
|
|
|
|
|
%{bcond_with perl_File_MimeInfo_enables_optional_test}
|
|
|
|
|
%endif
|
|
|
|
|
# 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}
|
|
|
|
|
# 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.34
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Version: 0.28
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
Summary: Determine file type and open application
|
|
|
|
|
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
|
|
|
|
URL: https://metacpan.org/release/File-MimeInfo
|
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/M/MI/MICHIELB/File-MimeInfo-%{version}.tar.gz
|
|
|
|
|
License: GPL+ or Artistic
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
URL: http://search.cpan.org/dist/File-MimeInfo/
|
|
|
|
|
Source0: http://www.cpan.org/authors/id/M/MI/MICHIELB/File-MimeInfo-%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: coreutils
|
|
|
|
|
BuildRequires: findutils
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl-interpreter
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
|
|
|
|
BuildRequires: perl-generators
|
|
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
|
|
|
BuildRequires: perl(strict)
|
|
|
|
|
BuildRequires: perl(warnings)
|
|
|
|
|
# Run-time:
|
|
|
|
|
BuildRequires: perl(bytes)
|
|
|
|
|
BuildRequires: perl(Carp)
|
|
|
|
|
BuildRequires: perl(Encode)
|
|
|
|
|
BuildRequires: perl(Encode::Locale)
|
|
|
|
|
BuildRequires: perl(Exporter)
|
|
|
|
|
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(File::Temp)
|
|
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
|
|
|
|
# Needed for creating of mimeinfo.cache in tests
|
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
|
# t/11mimeinfo.t executes ./mimetype that returns an unexpected MIME type
|
|
|
|
|
# without shared-mime-info database
|
|
|
|
|
BuildRequires: shared-mime-info
|
|
|
|
|
BuildRequires: perl(Test::More)
|
|
|
|
|
%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-ReadmeFromPod → perl-IO-All → perl-File-MimeInfo
|
|
|
|
|
# perl-Module-Install-ReademFromPod → perl-IO-All → perl-File-MimeInfo
|
|
|
|
|
BuildRequires: perl(Path::Tiny)
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: perl(Test::Pod) >= 1.00
|
|
|
|
|
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
|
|
|
|
|
# Test::Pod::No404s not used
|
|
|
|
|
%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
|
|
|
|
|
%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)\\)$
|
|
|
|
|
@ -80,48 +61,19 @@ Recommends: shared-mime-info
|
|
|
|
|
This module can be used to determine the mime type of a file. It tries to
|
|
|
|
|
implement the freedesktop specification for a shared MIME database.
|
|
|
|
|
|
|
|
|
|
%package tests
|
|
|
|
|
Summary: Tests for %{name}
|
|
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
Requires: desktop-file-utils
|
|
|
|
|
Requires: perl-Test-Harness
|
|
|
|
|
Requires: shared-mime-info
|
|
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
|
Tests from %{name}. Execute them
|
|
|
|
|
with "%{_libexecdir}/%{name}/test".
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n File-MimeInfo-%{version}
|
|
|
|
|
# Remove test, which tests tool app in different place.
|
|
|
|
|
rm -f t/11mimeinfo.t
|
|
|
|
|
# Fix permissions
|
|
|
|
|
chmod -x t/default/binary_file
|
|
|
|
|
chmod -x t/magic/application_x-executable
|
|
|
|
|
# Help generators to recognize Perl scripts
|
|
|
|
|
for F in t/*.t; do
|
|
|
|
|
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
|
|
|
|
chmod +x "$F"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
|
|
|
|
%{make_build}
|
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{make_install}
|
|
|
|
|
%{_fixperms} %{buildroot}/*
|
|
|
|
|
# Install tests
|
|
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
|
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
|
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
|
|
|
|
EOF
|
|
|
|
|
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
|
|
|
|
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
find $RPM_BUILD_ROOT -type f -name .packlist -delete
|
|
|
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
unset EXTENDED_TESTING
|
|
|
|
|
make test
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
@ -132,108 +84,7 @@ make test
|
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
|
|
%files tests
|
|
|
|
|
%{_libexecdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 0.34-5
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.34-4
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.34-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Dec 04 2023 Jitka Plesnikova <jplesnik@redhat.com> - 0.34-1
|
|
|
|
|
- 0.34 bump (rhbz#2252645)
|
|
|
|
|
|
|
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.33-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 13 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.33-1
|
|
|
|
|
- 0.33 bump
|
|
|
|
|
|
|
|
|
|
* Fri Jun 03 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.32-3
|
|
|
|
|
- Perl 5.36 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Wed Jun 01 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.32-2
|
|
|
|
|
- Perl 5.36 rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Mar 07 2022 Michal Josef Špaček <mspacek@redhat.com> - 0.32-1
|
|
|
|
|
- 0.32 bump
|
|
|
|
|
- Package tests
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.31-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jan 06 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.31-1
|
|
|
|
|
- 0.31 bump
|
|
|
|
|
|
|
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.30-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon May 24 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.30-4
|
|
|
|
|
- Perl 5.34 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.30-3
|
|
|
|
|
- Perl 5.34 rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.30-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Oct 27 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.30-1
|
|
|
|
|
- 0.30 bump
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-9
|
|
|
|
|
- Perl 5.32 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-8
|
|
|
|
|
- Perl 5.32 rebuild
|
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jun 02 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-4
|
|
|
|
|
- Perl 5.30 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-3
|
|
|
|
|
- Perl 5.30 rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.29-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Aug 06 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.29-1
|
|
|
|
|
- 0.29 bump
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Jun 30 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-9
|
|
|
|
|
- Perl 5.28 re-rebuild of bootstrapped packages
|
|
|
|
|
|
|
|
|
|
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-8
|
|
|
|
|
- Perl 5.28 rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|