This commit is contained in:
parent
a6af788f89
commit
9b5ebf6568
15
juliaup.spec
15
juliaup.spec
@ -130,22 +130,29 @@ cargo install --offline --release --no-default-features --no-track --root="%{bui
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} > 7 || 0%{?fedora}
|
||||
ln -sf %{_bindir}/julia %{buildroot}%{_bindir}/julialauncher
|
||||
ln -sfv %{_bindir}/julia %{buildroot}%{_bindir}/julialauncher
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}%{_bindir}/julia
|
||||
ln -sfv %{_sysconfdir/alternatives/julia %{buildroot}%{_bindir}/julia
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%{_bindir}/julia" julia "%{_bindir}/julialauncher" $(printf %{latest_julia_version} | sed 's/\.//g')
|
||||
"%{_bindir}/julia" julia "%{_bindir}/julialauncher" $(echo %{latest_julia_version} | sed 's/\.//g')
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%if 0%{?suse_version}
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%{_sbindir}/update-alternatives" --remove julia "%{_bindir}/julialauncher";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?suse_version}
|
||||
if [ ! -f %{_bindir}/julia ] ; then
|
||||
"%{_sbindir}/update-alternatives" --remove julia "%{_bindir}/julialauncher"
|
||||
fi
|
||||
@ -162,4 +169,4 @@ fi
|
||||
%{_bindir}/juliaup
|
||||
%{_bindir}/julia
|
||||
|
||||
%changelog
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user