- 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> Sun Dec 29 17:09:33 UTC 2024 - Matej Cepl <mcepl@cepl.eu>

20
rc.spec
View File

@ -33,6 +33,8 @@ BuildRequires: scdoc
BuildRequires: zstd BuildRequires: zstd
# For testing # For testing
BuildRequires: bc BuildRequires: bc
# End testing
Requires: alts
License: GPL-3.0-only License: GPL-3.0-only
%description %description
@ -51,15 +53,25 @@ https://en.wikipedia.org/wiki/Rc.
%install %install
# Shells should go to /bin # 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 %check
make check make check
%files %files
/bin/%{name} %{_bindir}/%{name}*
%license COPYING %license COPYING
%doc README.md %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 %changelog