diff --git a/python-pyftpdlib.changes b/python-pyftpdlib.changes index 6a210ee..842541a 100644 --- a/python-pyftpdlib.changes +++ b/python-pyftpdlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 19 14:26:32 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + ------------------------------------------------------------------- Thu Jul 10 08:53:50 UTC 2025 - Andreas Schwab diff --git a/python-pyftpdlib.spec b/python-pyftpdlib.spec index cdfd035..f5a661f 100644 --- a/python-pyftpdlib.spec +++ b/python-pyftpdlib.spec @@ -17,7 +17,11 @@ # +%if 0%{?suse_version} > 1500 %bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-pyftpdlib Version: 1.5.10 @@ -34,13 +38,18 @@ BuildRequires: %{python_module pysendfile} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} -BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: alts Requires: python-pyOpenSSL Recommends: python-pysendfile BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif %python_subpackages %description @@ -84,6 +93,12 @@ export TZ=GMT+1 $python -m pytest } +%post +%python_install_alternative ftpbench + +%postun +%python_uninstall_alternative ftpbench + %pre %python_libalternatives_reset_alternative ftpbench