97684b
# Use system-wide mailcap database
97684b
%bcond_without perl_LWP_MediaTypes_enables_mailcap
97684b
97684b
Name:           perl-LWP-MediaTypes
97684b
Version:        6.04
97684b
Release:        9%{?dist}
97684b
Summary:        Guess media type for a file or a URL
97684b
# lib/LWP/media.types:      Public Domain
97684b
# lib/LWP/MediaTypes.pm:    GPL+ or Artistic
97684b
License:        (GPL+ or Artistic) and Public Domain
97684b
URL:            https://metacpan.org/release/LWP-MediaTypes
97684b
Source0:        https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-%{version}.tar.gz
97684b
BuildArch:      noarch
97684b
BuildRequires:  make
97684b
BuildRequires:  perl-generators
97684b
BuildRequires:  perl-interpreter
97684b
BuildRequires:  perl(:VERSION) >= 5.6.2
97684b
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
97684b
BuildRequires:  perl(strict)
97684b
BuildRequires:  perl(warnings)
97684b
BuildRequires:  sed
97684b
# Run-time:
97684b
BuildRequires:  perl(Carp)
97684b
BuildRequires:  perl(Exporter)
97684b
BuildRequires:  perl(File::Basename)
97684b
BuildRequires:  perl(Scalar::Util)
97684b
# Tests only:
97684b
BuildRequires:  perl(File::Spec)
97684b
BuildRequires:  perl(overload)
97684b
BuildRequires:  perl(Test::Fatal)
97684b
BuildRequires:  perl(Test::More)
97684b
# Optional tests:
97684b
# CPAN::Meta not helpful
97684b
# CPAN::Meta::Prereqs not helpful
97684b
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
97684b
Requires:       perl(File::Basename)
97684b
%if %{with perl_LWP_MediaTypes_enables_mailcap}
97684b
Requires:       mailcap
97684b
%endif
97684b
Conflicts:      perl-libwww-perl < 6
97684b
97684b
%description
97684b
This module provides functions for handling media (also known as MIME)
97684b
types and encodings. The mapping from file extensions to media types is
97684b
defined by the media.types file. If the ~/.media.types file exists it is
97684b
used instead. For backwards compatibility we will also look for
97684b
~/.mime.types.
97684b
97684b
%prep
97684b
%setup -q -n LWP-MediaTypes-%{version}
97684b
%if %{with perl_LWP_MediaTypes_enables_mailcap}
97684b
# Use system-wide mailcap database
97684b
sed -i -e '/my @priv_files = ();/ s|()|("%{_sysconfdir}/mime.types")|' \
97684b
    lib/LWP/MediaTypes.pm
97684b
%endif
97684b
97684b
%build
97684b
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
97684b
%{make_build}
97684b
97684b
%install
97684b
%{make_install}
97684b
%{_fixperms} %{buildroot}/*
97684b
97684b
%check
97684b
make test
97684b
97684b
%files
97684b
%license LICENSE
97684b
%doc Changes README
97684b
%{perl_vendorlib}/*
97684b
%{_mandir}/man3/*
97684b
97684b
%changelog
97684b
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 6.04-9
97684b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
97684b
  Related: rhbz#1991688
97684b
97684b
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 6.04-8
97684b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
97684b
97684b
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-7
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
97684b
97684b
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-6
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
97684b
97684b
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 6.04-5
97684b
- Perl 5.32 rebuild
97684b
97684b
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-4
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
97684b
97684b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.04-3
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
97684b
97684b
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 6.04-2
97684b
- Perl 5.30 rebuild
97684b
97684b
* Wed Mar 20 2019 Petr Pisar <ppisar@redhat.com> - 6.04-1
97684b
- 6.04 bump
97684b
97684b
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-17
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
97684b
97684b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-16
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
97684b
97684b
* Wed Jun 27 2018 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-15
97684b
- Perl 5.28 rebuild
97684b
97684b
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-14
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
97684b
97684b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-13
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
97684b
97684b
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-12
97684b
- Perl 5.26 rebuild
97684b
97684b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-11
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
97684b
97684b
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-10
97684b
- Perl 5.24 rebuild
97684b
97684b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-9
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
97684b
97684b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-8
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
97684b
97684b
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-7
97684b
- Perl 5.22 rebuild
97684b
97684b
* Tue Aug 26 2014 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-6
97684b
- Perl 5.20 rebuild
97684b
97684b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-5
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
97684b
97684b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-4
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
97684b
97684b
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 6.02-3
97684b
- Perl 5.18 rebuild
97684b
97684b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-2
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
97684b
97684b
* Thu Nov 22 2012 Petr Šabata <contyk@redhat.com> - 6.02-1
97684b
- 6.02 bump
97684b
- Drop command macros
97684b
- Modernize the spec
97684b
- Correct the Lincense tag
97684b
97684b
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.01-6
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
97684b
97684b
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 6.01-5
97684b
- Perl 5.16 rebuild
97684b
97684b
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.01-4
97684b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
97684b
97684b
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 6.01-3
97684b
- Perl mass rebuild
97684b
97684b
* Thu Mar 17 2011 Petr Pisar <ppisar@redhat.com> - 6.01-2
97684b
- Use MIME type database from mailcap
97684b
97684b
* Thu Mar 17 2011 Petr Pisar <ppisar@redhat.com> 6.01-1
97684b
- Specfile autogenerated by cpanspec 1.78.
97684b
- Remove BuildRoot stuff
97684b
- Conflicts with perl-libwww-perl 5* and older