File offlineimap.spec of Package offlineimap

#
# spec file for package offlineimap
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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:           offlineimap
Version:        6.5.7
Release:        0
Summary:        Powerful IMAP/Maildir Synchronization Tool
License:        GPL-2.0+
Group:          Productivity/Networking/Email/Utilities
Url:            http://offlineimap.org/
Source0:        https://github.com/OfflineIMAP/offlineimap/archive/v%{version}.tar.gz
Source100:      offlineimap-rpmlintrc
BuildRequires:  asciidoc
BuildRequires:  docutils
BuildRequires:  libxml2-tools
BuildRequires:  libxslt-tools
BuildRequires:  python
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  python-sphinx
Requires:       ca-certificates
Requires:       python
Requires:       python-curses
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
OfflineIMAP is a tool to synchronize IMAP and Maildir mailboxes which is very
fast due to its multithreaded synchronization algorithm.  It offers several
user interfaces and is generally very configurable providing a great number of
settings for controlling its behavior, tuning performance.  Specifically, there
are several sophisticated and flexible mechanisms for determining the list of
maiilboxes to synchronize.  Furthermore, it supports internal or external
automation, SSL and PREAUTH tunnels, offline (or "unplugged") reading, and a
variety of esoteric IMAP features for compatibility with the widest variety of
IMAP servers.  OfflineIMAP is designed for safety in terms of avoiding the loss
of mails under any circumstances.

%prep
%setup -q
sed -i '/^#!\/usr\/bin\/env/d' offlineimap/imaplib2.py

%build
python setup.py build
make %{?_smp_mflags} -C docs docs

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} \
    --record-rpm=INSTALLED_FILES

rm -rf docs/html/_sources \
    docs/html/.buildinfo \
    objects.inv

mkdir examples
mv offlineimap.conf* examples

install -D -m 644 docs/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
install -D -m 644 docs/%{name}ui.7 %{buildroot}%{_mandir}/man7/%{name}ui.7

%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc COPYING Changelog.md README.md examples docs/html
%{_mandir}/man1/offlineimap.1*
%{_mandir}/man7/offlineimapui.7*

%changelog
openSUSE Build Service is sponsored by