%global git 0 %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif Summary: Utility to synchronize IMAP mailboxes with local maildir folders Name: isync Version: 1.5.1 Release: %mkrel 1.2 License: GPL-2.0+ Group: Applications/Internet Source: https://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz URL: http://isync.sf.net/ BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: gcc BuildRequires: make BuildRequires: perl >= 5.14 BuildRequires: pkgconfig(libsasl2) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(zlib) %if %{git} # Extra things needed when building from Git instead of the release tarball. BuildRequires: automake, autoconf BuildRequires: git BuildRequires: perl(DateTime) BuildRequires: unzip %endif # OAuth2 support # The KDE plugin should probably be preferred on distros that have it; # otherwise the older, seemingly unmaintained Cyrus plugin can be used. Recommends: (sasl2-kdexoauth2 or sasl2-plugin-kdexoauth2 or cyrus-sasl-xoauth2) %description isync is a command line utility which synchronizes mailboxes; currently Maildir and IMAP4 mailboxes are supported. New messages, message deletions and flag changes can be propagated both ways. It is useful for working in disconnected mode, such as on a laptop or with a non-permanent internet collection (dIMAP), but also for mirroring mailboxes between servers. # From OpenSUSE: Synchronization is based on unique message identifiers (UIDs), so no identification conflicts can occur (as opposed to some other mail synchronizers). Synchronization state is kept in one local text file per mailbox pair; multiple replicas of a mailbox can be maintained. %prep %setup -q %build %configure --docdir=%{_docdir}/%{name} %make_build %install rm -rf %{buildroot} %make_install rm -rf %{buildroot}%{_docdir}/%{name} # Alias mbsync as isync. Historically, isync was the original version (0.x) # that read from ~/.isyncrc; mbsync was a later incompatible version (1.x) that # read from ~/.mbsyncrc and had a wrapper to read from ~/.isyncrc but mostly as # a way to migrate to mbsync. Now, the XDG-compliant location of the config # file is $XDG_CONFIG_HOME/isyncrc (though, ~/.mbsyncrc still works) and isync # no longer exists (removed in 1.4.0), so there's no reason not to create a # symlink, considering that it is easy to type `isync` rather than `mbsync` by # mistake. ln -sr %{buildroot}%{_bindir}/mbsync %{buildroot}%{_bindir}/isync for file in %{buildroot}%{_mandir}/man1/mbsync.1*; do dir=$(dirname $file) filename=$(basename $file) ln -sr $file $dir/${filename/mbsync/isync} done %clean rm -rf %{buildroot} %files %doc AUTHORS COPYING NEWS README TODO ChangeLog src/mbsyncrc.sample %{_bindir}/* %{_mandir}/man1/*