forked from pool/juliaup
This commit is contained in:
parent
9bc45b5da9
commit
859ecec951
23
juliaup.spec
23
juliaup.spec
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
%global oldest_supported_julia_version 0.7.0
|
%global oldest_supported_julia_version 0.7.0
|
||||||
%global latest_julia_version 1.8.3
|
%global latest_julia_version 1.8.3
|
||||||
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now -C debuginfo=2
|
|
||||||
|
|
||||||
# Based on the latest stable release in the https://julialang.org/ website
|
# Based on the latest stable release in the https://julialang.org/ website
|
||||||
# Juliaup follows the versions too in the following permalink:
|
# Juliaup follows the versions too in the following permalink:
|
||||||
@ -82,14 +81,15 @@ URL: https://github.com/JuliaLang/juliaup
|
|||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source1: vendor.tar.gz
|
Source1: vendor.tar.gz
|
||||||
Source2: cargo_config
|
Source2: cargo_config
|
||||||
%if 0%{?rhel} > 7 || 0%{?fedora}
|
BuildRequires: rust+cargo
|
||||||
BuildRequires: cargo
|
|
||||||
%else
|
%if 0%{?suse_version}
|
||||||
BuildRequires: cargo-packaging
|
BuildRequires: cargo-packaging
|
||||||
%endif
|
%endif
|
||||||
Conflicts: julia
|
|
||||||
%provides_julia_versioned julia
|
%provides_julia_versioned julia
|
||||||
Obsoletes: julia < %{oldest_supported_julia_version}
|
Provides: julia = %{latest_julia_version}
|
||||||
|
Obsoletes: julia < %{latest_julia_version}
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
PreReq: update-alternatives
|
PreReq: update-alternatives
|
||||||
%endif
|
%endif
|
||||||
@ -112,7 +112,9 @@ cp %{SOURCE2} .cargo/config
|
|||||||
unset LIBSSH2_SYS_USE_PKG_CONFIG
|
unset LIBSSH2_SYS_USE_PKG_CONFIG
|
||||||
export RUSTFLAGS="%{rustflags}"
|
export RUSTFLAGS="%{rustflags}"
|
||||||
cargo build --offline --release --no-default-features
|
cargo build --offline --release --no-default-features
|
||||||
%else
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version}
|
||||||
%{cargo_build} --no-default-features
|
%{cargo_build} --no-default-features
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -121,16 +123,19 @@ cargo build --offline --release --no-default-features
|
|||||||
unset LIBSSH2_SYS_USE_PKG_CONFIG
|
unset LIBSSH2_SYS_USE_PKG_CONFIG
|
||||||
export RUSTFLAGS="%{rustflags}"
|
export RUSTFLAGS="%{rustflags}"
|
||||||
cargo install --offline --release --no-default-features --no-track --root="%{buildroot}%{_prefix}" --path .
|
cargo install --offline --release --no-default-features --no-track --root="%{buildroot}%{_prefix}" --path .
|
||||||
%else
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version}
|
||||||
%{cargo_install} --no-default-features
|
%{cargo_install} --no-default-features
|
||||||
%endif
|
%endif
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
||||||
|
|
||||||
%if 0%{?rhel} > 7 || 0%{?fedora}
|
%if 0%{?rhel} > 7 || 0%{?fedora}
|
||||||
ln -sf %{_bindir}/julia %{buildroot}%{_bindir}/julialauncher
|
ln -sf %{_bindir}/julia %{buildroot}%{_bindir}/julialauncher
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
|
ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}%{_bindir}/julia
|
||||||
%post
|
%post
|
||||||
"%_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" $(printf %{latest_julia_version} | sed 's/\.//g')
|
||||||
|
Loading…
Reference in New Issue
Block a user