shadowsocks-rust/shadowsocks-rust.spec
Your Name 0e0bf88f48
Some checks failed
Run CI/CD... / main (push) Failing after 4m56s
1.22.0
2025-02-11 13:27:08 +00:00

56 lines
1.3 KiB
RPMSpec

%define debug %nil
%define debug_package %nil
%define rustver 1.83.0
Name: shadowsocks-rust
Version: 1.22.0
Release: 1
Summary: Shadowsocks on rust
URL: https://shadowsocks.org
Source0: https://github.com/shadowsocks/shadowsocks-rust/archive/v%{version}/%{name}-%{version}.tar.gz
License: MIT
Group: Networking/Other
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}
Provides: ssmanager == %{version}
Provides: ssurl == %{version}
Provides: ssservice == %{version}
%description
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
%install
make install DESTDIR=%{buildroot} PREFIX=%{_bindir} TARGET=release
%files
%doc README.md LICENSE examples/
%{_bindir}/ssservice
%{_bindir}/ssserver
%{_bindir}/sslocal
%{_bindir}/ssmanager
%{_bindir}/ssurl