Skip to content

Commit

Permalink
app-crypt/kbfs: new package, add 6.0.2, 9999
Browse files Browse the repository at this point in the history
Closes: gentoo#27372
Signed-off-by: Randall T. Vasquez <[email protected]>
Signed-off-by: Nicolas Bock <[email protected]>
  • Loading branch information
ran-dall authored and nicolasbock committed Feb 18, 2023
1 parent bbc7455 commit 9552d43
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app-crypt/kbfs/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DIST kbfs-6.0.2-deps.tar.xz 205729260 BLAKE2B d58d1b6615c9195ad3b4eb82bbbb3f3ff4729683b6d4b69dd35222089fa9477710a59c75af830a4f74ca6ccf3eae2fe6d880a72b74d15478fe29db268f333f64 SHA512 39afab3647ea766ed86059548eddc910195ec39b71897a92cdc927d9c0025297254950c0a85434ce9a1e90a189b6f84504445e1d6152ec4bd8441dd55ae4e6c0
DIST kbfs-6.0.2.tar.gz 57283593 BLAKE2B 272dd3c9e2e855e1979a620f5a600cb1352632fca055ba36140d2cc63013e8f8b7e66c5f9fe74ab2c71dac2df7cc27aac9a8387f7444eff4c469659ff1aece2e SHA512 0a3fe3f8b9fc7a3099696699268bec54aed898d0692a3033e54f816b87ef2616b83a0817d365b87a77ecb489ae5d11bae15597c3bcd23819422ec384ae63f6a0
67 changes: 67 additions & 0 deletions app-crypt/kbfs/kbfs-6.0.2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module systemd

DESCRIPTION="Keybase Filesystem (KBFS)"
HOMEPAGE="https://keybase.io/docs/kbfs"

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/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"

RDEPEND="
app-crypt/gnupg
sys-fs/fuse:0=
"

src_unpack() {
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() {
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() {
pushd ./go/kbfs/kbfsfuse || die
ego test
popd || die
}

src_install() {
dobin "${T}/kbfsfuse"
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"
}
67 changes: 67 additions & 0 deletions app-crypt/kbfs/kbfs-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module systemd

DESCRIPTION="Keybase Filesystem (KBFS)"
HOMEPAGE="https://keybase.io/docs/kbfs"

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/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" ${P}-deps.tar.xz"
KEYWORDS="~amd64 ~arm64 ~x86"
fi

LICENSE="BSD"
SLOT="0"

RDEPEND="
app-crypt/gnupg
sys-fs/fuse:0=
"

src_unpack() {
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() {
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() {
pushd ./go/kbfs/kbfsfuse || die
ego test
popd || die
}

src_install() {
dobin "${T}/kbfsfuse"
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"
}
19 changes: 19 additions & 0 deletions app-crypt/kbfs/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>[email protected]</email>
<name>Randall T. Vasquez</name>
</maintainer>
<maintainer type="person">
<email>[email protected]</email>
<name>Nicolas Bock</name>
</maintainer>
<longdescription lang="en">
The official Keybase implementation of the client-side code for the
Keybase filesystem (KBFS), a cryptographically secure filesystem.
</longdescription>
<upstream>
<remote-id type="github">keybase/client</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit 9552d43

Please sign in to comment.