shadowsocks-rust/shadowsocks-rust.spec

57 lines
1.3 KiB
RPMSpec
Raw Permalink Normal View History

2020-07-21 22:47:57 +03:00
%define debug %nil
%define debug_package %nil
2025-02-11 09:21:30 +00:00
%define rustver 1.83.0
2020-07-21 22:47:57 +03:00
Name: shadowsocks-rust
2025-02-10 12:14:53 +00:00
Version: 1.22.0
2020-07-21 22:47:57 +03:00
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
2025-02-11 09:21:30 +00:00
BuildRequires: git-core
BuildRequires: curl
BuildRequires: cmake
BuildRequires: upx
%if %{mdvver} > 201610
BuildRequires: rust
2020-07-21 23:00:08 +03:00
BuildRequires: cargo
2025-02-11 09:21:30 +00:00
%endif
2025-02-10 12:14:53 +00:00
BuildRequires: pkgconfig(openssl3.3)
2020-07-21 22:47:57 +03:00
Provides: ssserver == %{version}
Provides: sslocal == %{version}
Provides: ssmanager == %{version}
Provides: ssurl == %{version}
2025-02-11 13:27:08 +00:00
Provides: ssservice == %{version}
2020-07-21 22:47:57 +03:00
%description
shadowsocks is a fast tunnel proxy that helps you bypass firewalls
%prep
%setup -q
2025-02-11 09:21:30 +00:00
%if %{mdvver} <= 201610
curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs |\
sh -s -- -y --profile default --default-toolchain %{rustver}
%endif
2020-07-21 22:47:57 +03:00
%build
2025-02-11 09:21:30 +00:00
%if %{mdvver} <= 201610
source "$HOME/.cargo/env"
%endif
2025-02-10 12:14:53 +00:00
export OPENSSL_DIR=/opt/openssl3.3
2020-07-21 22:47:57 +03:00
make build TARGET=release
%install
make install DESTDIR=%{buildroot} PREFIX=%{_bindir} TARGET=release
%files
%doc README.md LICENSE examples/
2025-02-11 13:27:08 +00:00
%{_bindir}/ssservice
2020-07-21 22:47:57 +03:00
%{_bindir}/ssserver
%{_bindir}/sslocal
%{_bindir}/ssmanager
%{_bindir}/ssurl