Accepting request 923282 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/923282 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rsa?expand=0&rev=40
This commit is contained in:
parent
ff9f1ad467
commit
51d2b31f45
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 23 14:46:41 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 2 00:30:30 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Tue Mar 2 00:30:30 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-rsa
|
Name: python-rsa
|
||||||
@ -28,11 +34,16 @@ URL: https://stuvel.eu/rsa
|
|||||||
Source: https://files.pythonhosted.org/packages/source/r/rsa/rsa-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/rsa/rsa-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
Requires: python-pyasn1 >= 0.1.3
|
Requires: python-pyasn1 >= 0.1.3
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(pre): coreutils
|
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
|
%endif
|
||||||
|
Requires(pre): coreutils
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module pyasn1 >= 0.1.3}
|
BuildRequires: %{python_module pyasn1 >= 0.1.3}
|
||||||
@ -64,6 +75,10 @@ export LC_ALL=en_US.utf8
|
|||||||
%python_clone -a %{buildroot}%{_bindir}/pyrsa-sign
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-sign
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pyrsa-verify
|
%python_clone -a %{buildroot}%{_bindir}/pyrsa-verify
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative pyrsa-priv2pub
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{python_install_alternative pyrsa-priv2pub pyrsa-decrypt pyrsa-encrypt pyrsa-keygen pyrsa-sign pyrsa-verify}
|
%{python_install_alternative pyrsa-priv2pub pyrsa-decrypt pyrsa-encrypt pyrsa-keygen pyrsa-sign pyrsa-verify}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user