diff --git a/python-epubmerge.changes b/python-epubmerge.changes index f4083d9..e17eced 100644 --- a/python-epubmerge.changes +++ b/python-epubmerge.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 21 09:20:06 UTC 2020 - Tomáš Chvátal + +- Use update-alternatives for the binary + ------------------------------------------------------------------- Mon Apr 20 16:57:11 UTC 2020 - Matej Cepl diff --git a/python-epubmerge.spec b/python-epubmerge.spec index ef9862c..25713ac 100644 --- a/python-epubmerge.spec +++ b/python-epubmerge.spec @@ -24,12 +24,14 @@ Version: 2.9.0 Release: 0 Summary: EpubMerge Calibre Plugin License: GPL-3.0-only -Group: Development/Languages/Python URL: https://github.com/JimmXinu/EpubMerge Source: https://github.com/JimmXinu/EpubMerge/archive/v%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -64,11 +66,18 @@ merged books comments. These options are stored by Library. %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_clone -a %{buildroot}%{_bindir}/%{upnamedown} + +%post +%python_install_alternative %{upnamedown} + +%postun +%python_uninstall_alternative %{upnamedown} %files %{python_files} %license LICENSE %doc README.md -%{_bindir}/%{upnamedown} +%python_alternative %{_bindir}/%{upnamedown} %{python_sitelib}/%{upname}* %changelog