%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.1 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 %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). %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/*