summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 702efc2469c05e720bb5a3157e3628cc53aee124 (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
# Maintainer: timescam <timescam at duck dot com>

_pkgname=cli2cloud
pkgname=$_pkgname-git
pkgver=r64.171ac42
pkgrel=1
pkgdesc="Pipe your terminal output to the cloud. (git version)"
arch=(any)
url="https://cli2cloud.com/"
license=(MIT)
makedepends=(git go)
source=("git+https://github.com/leonwind/$_pkgname.git")
provides=($_pkgname)
sha256sums=("SKIP")

pkgver() {
  cd $_pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "$_pkgname/cli/$_pkgname"
  export GOPATH="$srcdir"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  go build 
}

package() {
  cd "$_pkgname"
  install -Dm755 "$srcdir/$_pkgname/cli/$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
}