Gentoo Archives: gentoo-commits

From: Nicolas Bock <nicolasbock@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/keybase/
Date: Wed, 21 Feb 2018 20:03:41
Message-Id: 1519243392.c30577efe39c08f75e79f0527031ff57abf49816.nicolasbock@gentoo
1 commit: c30577efe39c08f75e79f0527031ff57abf49816
2 Author: Nicolas Bock <nicolasbock <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 21 20:02:53 2018 +0000
4 Commit: Nicolas Bock <nicolasbock <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 21 20:03:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c30577ef
7
8 app-crypt/keybase: Install as systemd user service
9
10 The service file needs to be installed as a user service so that
11 non-privileged users can start it in their namespace.
12
13 Bug: https://bugs.gentoo.org/644210
14 Package-Manager: Portage-2.3.19, Repoman-2.3.6
15
16 app-crypt/keybase/keybase-1.0.41-r2.ebuild | 62 ++++++++++++++++++++++++++++++
17 1 file changed, 62 insertions(+)
18
19 diff --git a/app-crypt/keybase/keybase-1.0.41-r2.ebuild b/app-crypt/keybase/keybase-1.0.41-r2.ebuild
20 new file mode 100644
21 index 00000000000..afb357189ce
22 --- /dev/null
23 +++ b/app-crypt/keybase/keybase-1.0.41-r2.ebuild
24 @@ -0,0 +1,62 @@
25 +# Copyright 1999-2018 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=6
29 +
30 +inherit eutils systemd user versionator
31 +
32 +MY_PV=$(replace_version_separator 3 '-')
33 +
34 +DESCRIPTION="Client for keybase.io"
35 +HOMEPAGE="https://keybase.io/"
36 +SRC_URI="https://github.com/keybase/client/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
37 +
38 +LICENSE="BSD"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~x86"
41 +IUSE=""
42 +
43 +DEPEND="
44 + >=dev-lang/go-1.6:0
45 + app-crypt/kbfs"
46 +RDEPEND="
47 + app-crypt/gnupg"
48 +
49 +S="${WORKDIR}/src/github.com/keybase/client"
50 +
51 +pkg_setup() {
52 + enewuser keybasehelper
53 +}
54 +
55 +src_unpack() {
56 + unpack "${P}.tar.gz"
57 + mkdir -p "$(dirname "${S}")" || die
58 + mv "client-${MY_PV}" "${S}" || die
59 +}
60 +
61 +src_compile() {
62 + GOPATH="${WORKDIR}:${S}/go/vendor" \
63 + go build -v -x \
64 + -tags production \
65 + -o "${T}/keybase" \
66 + github.com/keybase/client/go/keybase || die
67 + GOPATH="${WORKDIR}" \
68 + go build -v -x \
69 + -tags production \
70 + -o "${T}/keybase-mount-helper" \
71 + github.com/keybase/client/go/mounter/keybase-mount-helper || die
72 +}
73 +
74 +src_install() {
75 + dobin "${T}/keybase"
76 + dobin "${T}/keybase-mount-helper"
77 + fowners keybasehelper:keybasehelper "${EROOT}/usr/bin/keybase-mount-helper"
78 + dobin "${S}/packaging/linux/run_keybase"
79 + systemd_douserunit "${S}/packaging/linux/systemd/keybase.service"
80 +}
81 +
82 +pkg_postinst() {
83 + elog "Run the service: keybase service"
84 + elog "Run the client: keybase login"
85 + elog "Restart keybase: run_keybase"
86 +}