Install this version:
emerge -a =net-misc/croc-11.3.2
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =net-misc/croc-11.3.2
Or alternatively:
emerge --autounmask-write -a =net-misc/croc-11.3.2
# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 go-module systemd
DESCRIPTION="Easily and securely send things from one computer to another"
HOMEPAGE="https://github.com/schollz/croc"
SRC_URI="
https://github.com/schollz/croc/releases/download/v${PV}/${PN}_v${PV}_src.tar.gz
-> ${P}.tar.gz
"
S="${WORKDIR}/${PN}-v${PV}"
LICENSE="Apache-2.0 BSD BSD-2 MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
RDEPEND="
acct-group/croc
acct-user/croc
"
BDEPEND="
>=dev-lang/go-1.26.7
"
DOCS=( README.md )
src_prepare() {
default
# Replace User=nobody with User=croc
sed -i -e "s|\(^User=\).*|\1croc|g" croc.service || die
# Rename bash completion function
sed -i -e "s|_cli_bash_autocomplete|_croc|g" \
src/install/bash_autocomplete || die
# build with go 1.26.7
sed -i 's/^go 1\.27\.0/go 1.26.7/' go.mod
}
src_compile() {
ego build
}
src_test() {
ego test -skip "Test(Comm|Send|PublicIP|LocalIP|LocalLookupIP|LookupFunction)" -work ./...
}
src_install() {
dobin croc
systemd_dounit croc.service
newbashcomp src/install/bash_autocomplete croc
einstalldocs
}
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | croc-11.3.2.tar.gz | 10923660 bytes | https://github.com/schollz/croc/releases/download/v11.3.2/croc_v11.3.2_src.tar.gz |