2024-10-31 23:30:47 +03:00
|
|
|
%define debug %nil
|
|
|
|
%define debug_package %nil
|
2024-12-03 18:02:24 +00:00
|
|
|
%define rustver 1.82.0
|
2024-10-31 23:30:47 +03:00
|
|
|
|
|
|
|
Name: arti
|
2024-12-03 18:02:24 +00:00
|
|
|
Version: 1.3.1
|
2024-10-31 23:30:47 +03:00
|
|
|
Release: 1
|
|
|
|
Summary: An implementation of Tor, in Rust
|
|
|
|
URL: https://gitlab.torproject.org/tpo/core/arti
|
|
|
|
Source0: %{url}/-/archive/%{name}-v%{version}/%{name}-%{name}-v%{version}.tar.gz
|
|
|
|
License: ASL 2.0 or MIT
|
|
|
|
Group: Development/Other
|
|
|
|
BuildRequires: git-core
|
|
|
|
BuildRequires: curl
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: upx
|
|
|
|
%if %{mdvver} > 201610
|
|
|
|
BuildRequires: rust
|
|
|
|
BuildRequires: cargo
|
|
|
|
%endif
|
|
|
|
BuildRequires: pkgconfig(openssl3.3)
|
|
|
|
|
|
|
|
%description
|
|
|
|
Arti is a project to produce an embeddable, production-quality
|
|
|
|
implementation of the Tor anonymity protocols in the Rust
|
|
|
|
programming language.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -qn %{name}-%{name}-v%{version}
|
|
|
|
%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
|
|
|
|
|
|
|
|
cargo build -p arti --locked --release
|
|
|
|
|
|
|
|
upx target/release/%{name}
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dm0755 target/release/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
install -Dm0755 debian/config.toml %{buildroot}%{_sysconfdir}/%{name}/config.toml
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md LICENSE* doc GPL-3 LGPL-3
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_sysconfdir}/%{name}/config.toml
|
|
|
|
|
|
|
|
|