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:
parent
4e4479b081
commit
70d0908717
@ -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>
|
||||
|
||||
- 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
|
||||
|
22
juliaup.spec
22
juliaup.spec
@ -76,8 +76,9 @@ Source0: %{name}-%{version}.tar.gz
|
||||
Source1: vendor.tar.gz
|
||||
Source2: cargo_config
|
||||
BuildRequires: cargo-packaging
|
||||
Obsoletes: julia < %{oldest_supported_julia_version}
|
||||
Conflicts: julia
|
||||
%provides_julia_versioned julia
|
||||
PreReq: update-alternatives
|
||||
|
||||
%description
|
||||
A cross-platform installer for the Julia programming language.
|
||||
@ -97,7 +98,22 @@ cp %{SOURCE2} .cargo/config
|
||||
|
||||
%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
|
||||
%license LICENSE
|
||||
@ -105,6 +121,6 @@ ln -sf %{_bindir}/julialauncher %{buildroot}%{_bindir}/julia
|
||||
%{_bindir}/juliainstaller
|
||||
%{_bindir}/julialauncher
|
||||
%{_bindir}/juliaup
|
||||
%{_bindir}/julia
|
||||
%ghost %_sysconfdir/alternatives/julia
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user