| 1 | # Maintainer: Tim Falken <tim@timfalken.com> |
| 2 | pkgname=bluegit-runner |
| 3 | pkgver=20261024090636 |
| 4 | pkgrel=1 |
| 5 | pkgdesc='Separate CI runner for BlueGit (runs jobs in Docker on your own machine)' |
| 6 | arch=('x86_64' 'aarch64') |
| 7 | url='https://git.timfalken.com/timfa/bluegit' |
| 8 | license=('MIT') |
| 9 | depends=('git' 'docker') |
| 10 | makedepends=('go') |
| 11 | options=('!debug') |
| 12 | install=bluegit-runner.install |
| 13 | _commit=6a359db00000000000000000000000000000000a |
| 14 | source=("bluegit-${_commit}.tar.gz::https://git.timfalken.com/timfa/bluegit/-/archive/${_commit}/bluegit-${_commit}.tar.gz") |
| 15 | sha256sums=('0000000000000000000000000000000000000000000000000000000000000000') |
| 16 | |
| 17 | build() { |
| 18 | cd "$srcdir/bluegit-${_commit}" |
| 19 | export CGO_ENABLED=0 |
| 20 | # go.mod vraagt Go 1.26; een oudere Arch-go haalt die toolchain zelf op. |
| 21 | export GOTOOLCHAIN=auto |
| 22 | export GOFLAGS='-trimpath' |
| 23 | export GOCACHE="${BUILDDIR:-$srcdir}/gocache" |
| 24 | export GOPATH="${BUILDDIR:-$srcdir}/gopath" |
| 25 | go build -ldflags="-s -w -X main.version=${pkgver}" -o bluegit-runner ./cmd/bluegit-runner |
| 26 | } |
| 27 | |
| 28 | package() { |
| 29 | cd "$srcdir/bluegit-${_commit}" |
| 30 | install -Dm755 bluegit-runner "$pkgdir/usr/bin/bluegit-runner" |
| 31 | install -Dm644 packaging/runner/bluegit-runner.service "$pkgdir/usr/lib/systemd/system/bluegit-runner.service" |
| 32 | install -Dm644 packaging/runner/sysusers.conf "$pkgdir/usr/lib/sysusers.d/bluegit-runner.conf" |
| 33 | install -Dm644 packaging/runner/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/bluegit-runner.conf" |
| 34 | install -Dm644 packaging/runner/config.yml.example "$pkgdir/usr/share/bluegit-runner/config.yml.example" |
| 35 | install -Dm644 docs/runner.md "$pkgdir/usr/share/doc/bluegit-runner/README.md" |
| 36 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 37 | } |