forked from pool/python-pysmi
Accepting request 922618 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/922618 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysmi?expand=0&rev=21
This commit is contained in:
parent
b44a00205c
commit
8c4dea129f
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 30 20:13:20 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||
|
||||
- Use libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 14 14:17:08 UTC 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pysmi
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pysmi
|
||||
Version: 0.3.4
|
||||
@ -26,10 +32,14 @@ URL: http://pysmi.sourceforge.net/
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pysmi/pysmi-%{version}.tar.gz
|
||||
BuildRequires: %{python_module ply}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python-rpm-macros >= 20210929
|
||||
Requires: python-ply
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@ -53,6 +63,10 @@ mv %{buildroot}%{_bindir}/mibcopy.py %{buildroot}%{_bindir}/mibcopy
|
||||
%python_clone -a %{buildroot}%{_bindir}/mibcopy
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%pre
|
||||
# If libalternatives is used: Removing old update-alternatives entries.
|
||||
%python_libalternatives_reset_alternative mibdump
|
||||
|
||||
%post
|
||||
%python_install_alternative mibdump
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user