summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/kbfs/kbfs-9999.ebuild')
-rw-r--r--app-crypt/kbfs/kbfs-9999.ebuild60
1 files changed, 38 insertions, 22 deletions
diff --git a/app-crypt/kbfs/kbfs-9999.ebuild b/app-crypt/kbfs/kbfs-9999.ebuild
index d6752264b28c..835f820a30b0 100644
--- a/app-crypt/kbfs/kbfs-9999.ebuild
+++ b/app-crypt/kbfs/kbfs-9999.ebuild
@@ -1,46 +1,61 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit git-r3 golang-build systemd
+inherit go-module systemd
DESCRIPTION="Keybase Filesystem (KBFS)"
HOMEPAGE="https://keybase.io/docs/kbfs"
-EGIT_REPO_URI="https://github.com/keybase/kbfs.git"
+
+if [[ ${PV} == *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/keybase/client.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/keybase/client/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI+=" https://dev.gentoo.org/~nicolasbock/${P}-deps.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
LICENSE="BSD"
SLOT="0"
-KEYWORDS=""
-IUSE="git"
-DEPEND=""
RDEPEND="
app-crypt/gnupg
sys-fs/fuse:0=
- "
+"
src_unpack() {
- git-r3_src_unpack
- mkdir -vp "${S}/src/github.com/keybase" || die
- ln -vs "${S}" "${S}/src/github.com/keybase/kbfs" || die
+ default
+ if [[ ${PV} == *9999 ]]; then
+ git-r3_src_unpack
+ GOMODCACHE="${S}/go/go-mod"
+ pushd "${S}/go" || die
+ ego mod download
+ popd || die
+ else
+ ln -vs "client-${PV}" "${P}" || die
+ mkdir -vp "${S}/src/github.com/keybase" || die
+ ln -vs "${S}" "${S}/src/github.com/keybase/client" || die
+ fi
}
src_compile() {
- EGO_PN="github.com/keybase/kbfs/kbfsfuse" \
- EGO_BUILD_FLAGS="-tags production -o ${T}/kbfsfuse" \
- golang-build_src_compile
- EGO_PN="github.com/keybase/kbfs/kbfsgit/git-remote-keybase" \
- EGO_BUILD_FLAGS="-tags production -o ${T}/git-remote-keybase" \
- golang-build_src_compile
- EGO_PN="github.com/keybase/kbfs/redirector" \
- EGO_BUILD_FLAGS="-tags production -o ${T}/keybase-redirector" \
- golang-build_src_compile
+ pushd ./go/kbfs/kbfsfuse || die
+ ego build -tags production -o "${T}/kbfsfuse"
+ popd || die
+ pushd ./go/kbfs/kbfsgit/git-remote-keybase || die
+ ego build -tags production -o "${T}/git-remote-keybase"
+ popd || die
+ pushd ./go/kbfs/redirector || die
+ ego build -tags production -o "${T}/keybase-redirector"
+ popd || die
}
src_test() {
- EGO_PN="github.com/keybase/kbfs/kbfsfuse" \
- golang-build_src_test
+ pushd ./go/kbfs/kbfsfuse || die
+ ego test
+ popd || die
}
src_install() {
@@ -48,4 +63,5 @@ src_install() {
dobin "${T}/git-remote-keybase"
dobin "${T}/keybase-redirector"
systemd_douserunit "${S}/packaging/linux/systemd/kbfs.service"
+ systemd_douserunit "${S}/packaging/linux/systemd/keybase-redirector.service"
}