# vim: set sw=4 ts=4 et nu: # # spec file for package perl-Mail-Box # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2012 Pascal Bleser # Copyright (c) 2010 chris@computersalat.de # Copyright (c) 2008 Richard Bos # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # Please submit bugfixes or comments via http://bugs.opensuse.org/ Name: perl-Mail-Box Version: 2.104 Release: 0 Summary: Perl Module for Mailbox Handling License: GPL-2.0+ or Artistic-1.0 Group: Development/Libraries/Perl Source: http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/Mail-Box-%{version}.tar.gz Patch1: perl-Mail-Box-fix_use_lib_in_scripts.patch Url: http://search.cpan.org/dist/Mail-Box BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} BuildRequires: make BuildRequires: perl-macros BuildRequires: perl(Date::Format) BuildRequires: perl(Date::Parse) BuildRequires: perl(Digest::HMAC_MD5) BuildRequires: perl(Encode) >= 2.26 BuildRequires: perl(Errno) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(File::Remove) >= 0.20 BuildRequires: perl(File::Spec) >= 0.7 BuildRequires: perl(IO::Scalar) BuildRequires: perl(MIME::Base64) BuildRequires: perl(MIME::Types) >= 1.004 BuildRequires: perl(Mail::Address) BuildRequires: perl(Mail::IMAPClient) BuildRequires: perl(Object::Realize::Later) >= 0.14 BuildRequires: perl(Scalar::Util) >= 1.13 BuildRequires: perl(Sys::Hostname) BuildRequires: perl(TAP::Harness) >= 3.00 BuildRequires: perl(Test::More) >= 0.47 BuildRequires: perl(Test::Pod) >= 1.00 BuildRequires: perl(Time::Zone) BuildRequires: perl(URI) >= 1.23 BuildRequires: perl(User::Identity) >= 0.93 Requires: perl(Date::Format) Requires: perl(Date::Parse) Requires: perl(Digest::HMAC_MD5) Requires: perl(Encode) >= 2.26 Requires: perl(Errno) Requires: perl(File::Remove) >= 0.20 Requires: perl(File::Spec) >= 0.7 Requires: perl(IO::Scalar) Requires: perl(MIME::Base64) Requires: perl(MIME::Types) >= 1.004 Requires: perl(Mail::Address) Requires: perl(Object::Realize::Later) >= 0.14 Requires: perl(Scalar::Util) >= 1.13 Requires: perl(Sys::Hostname) Requires: perl(TAP::Harness) >= 3.00 Requires: perl(Time::Zone) Requires: perl(URI) >= 1.23 Requires: perl(User::Identity) >= 0.93 Recommends: perl(Mail::IMAPClient) %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif # only for testing: BuildRequires: perl(Email::Abstract) BuildRequires: perl(Email::Simple) BuildRequires: perl(HTML::FormatPS) BuildRequires: perl(HTML::FormatText) BuildRequires: perl(MIME::Entity) BuildRequires: perl(Text::Autoformat) %description A Mail::Box::Manager creates "Mail::Box" objects. But you already knew, because you started with the Mail::Box-Overview manual page. That page is obligatory reading, sorry! "Mail::Box" is the base class for accessing various types of mailboxes (folders) in a uniform manner. The various folder types vary on how they store their messages, but when some effort those differences could be hidden behind a general API. For example, some folders store many messages in one single file, where other store each message in a separate file withing the same directory. %package doc Summary: Perl Module for Mailbox Handling Group: Development/Libraries/Perl Requires: %{name} = %{version} %description doc Documentation for %{name}. %package -n lsmail Summary: List contents of Mailboxes Group: Productivity/Networking/Email/Utilities Requires: %{name} = %{version} Requires: perl(Getopt::Long) %description -n lsmail List the contents of one or more mailboxes. Specifying more than one name is only useful when you read in threads, in which case the messages of both folders are merged. %package -n mailbox2html Summary: Convert Mail Folders into an HTML Structure Group: Productivity/Networking/Email/Utilities Requires: %{name} = %{version} Requires: perl(File::Basename) Requires: perl(Getopt::Long) %description -n mailbox2html Convert various kinds of mail folders to HTML, permitting them to be read by a web browser. %package -n takemail Summary: Walk through Mailboxes and grep for something Group: Productivity/Networking/Email/Utilities Requires: %{name} = %{version} Requires: perl(Getopt::Long) %description -n takemail Dump mails applying to regular expressions either to stdout or into a newly created mailbox. %prep %setup -q -n "Mail-Box-%{version}" %patch1 %__sed -i '/^auto_install/d' Makefile.PL %build %__perl Makefile.PL PREFIX="%{_prefix}" %__make %{?_smp_flags} %install %perl_make_install %perl_process_packlist F="$PWD/files.lst" echo -n >"$F" D="$PWD/docfiles.lst" echo -n >"$D" p="Mail" pushd "%{buildroot}%{perl_vendorlib}" find "$p/" -type f -name '*.pod' | while read pod; do echo "%doc %{perl_vendorlib}/$pod" >>"$D" done find "$p/" -type f -name '*.pm' | while read pm; do echo "%{perl_vendorlib}/$pm" >>"$F" done find "$p/" -mindepth 1 -type d | while read d; do echo "%dir %{perl_vendorlib}/$d" >>"$F" done popd %__install -d "%{buildroot}%{_bindir}" %__install -m0755 scripts/* "%{buildroot}%{_bindir}/" %__install -d "%{buildroot}%{_mandir}/man1" for f in scripts/*; do pod2man --utf8 "$f" > "%{buildroot}%{_mandir}/man1/${f##*/}.1" done %check %__make test %clean %{?buildroot:%__rm -rf "%{buildroot}"} %files -f files.lst %defattr(-,root,root) %doc README.FAQ README.todo LICENSE README %dir %{perl_vendorlib}/Mail %files -n lsmail %defattr(-,root,root) %{_bindir}/lsmail %doc %{_mandir}/man1/lsmail.1* %files -n mailbox2html %defattr(-,root,root) %{_bindir}/mailbox2html %doc %{_mandir}/man1/mailbox2html.1* %files -n takemail %defattr(-,root,root) %{_bindir}/takemail %doc %{_mandir}/man1/takemail.1* %files doc -f docfiles.lst %defattr(-,root,root) %doc %{perl_vendorlib}/Mail/Box.pod %doc %{perl_man3dir}/Mail::*.%{perl_man3ext}* %changelog