%global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake %global commit 1f472b16a662fddd297e343acf7e5c820a713c90 %global date 20240905 Name: snowflake Version: 2.10.1~%{date}git%(printf %.7s %{commit}) Release: %autorelease Summary: Tor pluggable transport relying on WebRTC License: BSD-3-Clause URL: %{forgeurl} Source0: %{forgeurl}/-/archive/%{commit}/%{name}-%{commit}.tar.gz Source1: go-vendor-tools.toml Source2: vendor.tar.bz2 BuildRequires: go-rpm-macros BuildRequires: golang %description Snowflake is a pluggable transport for Tor that relies on WebRTC to route traffic through ephemeral proxies. %prep %setup -q -n %{name}-%{commit} %go_vendor_setup %build export GOFLAGS="%{?goflags} -mod=vendor" export GO_LDFLAGS="-s -w" for MODULE in broker client probetest proxy server ; do %gobuild -o %{name}-${MODULE} ./${MODULE} done %install install -d -m 0755 %{buildroot}%{_bindir} for MODULE in broker client probetest proxy server ; do install -p -m 0755 %{name}-${MODULE} %{buildroot}%{_bindir}/ done install -d -m 0755 %{buildroot}%{_mandir}/man1 for MODULE in client proxy ; do install -p -m 0644 doc/%{name}-${MODULE}.1 %{buildroot}%{_mandir}/man1/ done install -d -m 0755 %{buildroot}%{_pkgdocdir} install -p -m 0644 README.md doc/broker-spec.txt doc/rendezvous-with-sqs.md doc/using-the-snowflake-library.md %{buildroot}%{_pkgdocdir}/ for MODULE in broker client probetest proxy server ; do install -p -m 0644 ${MODULE}/README.md %{buildroot}%{_pkgdocdir}/README-${MODULE}.md done for MODULE in client server ; do install -p -m 0644 ${MODULE}/torrc %{buildroot}%{_pkgdocdir}/${MODULE}.torrc done %files %license LICENSE %doc %{_pkgdocdir} %{_bindir}/snowflake-broker %{_bindir}/snowflake-client %{_bindir}/snowflake-probetest %{_bindir}/snowflake-proxy %{_bindir}/snowflake-server %{_mandir}/man1/snowflake-client.1* %{_mandir}/man1/snowflake-proxy.1* %changelog %autochangelog