File snowflake.spec of Package snowflake
#
# spec file for package name
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: snowflake
Version: 1690550602.d932cb2
Release: 0
Summary: Snowflake pluggable transport, using WebRTC
License: GPL-3.0
Group: Productivity/Networking/Other
URL: https://snowflake.torproject.org/
Source: %{name}-%{version}.tar.xz
Source1: vendor.tar.gz
BuildRequires: go
BuildRequires: golang-packaging
%description
Snowflake is a system to defeat internet censorship.
People who are censored can use Snowflake to access the
internet. Their connection goes through Snowflake
proxies, which are run by volunteers.
%prep
%setup -q -a 1
%build
%define buildflags -ldflags='-s -w' -trimpath
go build %{buildflags} -o snowflake-broker -mod=vendor -buildmode=pie ./broker
go build %{buildflags} -o snowflake-client -mod=vendor -buildmode=pie ./client
go build %{buildflags} -o snowflake-proxy -mod=vendor -buildmode=pie ./proxy
go build %{buildflags} -o snowflake-server -mod=vendor -buildmode=pie ./server
%install
%__install -D -m 0755 -t %{buildroot}%{_bindir} snowflake-*
mv -v broker/README.md README-broker.md
mv -v client/README.md README-client.md
mv -v proxy/README.md README-proxy.md
mv -v server/README.md README-server.md
%files
%doc doc README*.md
%license LICENSE
%{_bindir}/snowflake-*
%changelog