- 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
This commit is contained in:
Matej Cepl 2025-01-08 13:42:17 +00:00 committed by Git OBS Bridge
parent c7bbc178aa
commit 3611687f14
2 changed files with 22 additions and 4 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 8 13:41:36 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Move binary back to %{_bindir} and establish use of
libalternatives.
-------------------------------------------------------------------
Sun Dec 29 17:09:33 UTC 2024 - Matej Cepl <mcepl@cepl.eu>

18
rc.spec
View File

@ -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 <<EOF
binary=%{_bindir}/%{name}-shell
EOF
%check
make check
%files
/bin/%{name}
%{_bindir}/%{name}*
%license COPYING
%doc README.md
%{_mandir}/man1/rc.1%{?ext_man}
%{_mandir}/man1/%{name}.1%{?ext_man}
%dir %{_datadir}/libalternatives/%{name}
%{_datadir}/libalternatives/%{name}/5.conf
%changelog