6dc2d4
# Use system-wide mailcap database
6dc2d4
%bcond_without perl_LWP_MediaTypes_enables_mailcap
6dc2d4
6dc2d4
Name:           perl-LWP-MediaTypes
6dc2d4
Version:        6.02
6dc2d4
Release:        14%{?dist}
6dc2d4
Summary:        Guess media type for a file or a URL
6dc2d4
License:        (GPL+ or Artistic) and Public Domain
6dc2d4
Group:          Development/Libraries
6dc2d4
URL:            http://search.cpan.org/dist/LWP-MediaTypes/
6dc2d4
Source0:        http://www.cpan.org/authors/id/G/GA/GAAS/LWP-MediaTypes-%{version}.tar.gz
6dc2d4
BuildArch:      noarch
6dc2d4
BuildRequires:  perl-generators
6dc2d4
BuildRequires:  perl(Exporter)
6dc2d4
BuildRequires:  perl(ExtUtils::MakeMaker)
6dc2d4
BuildRequires:  perl(File::Basename)
6dc2d4
# Tests only:
6dc2d4
BuildRequires:  perl(Test)
6dc2d4
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
6dc2d4
Requires:       perl(File::Basename)
6dc2d4
%if %{with perl_LWP_MediaTypes_enables_mailcap}
6dc2d4
Requires:       mailcap
6dc2d4
%endif
6dc2d4
Conflicts:      perl-libwww-perl < 6
6dc2d4
6dc2d4
%description
6dc2d4
This module provides functions for handling media (also known as MIME)
6dc2d4
types and encodings. The mapping from file extensions to media types is
6dc2d4
defined by the media.types file. If the ~/.media.types file exists it is
6dc2d4
used instead. For backwards compatibility we will also look for
6dc2d4
~/.mime.types.
6dc2d4
6dc2d4
%prep
6dc2d4
%setup -q -n LWP-MediaTypes-%{version}
6dc2d4
%if %{with perl_LWP_MediaTypes_enables_mailcap}
6dc2d4
# Use system-wide mailcap database
6dc2d4
sed -i -e '/my @priv_files = ();/ s|()|("%{_sysconfdir}/mime.types")|' \
6dc2d4
    lib/LWP/MediaTypes.pm
6dc2d4
%endif
6dc2d4
6dc2d4
%build
6dc2d4
perl Makefile.PL INSTALLDIRS=vendor
6dc2d4
make %{?_smp_mflags}
6dc2d4
6dc2d4
%install
6dc2d4
make pure_install DESTDIR=%{buildroot}
6dc2d4
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
6dc2d4
%{_fixperms} %{buildroot}/*
6dc2d4
6dc2d4
%check
6dc2d4
make test
6dc2d4
6dc2d4
%files
6dc2d4
%doc Changes README
6dc2d4
%{perl_vendorlib}/*
6dc2d4
%{_mandir}/man3/*
6dc2d4
6dc2d4
%changelog
6dc2d4
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-14
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6dc2d4
6dc2d4
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-13
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6dc2d4
6dc2d4
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-12
6dc2d4
- Perl 5.26 rebuild
6dc2d4
6dc2d4
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-11
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6dc2d4
6dc2d4
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-10
6dc2d4
- Perl 5.24 rebuild
6dc2d4
6dc2d4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.02-9
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6dc2d4
6dc2d4
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-8
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6dc2d4
6dc2d4
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-7
6dc2d4
- Perl 5.22 rebuild
6dc2d4
6dc2d4
* Tue Aug 26 2014 Jitka Plesnikova <jplesnik@redhat.com> - 6.02-6
6dc2d4
- Perl 5.20 rebuild
6dc2d4
6dc2d4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-5
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
6dc2d4
6dc2d4
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-4
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
6dc2d4
6dc2d4
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 6.02-3
6dc2d4
- Perl 5.18 rebuild
6dc2d4
6dc2d4
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.02-2
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6dc2d4
6dc2d4
* Thu Nov 22 2012 Petr Šabata <contyk@redhat.com> - 6.02-1
6dc2d4
- 6.02 bump
6dc2d4
- Drop command macros
6dc2d4
- Modernize the spec
6dc2d4
- Correct the Lincense tag
6dc2d4
6dc2d4
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.01-6
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6dc2d4
6dc2d4
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 6.01-5
6dc2d4
- Perl 5.16 rebuild
6dc2d4
6dc2d4
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.01-4
6dc2d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6dc2d4
6dc2d4
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 6.01-3
6dc2d4
- Perl mass rebuild
6dc2d4
6dc2d4
* Thu Mar 17 2011 Petr Pisar <ppisar@redhat.com> - 6.01-2
6dc2d4
- Use MIME type database from mailcap
6dc2d4
6dc2d4
* Thu Mar 17 2011 Petr Pisar <ppisar@redhat.com> 6.01-1
6dc2d4
- Specfile autogenerated by cpanspec 1.78.
6dc2d4
- Remove BuildRoot stuff
6dc2d4
- Conflicts with perl-libwww-perl 5* and older