forked from pool/python-haproxyctl
Compare commits
5 Commits
Author | SHA256 | Date | |
---|---|---|---|
90ace261ad | |||
c14994a0dd | |||
172e51430f | |||
43f8856719 | |||
bd3ce8a486 |
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 4 13:16:23 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
|
||||||
|
|
||||||
|
- Add missing requirement on update-alternatives
|
||||||
|
- Migrate to libalternatives on Tumbleweed and Leap 16
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 27 15:22:32 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to pip-based build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 13 07:19:29 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
Thu Oct 13 07:19:29 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-haproxyctl
|
# spec file for package python-haproxyctl
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,8 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define skip_python2 1
|
%if 0%{?suse_version} > 1500
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
Name: python-haproxyctl
|
Name: python-haproxyctl
|
||||||
Version: 0.5
|
Version: 0.5
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -27,10 +30,19 @@ Group: Development/Languages/Python
|
|||||||
URL: https://github.com/neurogeek/haproxyctl
|
URL: https://github.com/neurogeek/haproxyctl
|
||||||
Source: https://github.com/neurogeek/haproxyctl/archive/v%{version}.tar.gz#/haproxyctl-%{version}.tar.gz
|
Source: https://github.com/neurogeek/haproxyctl/archive/v%{version}.tar.gz#/haproxyctl-%{version}.tar.gz
|
||||||
Source1: gpl-3.0.txt
|
Source1: gpl-3.0.txt
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
Requires: haproxy
|
Requires: haproxy
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -42,16 +54,16 @@ info from the running instance and list available servers, together
|
|||||||
with their status.
|
with their status.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n haproxyctl-%{version}
|
%autosetup -p1 -n haproxyctl-%{version}
|
||||||
# The package is under GPL-3.0, as expressed in setup.py, but the
|
# The package is under GPL-3.0, as expressed in setup.py, but the
|
||||||
# license file is not included in the source code.
|
# license file is not included in the source code.
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/haproxyctl
|
%python_clone -a %{buildroot}%{_bindir}/haproxyctl
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
@@ -61,17 +73,25 @@ cp -a conf %{buildroot}%{_datadir}/$python-haproxyctl/}
|
|||||||
%check
|
%check
|
||||||
%{python_expand $python -m unittest discover -s haproxy/tests}
|
%{python_expand $python -m unittest discover -s haproxy/tests}
|
||||||
|
|
||||||
|
%if %{with libalternatives}
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative <package-name>
|
||||||
|
%else
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative haproxyctl
|
%python_install_alternative haproxyctl
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative haproxyctl
|
%python_uninstall_alternative haproxyctl
|
||||||
|
%endif
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license gpl-3.0.txt
|
%license gpl-3.0.txt
|
||||||
%dir %{_datadir}/%{python_flavor}-haproxyctl
|
%dir %{_datadir}/%{python_flavor}-haproxyctl
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/haproxy
|
||||||
|
%{python_sitelib}/haproxyctl-%{version}*-info
|
||||||
%python_alternative %{_bindir}/haproxyctl
|
%python_alternative %{_bindir}/haproxyctl
|
||||||
%{_datadir}/%{python_flavor}-haproxyctl/*
|
%{_datadir}/%{python_flavor}-haproxyctl/*
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user