File python-Radicale.spec of Package python-Radicale

# spec file for package python-Radicale
# Copyright (c) 2018 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

%define skip_python2 1

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-Radicale
Version:        2.1.10
Release:        0
Summary:        A Simple Calendar and Contact Server
License:        GPL-3.0-only
Group:          Development/Languages/Python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module vobject}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-vobject
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch:      noarch


The Radicale Project is a complete CalDAV (calendar) and CardDAV (contact)
server solution.

Calendars and address books are available for both local and remote access,
possibly limited through authentication policies. They can be viewed and
edited by calendar and contact clients on mobile phones or computers.

%setup -q -n  Radicale-%{version}
chmod -x radicale.fcgi radicale.wsgi

# add file encoding
sed '2i# -*- coding: utf-8 -*-' >
touch -r


%fdupes %{buildroot}%{_prefix}

%python_clone -a %{buildroot}%{_bindir}/radicale

%python_install_alternative radicale

%python_uninstall_alternative radicale

%files %{python_files}
%doc config COPYING logging radicale.fcgi radicale.wsgi
%python_alternative %{_bindir}/radicale