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