File imapsync.spec of Package imapsync
#
# spec file for package imapsync
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
Name: imapsync
Summary: IMAP synchronisation, sync, copy or migration tool
Version: 2.229
Release: 0
License: WTFPL
Group: Productivity/Networking/Email/Utilities
URL: https://github.com/imapsync/imapsync/
# PATCH-FIX-UPSTREAM - see https://github.com/imapsync/imapsync/pull/388
Patch1: switch_from_io_socket_inet6_-_to_-_io_socket_ip.patch
# PATCH-FIX-UPSTREAM - see https://github.com/imapsync/imapsync/pull/370
Patch2: Enhance_GMail_FAQ_keep_format_constant_in_the_file.patch
BuildArch: noarch
BuildRequires: sed
BuildRequires: perl
Requires: perl(CGI)
Requires: perl(CGI::Carp)
Requires: perl(Carp)
Requires: perl(Compress::Zlib)
Requires: perl(Crypt::OpenSSL::RSA)
Requires: perl(Cwd)
Requires: perl(Data::Dumper)
Requires: perl(Data::Uniqid)
Requires: perl(Digest::HMAC_MD5)
Requires: perl(Digest::HMAC_SHA1)
Requires: perl(Digest::MD5)
Requires: perl(Encode)
Requires: perl(Encode::Byte)
Requires: perl(Encode::IMAPUTF7)
Requires: perl(English)
Requires: perl(Errno)
Requires: perl(Fcntl)
Requires: perl(File::Basename)
Requires: perl(File::Copy::Recursive)
Requires: perl(File::Glob)
Requires: perl(File::Path)
Requires: perl(File::Spec)
Requires: perl(File::Tail)
Requires: perl(File::stat)
Requires: perl(Getopt::Long)
Requires: perl(HTML::Entities)
Requires: perl(IO::File)
Requires: perl(IO::Socket)
Requires: perl(IO::Socket::INET)
Requires: perl(IO::Socket::IP)
Requires: perl(IO::Socket::SSL)
Requires: perl(IO::Tee)
Requires: perl(IPC::Open3)
Requires: perl(JSON)
Requires: perl(JSON::WebToken)
Requires: perl(JSON::WebToken::Crypt::RSA)
Requires: perl(LWP)
Requires: perl(LWP::UserAgent)
Requires: perl(MIME::Base64)
Requires: perl(Mail::IMAPClient)
Requires: perl(Net::Ping)
Requires: perl(Net::SSLeay)
Requires: perl(POSIX)
Requires: perl(Pod::Usage)
Requires: perl(Readonly)
Requires: perl(Regexp::Common)
Requires: perl(Sys::Hostname)
Requires: perl(Sys::MemInfo)
Requires: perl(Term::ReadKey)
Requires: perl(Test::MockObject)
Requires: perl(Test::More)
Requires: perl(Text::ParseWords)
Requires: perl(Time::HiRes)
Requires: perl(Time::Local)
Requires: perl(URI::Escape)
Requires: perl(Unicode::String)
%description
The command imapsync is a tool allowing incremental and
recursive imap transfer from one mailbox to another.
By default all folders are transferred, recursively.
We sometimes need to transfer mailboxes from one imap server to
another. This is called migration.
imapsync is a good tool because it reduces the amount
of data transferred by not transferring a given message if it
is already on both sides. Same headers
and the transfer is done only once. All flags are
preserved, unread will stay unread, read will stay read,
deleted will stay deleted. You can stop the transfer at any
time and restart it later, imapsync works well with bad
connections.
You can decide to delete the messages from the source mailbox
after a successful transfer (it is a good feature when migrating).
In that case, use the --delete option. Option --delete implies
also option --expunge so all messages marked deleted on host1
will be really deleted.
(you can use --noexpunge to avoid this but I don't see any
real world scenario for the combinaison --delete --noexpunge).
You can also just synchronize a mailbox A from another mailbox B
in case you just want to keep a "live" copy of B in A (--delete2
may help)
imapsync is not adequate for maintaining two active imap accounts
in synchronization where the user plays independently on both sides.
Use offlineimap (written by John Goerzen) or mbsync (written by
Michael R. Elkins) for 2 ways synchronizations.
%prep
rm -rf %_builddir/%name-%version
mv %_sourcedir/%name-%version %_builddir/%name-%version
%setup -c -T -D
%autopatch -p1
%build
for i in FAQ.d/*.txt
do
tr -d '\r' < "$i" > $$
mv $$ "$i"
done
sed -i~ '1{s|^.*|#!%_bindir/perl|}' imapsync
diff -u "$_"~ "$_" && exit 1
pod2man imapsync > imapsync.1
%install
install -m 0755 -D imapsync %buildroot%_bindir/imapsync
install -m 0644 -D imapsync.1 %buildroot%_mandir/man1/imapsync.1
%files
%doc README
%doc FAQ.d/*.txt
%_bindir/imapsync
%_mandir/man1/imapsync.1*
%license LICENSE
%ChangeLog