From 8d99a033d9a3f252035721fe8902002de1aa2c65f573209dbeaab17a1926b742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 22 Jan 2021 09:15:09 +0000 Subject: [PATCH] Accepting request 865872 from home:mcalabkova:branches:devel:languages:python - Ship example conf for each flavor - Handle binary with update-alternatives OBS-URL: https://build.opensuse.org/request/show/865872 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-haproxyctl?expand=0&rev=3 --- python-haproxyctl.changes | 6 ++++++ python-haproxyctl.spec | 17 ++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/python-haproxyctl.changes b/python-haproxyctl.changes index ebdf8e9..7e318c9 100644 --- a/python-haproxyctl.changes +++ b/python-haproxyctl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 22 09:07:29 UTC 2021 - Markéta Machová + +- Ship example conf for each flavor +- Handle binary with update-alternatives + ------------------------------------------------------------------- Mon Jul 22 11:17:53 UTC 2019 - Alberto Planas Dominguez diff --git a/python-haproxyctl.spec b/python-haproxyctl.spec index e73992b..fcc64db 100644 --- a/python-haproxyctl.spec +++ b/python-haproxyctl.spec @@ -52,20 +52,27 @@ cp %{SOURCE1} . %install %python_install +%python_clone -a %{buildroot}%{_bindir}/haproxyctl %python_expand %fdupes %{buildroot}%{$python_sitelib} -mkdir -p %{buildroot}%{_datadir}/%{name}/ -cp -a conf %{buildroot}%{_datadir}/%{name}/ +%{python_expand mkdir -p %{buildroot}%{_datadir}/$python-haproxyctl/ +cp -a conf %{buildroot}%{_datadir}/$python-haproxyctl/} %check %{python_expand $python -m unittest discover -s haproxy/tests} +%post +%python_install_alternative haproxyctl + +%postun +%python_uninstall_alternative haproxyctl + %files %{python_files} %doc README.md %license gpl-3.0.txt -%dir %{_datadir}/%{name} +%dir %{_datadir}/%{python_flavor}-haproxyctl %{python_sitelib}/* -%{_bindir}/haproxyctl -%{_datadir}/%{name}/* +%python_alternative %{_bindir}/haproxyctl +%{_datadir}/%{python_flavor}-haproxyctl/* %changelog