diff --git a/juliaup.changes b/juliaup.changes index 19eb52f..d8180b3 100644 --- a/juliaup.changes +++ b/juliaup.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 17 12:42:08 UTC 2022 - Soc Virnyl Estela + +- add fedora or rhel7 to specfile + ------------------------------------------------------------------- Sun Aug 14 06:21:12 UTC 2022 - socvirnyl.estela@gmail.com diff --git a/juliaup.spec b/juliaup.spec index d13d2a3..0daf1fd 100644 --- a/juliaup.spec +++ b/juliaup.spec @@ -17,6 +17,7 @@ %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 # Juliaup follows the versions too in the following permalink: @@ -76,6 +77,9 @@ URL: https://github.com/JuliaLang/juliaup Source0: %{name}-%{version}.tar.gz Source1: vendor.tar.gz Source2: cargo_config +%if 0%{?rhel} > 7 || 0%{?fedora} +BuildRequires: cargo +%endif BuildRequires: cargo-packaging Conflicts: julia %provides_julia_versioned julia @@ -96,10 +100,22 @@ mkdir .cargo cp %{SOURCE2} .cargo/config %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} +%endif %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} +%endif mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -sf %{_sysconfdir}/alternatives/julia %{buildroot}/%{_bindir}/julia