summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b10dc80d1187a58562451114ddd3179d31b8ebd6 (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
# Maintainer: David Birks <david@birks.dev>

pkgname=vibecoder-git
pkgver=r1123.f0d2be6
pkgrel=1
pkgdesc='AI-orchestrated coding agent colony'
arch=('x86_64')
url='https://github.com/steveyegge/vc'
license=('MIT')
depends=('glibc')
makedepends=('go' 'git')
conflicts=(
  'vc'
  'vercel'
)
options=('!debug')
source=("git+https://github.com/steveyegge/vc.git")
b2sums=('SKIP')

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

prepare() {
  cd vc
  mkdir -p build/
}

build() {
  cd vc

  # Config from https://wiki.archlinux.org/title/Go_package_guidelines
  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 -o build -ldflags "-X main.Version=$pkgver" ./cmd/...
}

package() {
  cd vc

  # Install binary as 'vc'
  install -Dm755 build/vc "$pkgdir"/usr/bin/vc
}