forked from pool/python-vdirsyncer
- Set up update-alternatives for systemd unit files.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vdirsyncer?expand=0&rev=30
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 12 19:57:06 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Set up update-alternatives for systemd unit files.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Feb 28 22:24:56 UTC 2021 - Hans-Peter Jansen <hpj@urpla.net>
|
Sun Feb 28 22:24:56 UTC 2021 - Hans-Peter Jansen <hpj@urpla.net>
|
||||||
|
|
||||||
|
@@ -84,11 +84,15 @@ rm -rf vdirsyncer.egg-info
|
|||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%python_clone -a %{buildroot}%{_bindir}/vdirsyncer
|
%python_clone -a %{buildroot}%{_bindir}/vdirsyncer
|
||||||
%python_expand %fdupes %{buildroot}/%{$python_sitelib}
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_userunitdir}
|
mkdir -p %{buildroot}%{_userunitdir}
|
||||||
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_userunitdir}/vdirsyncer.service
|
%{python_expand \
|
||||||
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_userunitdir}/vdirsyncer.timer
|
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_userunitdir}/vdirsyncer-%{$python_bin_suffix}.service
|
||||||
|
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_userunitdir}/vdirsyncer-%{$python_bin_suffix}.timer
|
||||||
|
%fdupes %{buildroot}/%{$python_sitelib}
|
||||||
|
}
|
||||||
|
%prepare_alternative -t %{_userunitdir}/vdirsyncer.service vdirsyncer.service
|
||||||
|
%prepare_alternative -t %{_userunitdir}/vdirsyncer.timer vdirsyncer.timer
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export DETERMINISTIC_TESTS=true
|
export DETERMINISTIC_TESTS=true
|
||||||
@@ -96,7 +100,10 @@ export DETERMINISTIC_TESTS=true
|
|||||||
%pytest -k 'not test_legacy_status and not test_open_graphical_browser and not test_verbosity'
|
%pytest -k 'not test_legacy_status and not test_open_graphical_browser and not test_verbosity'
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative vdirsyncer
|
update-alternatives --install %{_bindir}/vdirsyncer vdirsyncer %{_bindir}/vdirsyncer-%{python_bin_suffix} %{python_version_nodots} \
|
||||||
|
--slave %{_userunitdir}/vdirsyncer.service vdirsyncer.service %{_userunitdir}/vdirsyncer-%{python_bin_suffix}.service \
|
||||||
|
--slave %{_userunitdir}/vdirsyncer.timer vdirsyncer.timer %{_userunitdir}/vdirsyncer-%{python_bin_suffix}.timer
|
||||||
|
update-alternatives --auto vdirsyncer
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative vdirsyncer
|
%python_uninstall_alternative vdirsyncer
|
||||||
@@ -105,8 +112,11 @@ export DETERMINISTIC_TESTS=true
|
|||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python_alternative %{_bindir}/vdirsyncer
|
%python_alternative %{_bindir}/vdirsyncer
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/vdirsyncer*
|
||||||
|
%{_userunitdir}/vdirsyncer-%{python_bin_suffix}.service
|
||||||
|
%{_userunitdir}/vdirsyncer-%{python_bin_suffix}.timer
|
||||||
%{_userunitdir}/vdirsyncer.service
|
%{_userunitdir}/vdirsyncer.service
|
||||||
%{_userunitdir}/vdirsyncer.timer
|
%{_userunitdir}/vdirsyncer.timer
|
||||||
|
%ghost %{_sysconfdir}/alternatives/vdirsyncer*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user