%global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake %global version 2.10.1 %global commit e4c95fc2424f343a808a0ae93a0becc2b1b9c023 %global date 20250107 %global debug_package %{nil} %global gomodulesmode GO111MODULE=on %forgemeta Name: snowflake Version: %{forgeversion} Release: %{autorelease} Summary: Pluggable transport for Tor License: BSD-3-Clause URL: %{forgeurl} Source0: %{forgesource} Source1: %{name}.howto BuildRequires: git-core BuildRequires: golang-bin BuildRequires: go-rpm-macros %description Snowflake is a pluggable transport for Tor. This transport relies on WebRTC. %prep %forgesetup %build export GOPROXY="https://proxy.golang.org,direct" export GOFLAGS="-trimpath" export GO_LDFLAGS="-s -w" for CMD in broker client probetest proxy server do %gobuild -o %{name}-${CMD} ./${CMD} done %install for CMD in broker client probetest proxy server do install -p -D -m 755 -t %{buildroot}%{_bindir} %{name}-${CMD} install -p -D -m 644 ${CMD}/README.md %{buildroot}%{_pkgdocdir}/README-${CMD}.md done for CMD in client server do install -p -D -m 644 ${CMD}/torrc %{buildroot}%{_pkgdocdir}/${CMD}.torrc done for CMD in client proxy do install -p -D -m 644 -t %{buildroot}%{_mandir}/man1 doc/%{name}-${CMD}.1 done install -p -D -m 644 -t %{buildroot}%{_pkgdocdir} %{SOURCE1} README.md \ doc/broker-spec.txt doc/rendezvous-with-sqs.md doc/using-the-snowflake-library.md %files %license LICENSE %doc %{_pkgdocdir} %{_bindir}/* %{_mandir}/man1/*