%global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel %global version 0.0.0 %global commit e64b1b3562f3ab50d06141ecd513a21ec74fe8c6 %global date 20240711 %global source_date_epoch_from_changelog 0 %global debug_package %{nil} %global gomodulesmode GO111MODULE=on %forgemeta Name: webtunnel Version: %{forgeversion} Release: %{autorelease} Summary: Pluggable transport for Tor License: MIT URL: %{forgeurl} Source0: %{forgesource} Source1: %{name}.howto BuildRequires: git-core BuildRequires: golang-bin BuildRequires: go-rpm-macros %description WebTunnel is a pluggable transport for Tor. This transport imitates HTTPS using HTTPT. %prep %forgesetup %build export GOPROXY="https://proxy.golang.org,direct" export GOFLAGS="-trimpath" export GO_LDFLAGS="-s -w" for CMD in client server do %gobuild -o %{name}-${CMD} ./main/${CMD} done %install for CMD in client server do install -p -D -m 755 -t %{buildroot}%{_bindir} %{name}-${CMD} done install -p -D -m 644 -t %{buildroot}%{_pkgdocdir} %{SOURCE1} README.md %files %license LICENSE %doc %{_pkgdocdir} %{_bindir}/%{name}-client %{_bindir}/%{name}-server