dev-python/csv23: arm64 keyworded (bug #719700)
[gentoo.git] / app-crypt / kbfs / kbfs-9999.ebuild
index b084faeb8f154fdc7df8f031cfd47891a6f49d7c..d6752264b28ca73cf8ad8e61e759138fbef354dd 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-inherit git-r3
+inherit git-r3 golang-build systemd
 
 DESCRIPTION="Keybase Filesystem (KBFS)"
 HOMEPAGE="https://keybase.io/docs/kbfs"
@@ -14,39 +14,38 @@ SLOT="0"
 KEYWORDS=""
 IUSE="git"
 
-DEPEND="
-       >=dev-lang/go-1.6:0
-       >=app-crypt/keybase-1.0.17
-       "
+DEPEND=""
 RDEPEND="
        app-crypt/gnupg
-       sys-fs/fuse
+       sys-fs/fuse:0=
        "
 
-S="${WORKDIR}/src/github.com/keybase/kbfs"
-
 src_unpack() {
        git-r3_src_unpack
-       mkdir -p "$(dirname "${S}")" || die
-       ln -s "${WORKDIR}/${P}" "${S}" || die
+       mkdir -vp "${S}/src/github.com/keybase" || die
+       ln -vs "${S}" "${S}/src/github.com/keybase/kbfs" || die
 }
 
 src_compile() {
-       GOPATH="${WORKDIR}" \
-               go build -v -x \
-               -tags production \
-               -o "${T}/kbfsfuse" \
-               github.com/keybase/kbfs/kbfsfuse
-       use git && \
-               GOPATH="${WORKDIR}" \
-               go build -v -x \
-               -tags production \
-               -o "${T}/git-remote-keybase" \
-               github.com/keybase/kbfs/kbfsgit/git-remote-keybase
+       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
+}
+
+src_test() {
+       EGO_PN="github.com/keybase/kbfs/kbfsfuse" \
+               golang-build_src_test
 }
 
 src_install() {
        dobin "${T}/kbfsfuse"
-       use git && \
-               dobin "${T}/git-remote-keybase"
+       dobin "${T}/git-remote-keybase"
+       dobin "${T}/keybase-redirector"
+       systemd_douserunit "${S}/packaging/linux/systemd/kbfs.service"
 }