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