File offlineimap.spec of Package offlineimap
#
# spec file for package offlineimap
#
# Copyright (c) 2016 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/
#
%{!?_userunitdir:%define _userunitdir /usr/lib/systemd/user}
Name: offlineimap
Version: 7.0.8
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#/%{name}-%{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-six
BuildRequires: python-sphinx
BuildRequires: systemd-rpm-macros
Requires: ca-certificates
Requires: python
Requires: python-curses
Suggests: %{name}-htmldoc
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.
%package htmldoc
Summary: Html documentation for %{name}
Group: Documentation/HTML
%description htmldoc
Separated documentation from %{name} package
%prep
%setup -q
sed -i '/^#!\/usr\/bin\/env/d' offlineimap/bundled_imaplib2.py
%build
python setup.py build
make %{?_smp_mflags} V=1 -C 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
install -D -m 444 contrib/systemd/mail.target %{buildroot}%{_userunitdir}/mail.target
install -D -m 444 contrib/systemd/%{name}.service %{buildroot}%{_userunitdir}/%{name}.service
install -D -m 444 contrib/systemd/%{name}.timer %{buildroot}%{_userunitdir}/%{name}.timer
install -D -m 444 contrib/systemd/%{name}@.service %{buildroot}%{_userunitdir}/%{name}@.service
install -D -m 444 contrib/systemd/%{name}@.timer %{buildroot}%{_userunitdir}/%{name}@.timer
%files -f INSTALLED_FILES
%defattr(-,root,root)
%doc COPYING Changelog.md README.md examples
%{_mandir}/man1/%{name}.1*
%{_mandir}/man7/offlineimapui.7*
%dir %{_userunitdir}
%{_userunitdir}/mail.target
%{_userunitdir}/%{name}.service
%{_userunitdir}/%{name}.timer
%{_userunitdir}/%{name}@.service
%{_userunitdir}/%{name}@.timer
%files htmldoc
%defattr(-,root,root)
%doc docs/html
%changelog