You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

  1. # Copyright 1999-2019 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit golang-build systemd
  5. DESCRIPTION="Client for keybase.io"
  6. HOMEPAGE="https://keybase.io/"
  7. SRC_URI="https://github.com/keybase/client/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="Apache-2.0 BSD BSD-2 LGPL-3 MIT MPL-2.0"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE=""
  12. DEPEND=""
  13. RDEPEND="app-crypt/gnupg"
  14. src_unpack() {
  15. unpack "${P}.tar.gz"
  16. ln -vs "client-${PV}" "${P}" || die
  17. mkdir -vp "${S}/src/github.com/keybase" || die
  18. ln -vs "${S}" "${S}/src/github.com/keybase/client" || die
  19. }
  20. src_compile() {
  21. EGO_PN="github.com/keybase/client/go/keybase" \
  22. EGO_BUILD_FLAGS="-tags production -o ${T}/keybase" \
  23. golang-build_src_compile
  24. }
  25. src_test() {
  26. EGO_PN="github.com/keybase/client/go/keybase" \
  27. golang-build_src_test
  28. }
  29. src_install() {
  30. dobin "${T}/keybase"
  31. dobin "${S}/packaging/linux/run_keybase"
  32. systemd_douserunit "${S}/packaging/linux/systemd/keybase.service"
  33. dodir "/opt/keybase"
  34. insinto "/opt/keybase"
  35. doins "${S}/packaging/linux/crypto_squirrel.txt"
  36. }
  37. pkg_postinst() {
  38. elog "Start/Restart keybase: run_keybase"
  39. elog "Run the service: keybase service"
  40. elog "Run the client: keybase login"
  41. ewarn "Note that the user keybasehelper is obsolete and can be removed"
  42. }