Summary: a set of perl modules related to mail applications
Summary(ja): メールアプリケーション関連の Perl モジュールセット
Name: perl-MailTools
Version: 2.21
Release: 1%{_dist_release}
Group: programming
Vendor: Project Vine
Distribution: Vine Linux

License: Artistic
URL: https://metacpan.org/pod/MailTools
Source0: https://cpan.metacpan.org/authors/id/M/MA/MARKOV/MailTools-%{version}.tar.gz
Source1: filter-requires-MailTools.sh

BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: perl >= 5.8.0
BuildRequires: perl-TimeDate
Requires: perl >= 2:5.34.0
Requires: perl-TimeDate

%{?perl_default_filter}

%description
This is MailTools, a set of perl modules related to mail applications.

%description -l ja
MailTools は、メールアプリケーション関連の Perl モジュールセットです。


%prep
%setup -q -n MailTools-%{version} 


%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS="vendor" NO_PACKLIST=1 NO_PERLLOCAL=1
make


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_prefix}
make DESTDIR=$RPM_BUILD_ROOT install
%{_fixperms} $RPM_BUILD_ROOT/*

find $RPM_BUILD_ROOT%{perl_vendorlib} -type f -print | 
	sed "s@^$RPM_BUILD_ROOT@@g" > %{name}.files
if [ "$(cat %{name}.files)X" = "X" ] ; then
    echo "ERROR: EMPTY FILE LIST"
    exit -1
fi


%check
make test

%clean 
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.files
%defattr(-,root,root)
%doc ChangeLog README README.demos examples
%{_mandir}/man3/*
%dir %{perl_vendorlib}/Mail
%dir %{perl_vendorlib}/Mail/Field
%dir %{perl_vendorlib}/Mail/Mailer


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

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

* Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.13-1
- new upstream release.

* Wed Mar 30 2011 IWAI, Masaharu <iwai@alib.jp> 2.07-1
- new upstream release
- add requires filter (Source1)
- add Vendor and Distribution tags
- drop defined perl_vendorlib macro

* Wed Apr 08 2009 Shu KONNO <owa@bg.wakwak.com> 2.04-2
- spec in utf-8

* Sat Feb 14 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.04-1
- new upstream release.

* Thu May  1 2008 Tomohiro 'Tomo-p' KATO <tomop@teamgedoh.net> 2.03-1
- new upstream release.
- built with perl-5.10.0.

* Sat Jul 21 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.77-0vl1
- new upstream release
- changed Group to Development/Libraries

* Thu Sep 15 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.67-0vl1
- new upstream release
- s/Copyright/License/
- use vendor_perl dir

* Sat Dec  4 2004 IWAI, Masaharu <iwai@alib.jp> 1.65-0vl1
- new upstream release
- build on perl-5.8.6-0vl1
- update {Build,}Requires
- add Japanese Summary and description

* Thu Apr 24 2003 IWAI Masaharu <iwai@alib.jp> 1.58-0vl1
- version up to 1.58
- build with perl-5.8.0

* Sun Aug 25 2002 IWAI Masaharu <iwai@alib.jp> 1.48-0vl1
- first build for Vine Linux
