%global forgeurl https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird %global commit 362a60bb4e3fa434130ef81a9990d83d6d8eaea5 %global gomodulesmode GO111MODULE=on %forgemeta Name: lyrebird Version: 0.5.0^20240905git362a60b Release: 1%{?dist} Summary: Tor pluggable transport proxy License: 0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-3.0-only AND MIT URL: %{forgeurl} Source0: %{forgesource} # Generated offline vendor tarball using: # go_vendor_archive create --config go-vendor-tools.toml --write-config . Source1: vendor.tar.bz2 Source2: go-vendor-tools.toml Source3: obfs4.torrc BuildRequires: go-vendor-tools BuildRequires: go-rpm-macros BuildRequires: golang %description Lyrebird is a pluggable transport for Tor. Protocols supported by this transport: - Obfs2/3/4 - Meek client - ScrambleSuit client - WebTunnel client %prep %autosetup -n lyrebird-%{commit} -a 1 %build %gobuild -mod=vendor -o %{name} ./cmd/%{name} %install %go_vendor_license_install -c %{SOURCE2} install -D -p -m 0755 -t %{buildroot}%{_bindir} %{name} install -D -p -m 0644 -t %{buildroot}%{_mandir}/man1 doc/%{name}.1 install -D -p -m 0644 -t %{buildroot}%{_pkgdocdir} README.md ChangeLog doc/obfs4-spec.txt install -m 0755 %{buildroot}%{_sysconfdir}/tor install -m 0644 -vp %{SOURCE3} %{buildroot}%{_sysconfdir}/tor/obfs4.torrc %check ./%{name} -version || : %files -f %{go_vendor_license_filelist} %doc %{_pkgdocdir} %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %dir %{_sysconfdir}/tor %config(noreplace) %{_sysconfdir}/tor/obfs4.torrc %changelog * Sun May 19 2024 Packager - %{version}-%{release} - Edit obfs4.torrc file to support lyrebird package - Initial Lyrebird package for Fedora