%global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake %global version 2.10.1 %global commit 239357509f339e49f7a68d9ca6acad8b7f9f67ab %global date 20241113 %global source_date_epoch_from_changelog 0 %global debug_package %{nil} %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 %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 -buildmode=pie" export LDFLAGS="-s -w" for CMD in broker client probetest proxy server do go build -ldflags "${LDFLAGS}" -o %{name}-${CMD} ./${CMD} done %install install -p -D -m 755 -t %{buildroot}%{_bindir} \ %{name}-broker %{name}-client %{name}-probetest %{name}-proxy %{name}-server 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 for CMD in broker client probetest proxy server do install -p -D -m 644 ${CMD}/README.md %{buildroot}%{_pkgdocdir}/README.${CMD}.md done %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