2012-05-19 20:51:15 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-rsa
|
|
|
|
#
|
2017-05-17 17:15:23 +02:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-05-19 20:51:15 +02:00
|
|
|
#
|
|
|
|
# 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.
|
2012-11-23 12:19:49 +01:00
|
|
|
|
2012-05-19 20:51:15 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-11-23 12:19:49 +01:00
|
|
|
|
2017-05-17 17:15:23 +02:00
|
|
|
%bcond_without tests
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2012-05-19 20:51:15 +02:00
|
|
|
Name: python-rsa
|
2017-05-17 17:15:23 +02:00
|
|
|
Version: 3.4.2
|
2012-05-19 20:51:15 +02:00
|
|
|
Release: 0
|
|
|
|
Url: http://stuvel.eu/rsa
|
|
|
|
Summary: Pure-Python RSA Implementation
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2017-05-17 17:15:23 +02:00
|
|
|
Source: http://files.pythonhosted.org/packages/source/r/rsa/rsa-%{version}.tar.gz
|
2012-05-19 20:51:15 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-05-17 17:15:23 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: %{python_module pyasn1 >= 0.1.3}
|
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: %{python_module nose}
|
2012-05-19 20:51:15 +02:00
|
|
|
%endif
|
2017-05-17 17:15:23 +02:00
|
|
|
Requires: python-pyasn1 >= 0.1.3
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires(pre): coreutils
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
|
|
|
%python_subpackages
|
2012-05-19 20:51:15 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Python-RSA is a pure-Python RSA implementation. It supports encryption and
|
|
|
|
decryption, signing and verifying signatures, and key generation according to
|
|
|
|
PKCS#1 version 1.5.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n rsa-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_build
|
2012-05-19 20:51:15 +02:00
|
|
|
|
|
|
|
%install
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2015-05-16 15:22:48 +02:00
|
|
|
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-priv2pub
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-decrypt
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-encrypt
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-encrypt-bigfile
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-keygen
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-sign
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-verify
|
2013-10-12 01:58:18 +02:00
|
|
|
|
|
|
|
%post
|
2017-05-17 17:15:23 +02:00
|
|
|
%{python_install_alternative pyrsa-priv2pub pyrsa-decrypt pyrsa-decrypt-bigfile pyrsa-encrypt pyrsa-encrypt-bigfile pyrsa-keygen pyrsa-sign pyrsa-verify}
|
2013-10-12 01:58:18 +02:00
|
|
|
|
|
|
|
%preun
|
2017-05-17 17:15:23 +02:00
|
|
|
%python_uninstall_alternative pyrsa-priv2pub
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
%python_exec setup.py test
|
|
|
|
%endif
|
2013-10-12 01:58:18 +02:00
|
|
|
|
2017-05-17 17:15:23 +02:00
|
|
|
%files %{python_files}
|
2012-05-19 20:51:15 +02:00
|
|
|
%defattr(-,root,root,-)
|
2017-05-17 17:15:23 +02:00
|
|
|
%doc CHANGELOG.txt LICENSE README.md
|
|
|
|
%python_alternative %{_bindir}/pyrsa-decrypt
|
|
|
|
%python_alternative %{_bindir}/pyrsa-decrypt-bigfile
|
|
|
|
%python_alternative %{_bindir}/pyrsa-encrypt
|
|
|
|
%python_alternative %{_bindir}/pyrsa-encrypt-bigfile
|
|
|
|
%python_alternative %{_bindir}/pyrsa-keygen
|
|
|
|
%python_alternative %{_bindir}/pyrsa-priv2pub
|
|
|
|
%python_alternative %{_bindir}/pyrsa-sign
|
|
|
|
%python_alternative %{_bindir}/pyrsa-verify
|
2012-05-19 20:51:15 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|