mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
Closes: https://bugs.gentoo.org/975823 Bug: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/work_items/40545 Signed-off-by: Poncho <poncho@spahan.ch> Part-of: https://github.com/gentoo/guru/pull/505 Closes: https://github.com/gentoo/guru/pull/505 Signed-off-by: David Roman <stkw0@disroot.org>
61 lines
1.2 KiB
Bash
61 lines
1.2 KiB
Bash
# Copyright 2023-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit go-module systemd
|
|
|
|
DESCRIPTION="Pluggable Transport using WebRTC, inspired by Flashproxy"
|
|
HOMEPAGE="
|
|
https://snowflake.torproject.org
|
|
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake
|
|
"
|
|
SRC_URI="https://dist.torproject.org/snowflake/${PV}/snowflake-v${PV}.tar.gz"
|
|
S=${WORKDIR}/snowflake-v${PV}
|
|
|
|
LICENSE="BSD Apache-2.0 BSD-2 CC0-1.0 MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64"
|
|
IUSE="test"
|
|
RESTRICT="!test? ( test )"
|
|
|
|
BDEPEND=">=dev-lang/go-1.21"
|
|
|
|
src_configure() {
|
|
COMPONENTS=(
|
|
broker
|
|
client
|
|
probetest
|
|
proxy
|
|
server
|
|
)
|
|
}
|
|
|
|
src_compile() {
|
|
for component in "${COMPONENTS[@]}"; do
|
|
pushd ${component} || die
|
|
einfo "Building ${component}"
|
|
nonfatal ego build || die "${component}: build failed"
|
|
popd || die
|
|
done
|
|
}
|
|
|
|
src_test() {
|
|
ego test ./...
|
|
}
|
|
|
|
src_install() {
|
|
local component
|
|
for component in "${COMPONENTS[@]}"; do
|
|
newbin ${component}/${component} snowflake-${component}
|
|
newdoc ${component}/README.md README_${component}.md
|
|
done
|
|
|
|
systemd_dounit "${FILESDIR}"/snowflake-proxy.service
|
|
newinitd "${FILESDIR}"/snowflake-proxy.initd snowflake-proxy
|
|
|
|
einstalldocs
|
|
dodoc doc/*.txt doc/*.md
|
|
doman doc/*.1
|
|
}
|