summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f30f2bbe47cd4699bcd875c3fee81a8fd94c211 (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
# Maintainer: Keybase <linux-packages@keybase.io>
# Contributor: Jack O'Connor <oconnor663@gmail.com>

pkgname=keybase-git
pkgdesc='the Keybase Go client, filesystem, and GUI'
license=('BSD')
url='https://keybase.io'
pkgver=5.5.0+35896.807c29924b
pkgver() {
  "$srcdir/client/packaging/linux/arch/keybase_git_version.sh"
}
pkgrel=1
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
depends=(fuse libxss gtk2 lsof) # don't change this without changing the SRCINFO template too,
                                # and the keybase-bin files in keybase/client/packaging/linux/arch
makedepends=(go-pie yarn npm git rsync)
provides=(keybase keybase-gui kbfs)
# keybase-release is a deprecated AUR package
conflicts=(keybase keybase-release keybase-bin keybase-gui kbfs)
source=(
  'git+https://github.com/keybase/client'
)
md5sums=('SKIP')
install=keybase.install

build() {
  if [ "$CARCH" = "i686" ] ; then
    export KEYBASE_SKIP_64_BIT=1
  elif [ "$CARCH" = "x86_64" ] ; then
    export KEYBASE_SKIP_32_BIT=1
  elif [ "$CARCH" = "aarch64" ] || [ "$CARCH" = "armv7h" ] ; then
    export KEYBASE_BUILD_ARM_ONLY=1
  else
    echo "Unknown arch: $CARCH"
    exit 1
  fi

  "$srcdir/client/packaging/linux/build_binaries.sh" prerelease "$srcdir/build_dir"
}

package() {
  if [ "$CARCH" = "i686" ] ; then
    deb_arch="i386"
  elif [ "$CARCH" = "x86_64" ] ; then
    deb_arch="amd64"
  elif [ "$CARCH" = "aarch64" ] || [ "$CARCH" = "armv7h" ] ; then
    deb_arch="arm64"
  else
    echo "Unknown arch: $CARCH"
    exit 1
  fi
  sh -c "cp -r $srcdir/build_dir/binaries/$deb_arch/* $pkgdir"
}