%global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake %global version 2.10.1 %global commit c5d680342b33c24ffe6a4a5e85d70376de4660e0 %global date 20241121 %global source_date_epoch_from_changelog 0 %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 install -p -D -m 644 -t %{buildroot}%{_mandir}/man1 doc/%{name}-client.1 doc/%{name}-proxy.1 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}/%{name}-broker %{_bindir}/%{name}-client %{_bindir}/%{name}-probetest %{_bindir}/%{name}-proxy %{_bindir}/%{name}-server %{_mandir}/man1/%{name}-client.1.gz %{_mandir}/man1/%{name}-proxy.1.gz