SHA256
1
0
forked from pool/juliaup

Accepting request 997566 from home:uncomfyhalomacro

fix some logic with build

OBS-URL: https://build.opensuse.org/request/show/997566
OBS-URL: https://build.opensuse.org/package/show/science/juliaup?expand=0&rev=42
This commit is contained in:
Soc Virnyl Estela 2022-08-17 13:02:41 +00:00 committed by Git OBS Bridge
parent 3dea9d3fa9
commit 6859529939

View File

@ -85,7 +85,9 @@ BuildRequires: cargo-packaging
Conflicts: julia
%provides_julia_versioned julia
Obsoletes: julia < %{oldest_supported_julia_version}
%if 0%{?suse_version}
PreReq: update-alternatives
%endif
%description
A cross-platform installer for the Julia programming language.
@ -118,6 +120,8 @@ cargo install --offline --no-track --root="%{buildroot}%{_prefix}" --path .
%{cargo_install}
%endif
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
%if 0%{?suse_version}
ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}/%{_bindir}/julia
%post
@ -134,8 +138,15 @@ if [ ! -f %{_bindir}/julia ] ; then
"%{_sbindir}/update-alternatives" --remove julia "%{_bindir}/julialauncher"
fi
%else
ln -sf %{_bindir}/julia %{buildroot}%{_bindir}/juliaup
%endif
%files
%if 0%{?suse_version}
%ghost %_sysconfdir/alternatives/julia
%endif
%license LICENSE
%doc README.md
%{_bindir}/juliainstaller