%bcond_with Mojolicious
Summary:        MIME types module for Perl
Name:           perl-MIME-Types
Version:        2.22
Release:        1%{?_dist_release}
Group:          programming
Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPL or Artistic
URL:            https://metacpan.org/pod/MIME::Types
Source0:        https://cpan.metacpan.org/authors/id/M/MA/MARKOV/MIME-Types-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  perl >= 2:5.34.0
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::MinimumVersion)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Pod)
Requires:       perl >= 2:5.34.0

%description
MIME types are used in MIME compliant lines, for instance as part of
e-mail and HTTP traffic, to indicate the type of content which is
transmitted. Sometimes real knowledge about a mime-type is need.
This module maintains a set of MIME::Type objects, which each describe
one known mime type. There are many types defined by RFCs and vendors,
so the list is long but not complete. Please don't hestitate to ask to
add additional information.


%prep
%setup -q -n MIME-Types-%{version}


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*

%if %{without Mojolicious}
rm -rf %{buildroot}%{perl_vendorlib}/MojoX/
rm -rf %{buildroot}%{_mandir}/man3/Mojo*
%endif


%check
make test
make test TEST_FILES="xt/*.t"


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc ChangeLog README
%{perl_vendorlib}/MIME/
%if %{with Mojolicious}
%{perl_vendorlib}/MojoX/
%endif
%{_mandir}/man3/*.3*


%changelog
* Sun Nov 21 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.22-1
- new upstream release.
- built with perl-5.34.0.

* Sat May 18 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.17-1
- new upstream release.
- rebuilt with perl-5.26.

* Mon Jun 30 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 2.0.4-1
- update to 2.0.4

* Sat Mar 10 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.31-1
- updated to 1.31

* Sat Apr 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.19-3
- rebuild with perl-5.12.3

* Tue Nov 13 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.19-2vl1
- Initial build for Vine Linux

* Tue Apr 17 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.19-2
- BuildRequire perl(Test::More).

* Mon Mar 26 2007 Ville Skyttä <ville.skytta at iki.fi> - 1.19-1
- 1.19.
- BuildRequire perl(ExtUtils::MakeMaker).

* Wed Nov 22 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.18-1
- 1.18.

* Fri Sep 15 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.17-2
- Rebuild.

* Tue Aug 15 2006 Ville Skyttä <ville.skytta at iki.fi> - 1.17-1
- 1.17.

* Sun Oct  2 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.16-1
- 1.16.

* Fri Apr  1 2005 Ville Skyttä <ville.skytta at iki.fi> - 1.15-2
- 1.15.

* Tue May 25 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.13-0.fdr.3
- Require perl(:MODULE_COMPAT_*) (bug 1649).

* Mon May 17 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.13-0.fdr.2
- Sync with IANA 20040517.
- Require perl >= 1:5.6.1 for vendor install dir support.
- Use pure_install to avoid perllocal.pod workarounds.

* Sat Apr 24 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.13-0.fdr.1
- Update to 1.13 + IANA 20040424.

* Sun Feb  1 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.12-0.fdr.2
- Reduce directory ownership bloat.

* Wed Jan 21 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.12-0.fdr.1
- Update to 1.12.

* Wed Jan 14 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:1.11-0.fdr.1
- Update to 1.11.

* Wed Dec 31 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.10-0.fdr.2
- BuildRequires perl(Test::More).

* Fri Dec 19 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.10-0.fdr.1
- Update to 1.10.

* Thu Nov  6 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.09-0.fdr.1
- Update to 1.09.

* Tue Nov  4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.08-0.fdr.1
- Update to 1.08.

* Sat Oct 11 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.07-0.fdr.2
- Install into vendor dirs.
- Don't use fedora-rpm-helper.
- Specfile cleanup.

* Wed Jul 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.07-0.fdr.1
- Update to 1.07.
- Use fedora-rpm-helper.

* Tue Jun 24 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:1.06-0.fdr.1
- First build.
