SHA256
1
0
forked from pool/juliaup

- add fedora or rhel7 to specfile

OBS-URL: https://build.opensuse.org/package/show/science/juliaup?expand=0&rev=40
This commit is contained in:
Soc Virnyl Estela 2022-08-17 12:42:58 +00:00 committed by Git OBS Bridge
parent 2fd474d3ef
commit a134ee67ed
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Aug 17 12:42:08 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
- add fedora or rhel7 to specfile
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Aug 14 06:21:12 UTC 2022 - socvirnyl.estela@gmail.com Sun Aug 14 06:21:12 UTC 2022 - socvirnyl.estela@gmail.com

View File

@ -17,6 +17,7 @@
%global oldest_supported_julia_version 0.7.0 %global oldest_supported_julia_version 0.7.0
%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:
@ -76,6 +77,9 @@ 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: cargo
%endif
BuildRequires: cargo-packaging BuildRequires: cargo-packaging
Conflicts: julia Conflicts: julia
%provides_julia_versioned julia %provides_julia_versioned julia
@ -96,10 +100,22 @@ mkdir .cargo
cp %{SOURCE2} .cargo/config cp %{SOURCE2} .cargo/config
%build %build
%if 0%{?rhel} > 7 || 0%{?fedora}
unset LIBSSH2_SYS_USE_PKG_CONFIG
export RUSTFLAGS="%{rustflags}"
cargo build --offline --release --all-features
%else
%{cargo_build} %{cargo_build}
%endif
%install %install
%if 0%{?rhel} > 7 || 0%{?fedora}
unset LIBSSH2_SYS_USE_PKG_CONFIG
export RUSTFLAGS="%{rustflags}"
cargo install --offline --no-track --root="%{buildroot}%{_prefix}" --path .
%else
%{cargo_install} %{cargo_install}
%endif
mkdir -p %{buildroot}%{_sysconfdir}/alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives
ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}/%{_bindir}/julia ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}/%{_bindir}/julia