From 3611687f1453591ff795a8166ba96e6dd6bb0c7249e9d6d2ed66dd5f3662e14c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 8 Jan 2025 13:42:17 +0000 Subject: [PATCH] - Move binary back to %{_bindir} and establish use of libalternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:hare/rc?expand=0&rev=5 --- rc.changes | 6 ++++++ rc.spec | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/rc.changes b/rc.changes index dc65176..76087d1 100644 --- a/rc.changes +++ b/rc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 8 13:41:36 UTC 2025 - Matej Cepl + +- Move binary back to %{_bindir} and establish use of + libalternatives. + ------------------------------------------------------------------- Sun Dec 29 17:09:33 UTC 2024 - Matej Cepl diff --git a/rc.spec b/rc.spec index 08c627d..18c8de0 100644 --- a/rc.spec +++ b/rc.spec @@ -33,6 +33,8 @@ BuildRequires: scdoc BuildRequires: zstd # For testing BuildRequires: bc +# End testing +Requires: alts License: GPL-3.0-only %description @@ -51,15 +53,25 @@ https://en.wikipedia.org/wiki/Rc. %install # Shells should go to /bin -%make_install BINDIR="/bin" PREFIX="/" MANDIR="%{_mandir}" +%make_install PREFIX="%{_prefix}" +mv %{buildroot}%{_bindir}/%{name}{,-shell} + +# libalternatives +ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/%{name} +mkdir -p %{buildroot}%{_datadir}/libalternatives/%{name} +cat > %{buildroot}%{_datadir}/libalternatives/%{name}/5.conf <