- Remove libalternatives, the proper solution for unrelated

packages providing the same name binary is to Conflict: or
  rename.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:hare/rc?expand=0&rev=7
This commit is contained in:
Matej Cepl 2025-01-15 11:40:20 +00:00 committed by Git OBS Bridge
parent 1fdb2fd120
commit df0b837f86
2 changed files with 9 additions and 11 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jan 15 11:39:48 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Remove libalternatives, the proper solution for unrelated
packages providing the same name binary is to Conflict: or
rename.
-------------------------------------------------------------------
Wed Jan 8 13:41:36 UTC 2025 - Matej Cepl <mcepl@cepl.eu>

13
rc.spec
View File

@ -31,11 +31,11 @@ BuildRequires: hare
BuildRequires: madeline
BuildRequires: scdoc
BuildRequires: zstd
BuildRequires: alts
# For testing
BuildRequires: bc
# End testing
Requires: alts
# Because it conflicts with /usr/bin/rc
Conflicts: rtags
License: GPL-3.0-only
%description
@ -55,14 +55,7 @@ https://en.wikipedia.org/wiki/Rc.
%install
# Shells should go to /bin
%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 <<EOF
binary=%{_bindir}/%{name}-shell
EOF
%check
make check
@ -72,7 +65,5 @@ make check
%license COPYING
%doc README.md
%{_mandir}/man1/%{name}.1%{?ext_man}
%dir %{_datadir}/libalternatives/%{name}
%{_datadir}/libalternatives/%{name}/5.conf
%changelog