diff --git a/shadowsocks-rust.spec b/shadowsocks-rust.spec index b5a76d5..e543e37 100644 --- a/shadowsocks-rust.spec +++ b/shadowsocks-rust.spec @@ -1,5 +1,6 @@ %define debug %nil %define debug_package %nil +%define rustver 1.83.0 Name: shadowsocks-rust Version: 1.22.0 @@ -9,8 +10,14 @@ URL: https://shadowsocks.org Source0: https://github.com/shadowsocks/shadowsocks-rust/archive/v%{version}/%{name}-%{version}.tar.gz License: MIT Group: Networking/Other -BuildRequires: rust +BuildRequires: git-core +BuildRequires: curl +BuildRequires: cmake +BuildRequires: upx +%if %{mdvver} > 201610 +BuildRequires: rust BuildRequires: cargo +%endif BuildRequires: pkgconfig(openssl3.3) Provides: ssserver == %{version} Provides: sslocal == %{version} @@ -22,8 +29,17 @@ shadowsocks is a fast tunnel proxy that helps you bypass firewalls %prep %setup -q +%if %{mdvver} <= 201610 +curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs |\ + sh -s -- -y --profile default --default-toolchain %{rustver} +%endif + %build +%if %{mdvver} <= 201610 +source "$HOME/.cargo/env" +%endif + export OPENSSL_DIR=/opt/openssl3.3 make build TARGET=release