summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0cf083aa3d6ce478e074bbb84271f1d45d29d275 (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
# Maintainer: Jean Lucas <jean@4ray.co>

pkgname=drive
pkgver=0.4.0
pkgrel=2
pkgdesc='CLI Google Drive client'
arch=(x86_64)
url=http://github.com/odeke-em/$pkgname
license=(Apache)
depends=(glibc)
makedepends=(go git)
source=($pkgname-$pkgver.tar.gz::https://github.com/odeke-em/$pkgname/archive/v$pkgver.tar.gz)
sha512sums=('59e53528222a26e88d8c4bb9ed9f841cc0bf07d6955099c5338a8ce18bc0ff673190d1c16b13ea3903cea4400828c84627ed479b98f2f9f42e39e212e8d0f8d4')

build() {
  cd $pkgname-$pkgver
  export GOFLAGS='-buildmode=pie -trimpath -modcacherw'
  GOPATH="$srcdir"/$pkgname-$pkgver go install -v -x \
    -ldflags "-extldflags \"${LDFLAGS}\"" \
    github.com/odeke-em/$pkgname/cmd/$pkgname@latest
}

package() {
  cd $pkgname-$pkgver
  install -D bin/$pkgname -t "$pkgdir"/usr/bin
  install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}