%global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird %global version 0.5.0 %global commit 28e9e5ccce1d58a4298a0c0be4e7ba167db73dff %global date 20241119 %global source_date_epoch_from_changelog 0 %global debug_package %{nil} %global gomodulesmode GO111MODULE=on %forgemeta Name: lyrebird Version: %{forgeversion} Release: %{autorelease} Summary: Pluggable transport for Tor License: GPL-3.0-or-later URL: %{forgeurl} Source0: %{forgesource} Source1: %{name}.howto BuildRequires: git-core BuildRequires: golang-bin BuildRequires: go-rpm-macros %description Lyrebird is a pluggable transport for Tor. This transport supports multiple obfuscation protocols: - obfs2 - obfs3 - obfs4 - ScrambleSuit client - meek client - WebTunnel client %prep %forgesetup %build export GOPROXY="https://proxy.golang.org,direct" export GOFLAGS="-trimpath" export GO_LDFLAGS="-s -w" %gobuild -o %{name} ./cmd/%{name} %install install -p -D -m 755 -t %{buildroot}%{_bindir} %{name} install -p -D -m 644 -t %{buildroot}%{_mandir}/man1 doc/%{name}.1 install -p -D -m 644 -t %{buildroot}%{_pkgdocdir} %{SOURCE1} \ README.md ChangeLog doc/obfs4-spec.txt %files %license LICENSE %license LICENSE-GPL3.txt %doc %{_pkgdocdir} %{_bindir}/%{name} %{_mandir}/man1/%{name}.1.gz