# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: Various ancient mail-related perl modules Name: perl-MailTools Version: 2.22 Release: 1.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/MailTools Source0: https://cpan.metacpan.org/authors/id/M/MA/MARKOV/MailTools-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: sed # Module Runtime BuildRequires: perl(base) BuildRequires: perl(Carp) BuildRequires: perl(Config) BuildRequires: perl(Date::Format) BuildRequires: perl(Date::Parse) BuildRequires: perl(Exporter) BuildRequires: perl(IO::Handle) BuildRequires: perl(Net::Domain) >= 1.05 BuildRequires: perl(Net::NNTP) BuildRequires: perl(Net::SMTP) >= 1.28 BuildRequires: perl(Net::SMTP::SSL) BuildRequires: perl(POSIX) BuildRequires: perl(strict) # Test Suite BuildRequires: perl(Test::More) BuildRequires: perl(warnings) # Extra Tests BuildRequires: perl(Test::Pod) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(Net::Domain) >= 1.05 Requires: perl(Net::NNTP) %description MailTools is a set of ancient Perl modules related to mail applications. %prep %setup -q -n MailTools-%{version} # Set up example scripts cd examples for file in *.PL; do perl $file done chmod -c -x *_demo # Remove example-generation scripts, no longer needed rm *.PL cd - sed -i -e '/^examples\/.*\.PL/d' MANIFEST %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test make test TEST_FILES="xt/*.t" %files %doc ChangeLog README* examples/ %dir %{perl_vendorlib}/Mail/ %dir %{perl_vendorlib}/Mail/Field/ %dir %{perl_vendorlib}/Mail/Mailer/ %doc %{perl_vendorlib}/Mail/Address.pod %doc %{perl_vendorlib}/Mail/Cap.pod %doc %{perl_vendorlib}/Mail/Field.pod %doc %{perl_vendorlib}/Mail/Field/AddrList.pod %doc %{perl_vendorlib}/Mail/Field/Date.pod %doc %{perl_vendorlib}/Mail/Field/Generic.pod %doc %{perl_vendorlib}/Mail/Filter.pod %doc %{perl_vendorlib}/Mail/Header.pod %doc %{perl_vendorlib}/Mail/Internet.pod %doc %{perl_vendorlib}/Mail/Mailer.pod %doc %{perl_vendorlib}/Mail/Send.pod %doc %{perl_vendorlib}/Mail/Util.pod %doc %{perl_vendorlib}/MailTools.pod %{perl_vendorlib}/Mail/Address.pm %{perl_vendorlib}/Mail/Cap.pm %{perl_vendorlib}/Mail/Filter.pm %{perl_vendorlib}/Mail/Header.pm %{perl_vendorlib}/Mail/Internet.pm %{perl_vendorlib}/Mail/Field.pm %{perl_vendorlib}/Mail/Mailer.pm %{perl_vendorlib}/Mail/Send.pm %{perl_vendorlib}/Mail/Util.pm %{perl_vendorlib}/Mail/Field/AddrList.pm %{perl_vendorlib}/Mail/Field/Date.pm %{perl_vendorlib}/Mail/Field/Generic.pm %{perl_vendorlib}/Mail/Mailer/qmail.pm %{perl_vendorlib}/Mail/Mailer/rfc822.pm %{perl_vendorlib}/Mail/Mailer/sendmail.pm %{perl_vendorlib}/Mail/Mailer/smtp.pm %{perl_vendorlib}/Mail/Mailer/smtps.pm %{perl_vendorlib}/Mail/Mailer/testfile.pm %{perl_vendorlib}/MailTools.pm %{_mandir}/man3/Mail::Address.3* %{_mandir}/man3/Mail::Cap.3* %{_mandir}/man3/Mail::Field.3* %{_mandir}/man3/Mail::Field::AddrList.3* %{_mandir}/man3/Mail::Field::Date.3* %{_mandir}/man3/Mail::Field::Generic.3* %{_mandir}/man3/Mail::Filter.3* %{_mandir}/man3/Mail::Header.3* %{_mandir}/man3/Mail::Internet.3* %{_mandir}/man3/Mail::Mailer.3* %{_mandir}/man3/Mail::Send.3* %{_mandir}/man3/Mail::Util.3* %{_mandir}/man3/MailTools.3* %changelog * Mon Nov 18 2024 Paul Howarth - 2.22-1 - Update to 2.22 (rhbz#2326982) - To/Cc/Bcc/From fields may appear only once (GH#4) * Thu Apr 27 2023 Paul Howarth - 2.21-13 - Use SPDX-format license tag * Fri Jun 7 2019 Paul Howarth - 2.21-2 - Perl 5.30 rebuild * Tue May 21 2019 Paul Howarth - 2.21-1 - Update to 2.21 - Fix metadata - Add more to the README - Add Mail::Mailer option StartSSL for smtp backend (CPAN RT#125871) - Deprecate Mail::Mailer backend smtps - Document need for escaping docs for Mail::Send (CPAN RT#129627) - Document limit on parameters for Mail::Send::new() (CPAN RT#129633) * Tue Jan 23 2018 Paul Howarth - 2.20-1 - Update to 2.20 - Rewrite doc syntax to my current standard style - Text corrections (CPAN RT#123823, CPAN RT#123824) - Convert to git - Move to GitHub * Wed Aug 23 2017 Paul Howarth - 2.19-1 - Update to 2.19 - Block namespace MailTools (CPAN RT#120905) - Add "ancient" to %%summary and %%description - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Thu May 19 2016 Paul Howarth - 2.18-1 - Update to 2.18 - Mail::Header should accept \r in empty line, which ends the header (CPAN RT#114382) - BR: perl-generators where available * Thu May 12 2016 Paul Howarth - 2.17-1 - Update to 2.17 - Mail::Header should only accept totally empty lines as header terminator, not to break MIME::Tools regression tests (CPAN RT#113918) * Tue Apr 19 2016 Paul Howarth - 2.16-1 - Update to 2.16 - Mail::Header continues reading after wrongly folded line (CPAN RT#113464) - Mail::Mailer::open call of exec() explained - Fix example in Mail::Address - Fix Mail::Header file parsing regression in 2.15 (CPAN RT#113874) - Simplify find command using -delete * Fri Nov 21 2014 Paul Howarth - 2.14-1 - Update to 2.14 - Fix threads and Mail::Field initiation (CPAN RT#99153) - Warn when loading of some Mail::Field::* fails - Classify buildreqs by usage - Silence warnings from MakeMaker about files we delete in %%prep * Thu Aug 28 2014 Paul Howarth - 2.13-3 - Drop %%defattr, redundant since rpm 4.4 * Mon Jan 6 2014 Paul Howarth - 2.13-1 - Update to 2.13 - Optional 'from' and 'on' component in in-reply-to are comments (CPAN RT#89371) - mailcap \\\\ -> \\ (CPAN RT#89802) - Fix typos (CPAN RT#87188) * Fri Dec 21 2012 Paul Howarth - 2.12-1 - Update to 2.12 - Default for Mail::Header::new(Modify) is 'false', not 'true' (CPAN RT#79985) - Mail::Address take username with rindex(), a bit better than index() but still poor (CPAN RT#82056) - Check for bad folding of header lines (CPAN RT#79993) - Add a note about better to avoid Mail::Address->name() (CPAN RT#81459) - Drop UTF8 patch, no longer needed * Wed Aug 29 2012 Paul Howarth - 2.11-1 - Update to 2.11 - Fix typo in Mail::Mailer::smtp, which only shows up in Perl > 5.14 * Tue Aug 28 2012 Paul Howarth - 2.10-1 - Update to 2.10 - Mail::Mailer::smtp set from address twice (CPAN RT#77161) - Mail::Mailer::smtps did not support the From option (CPAN RT#77161) - Mail::Util::mailaddress has now an optional parameter to set the returned value explicitly (CPAN #75975) * Sat Jun 23 2012 Paul Howarth - 2.09-2 - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT - Use %%{_fixperms} macro rather than our own chmod incantation * Sat Feb 25 2012 Paul Howarth - 2.09-1 - Update to 2.09 - Remove dependency to Test::Pod by moving 99pod.t from t/ to xt/ (CPAN RT#69918) - Explicitly run xt/ tests - Add buildreqs for Perl core modules that might be dual-lived * Tue Jun 28 2011 Paul Howarth - 2.08-2 - Rebuild for perl 5.14.1 in Rawhide - Fix dist tag for CentOS 6 and Scientific Linux * Wed Jun 1 2011 Paul Howarth - 2.08-1 - Update to 2.08 (#709697) - Respect errors on closing a Mail::Mailer::smtp/::smtps connection - Mail::Internet should accept Net::SMTP::SSL as well (CPAN RT#68590) - Document that Mail::Mailer::smtps needs Authen::SASL - Use patch rather than iconv to convert docs to UTF8 encoding - Nobody else likes macros for commands * Fri Oct 1 2010 Paul Howarth - 2.07-1 - Update to 2.07 - Document perl 5.8.1 requirement in README (CPAN RT#61753) - Add "MAIL FROM" to Mail::Mailer::smtp * Fri Jun 25 2010 Paul Howarth - 2.06-3 - Rebuild for perl 5.12.1 in Rawhide * Fri Jun 4 2010 Paul Howarth - 2.06-2 - Fix dist tag for RHEL-6 Beta * Wed Jan 27 2010 Paul Howarth - 2.06-1 - Update to 2.06 (add support for smtps via Net::SMTP::SSL) * Mon Dec 21 2009 Paul Howarth - 2.05-1 - Update to 2.05 - Fix de-ref error when index out of range in Mail::Header::get() - Repair fixed selection of smtp for non-unix systems - Do not run pod.t in devel environment - Set default output filename for Mail::Mailer::testfile::PRINT - Warn when no mailers were found (CPAN RT#52901) - Dist tag for Rawhide no longer needs special-casing * Mon Sep 21 2009 Paul Howarth - 2.04-2 - Define RPM macros in global scope * Wed Jul 30 2008 Paul Howarth - 2.04-1 - Update to 2.04 - Tweak dist tag macros to work on current Rawhide with three-part releasenum * Tue Apr 15 2008 Paul Howarth - 2.03-1 - Update to 2.03 * Mon Dec 3 2007 Paul Howarth - 2.02-2 - Minor cosmetic resync with Fedora package * Fri Nov 30 2007 Paul Howarth - 2.02-1 - Update to 2.02 - Remove buildreqs perl(Net::SMTP) and perl(Net::Domain), bundled with perl - Add buildreqs perl(Date::Format), perl(Date::Parse), perl(Test::More), and perl(Test::Pod) - Remove patch for CPAN RT#20726, now fixed upstream - Buildreq perl >= 5.8.1 - Tweak files list to mark pod files as %%doc - Fix character encoding for ChangeLog * Fri May 11 2007 Paul Howarth - 1.77-1 - Update to 1.77 * Tue Apr 10 2007 Paul Howarth - 1.76-1 - Update to 1.76 - Add comment text about the patch for fixing CPAN RT#20726 * Sun Mar 18 2007 Paul Howarth - 1.74-3 - Fix dist tag for CentOS and development builds - Fix argument order for find with -depth - Buildrequire perl(ExtUtils::MakeMaker) * Fri Jul 28 2006 Paul Howarth - 1.74-2 - Define %%{__id_u} in a more portable way - Make the demo scripts - Fix CPAN RT#20726 (RH #200450), allowing Mail::Util::read_mbox() to open files with weird names * Tue Feb 28 2006 Paul Howarth - 1.74-1 - Update to 1.74 * Mon Jan 23 2006 Paul Howarth - 1.73-1 - Update to 1.73 * Tue Jan 17 2006 Paul Howarth - 1.72-1 - Update to 1.72 - Remove execute permissions on example scripts to shut rpmlint up * Thu Jan 5 2006 Paul Howarth - 1.71-1 - Update to 1.71 - Remove unused macro perl_vendorarch - Remove buildroot unconditionally in %%clean and %%install - Manually replace use of macros __perl_package and __perl_version - Simplify distribution detection - Don't use macros in build-time command paths, hardcode them instead - Use search.cpan.org URLs * Mon Jul 4 2005 Paul Howarth - 1.67-2 - Rewrite spec file in (mainly) Fedora Extras style - Include full URL for source - Fix URL - Use MODULE_COMPAT dependency style and remove explicit perl dependency - Remove MANIFEST from %%doc - Include examples * Fri Apr 1 2005 Paul Howarth - 1.67-1 - Update to 1.67 * Wed Feb 2 2005 Paul Howarth - 1.66-1 - Update to 1.66 * Mon Oct 25 2004 Paul Howarth - 1.64-1 - Update to 1.64 - General tidy-up of spec file * Thu Apr 15 2004 Paul Howarth - 1.62-1 - Update to 1.62 - Added explicit perl dependency to ensure that an RPM built on a system with an updated version of perl (and hence having files installed in a place that a non-updated system won't find them) will not install on the non-updated system; in such cases, just rebuild from the source RPM - Changed distribution-identifying macros for greater portability * Mon Feb 16 2004 Paul Howarth - 1.60-2 - Unified spec file for Red Hat and Fedora Core - Added requirement for perl-TimeDate * Fri Dec 12 2003 Paul Howarth - 1.60-1.fc1 - More macros - Expanded description - Added Fedora Core version into RPM release ID * Tue Nov 25 2003 Paul Howarth - 1.60-1 - Update to 1.60 * Mon Nov 24 2003 Paul Howarth - 1.50-2 - Build for Fedora Core 1 * Tue Oct 15 2002 Paul Howarth - 1.50-1 - Upgrade to 1.50 - Build for RHL 8.0 * Sun Aug 26 2001 Ramiro Morales - Build on RHL 6.2 - Buildarch noarch - Include docs - s/Copyright/License/ - {Build,}Requires perl-libnet * Sun Aug 26 2001 root - Spec file was autogenerated