SHA256
1
0
forked from pool/juliaup

- provide versioned julia

- conflicts other julia so use update-alternatives

OBS-URL: https://build.opensuse.org/package/show/science/juliaup?expand=0&rev=27
This commit is contained in:
Soc Virnyl Estela 2022-07-21 11:25:08 +00:00 committed by Git OBS Bridge
parent 4e4479b081
commit 70d0908717
2 changed files with 21 additions and 9 deletions

View File

@ -1,13 +1,9 @@
-------------------------------------------------------------------
Thu Jul 21 06:19:39 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
- disabled alternatives. need to modify the actual julia
package and contact package maintainer
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 21 05:53:04 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com> Thu Jul 21 05:53:04 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
- use alternatives instead - use alternatives instead
- provide versioned julia
- conflicts other julia so use update-alternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 19 15:31:47 UTC 2022 - socvirnyl.estela@gmail.com Tue Jul 19 15:31:47 UTC 2022 - socvirnyl.estela@gmail.com

View File

@ -76,8 +76,9 @@ Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz Source1: vendor.tar.gz
Source2: cargo_config Source2: cargo_config
BuildRequires: cargo-packaging BuildRequires: cargo-packaging
Obsoletes: julia < %{oldest_supported_julia_version} Conflicts: julia
%provides_julia_versioned julia %provides_julia_versioned julia
PreReq: update-alternatives
%description %description
A cross-platform installer for the Julia programming language. A cross-platform installer for the Julia programming language.
@ -97,7 +98,22 @@ cp %{SOURCE2} .cargo/config
%install %install
%{cargo_install} %{cargo_install}
ln -sf %{_bindir}/julialauncher %{buildroot}%{_bindir}/julia mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}%{_bindir}/julia
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/julia" julia "%_bindir/julialauncher" 1
%pre
if [ "$1" -gt 0 ] && [ -f %{_sbindir/update-alternatives} ] ; then
"%_sbindir/update-alternatives" --remove julia "%_bindir/julialauncher";
fi;
%postun
if [ ! -f %{_bindir}/julia ] ; then
"%{_sbindir}/update-alternatives" --remove julia "%{_bindir}/julialauncher"
fi
%files %files
%license LICENSE %license LICENSE
@ -105,6 +121,6 @@ ln -sf %{_bindir}/julialauncher %{buildroot}%{_bindir}/julia
%{_bindir}/juliainstaller %{_bindir}/juliainstaller
%{_bindir}/julialauncher %{_bindir}/julialauncher
%{_bindir}/juliaup %{_bindir}/juliaup
%{_bindir}/julia %ghost %_sysconfdir/alternatives/julia
%changelog %changelog