blob: a8dd68ddad93ec28ebf21d36b8fe784e97b07e58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="Keybase client"
HOMEPAGE="https://keybase.io/"
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="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
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/keybase || die
ego build -tags production -o "${T}/keybase"
popd || die
}
src_test() {
pushd go/keybase || die
ego test
popd || die
}
src_install() {
dobin "${T}/keybase"
dobin "${S}/packaging/linux/run_keybase"
systemd_douserunit "${S}/packaging/linux/systemd/keybase.service"
insinto "/opt/keybase"
doins "${S}/packaging/linux/crypto_squirrel.txt"
dodir "/opt/keybase"
}
pkg_postinst() {
elog "Start/Restart keybase: run_keybase"
elog "Run the service: keybase service"
elog "Run the client: keybase login"
ewarn "Note that the user keybasehelper is obsolete and can be removed"
}
|