From 9b5ebf6568147fbe46e14e5ab4d5bf30772cfad2dd50dafc64c898c867886ce6 Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Thu, 24 Nov 2022 19:23:01 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/science/juliaup?expand=0&rev=59 --- juliaup.spec | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/juliaup.spec b/juliaup.spec index 2761e5f..233654d 100644 --- a/juliaup.spec +++ b/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 \ No newline at end of file +%changelog