| 1 | # Maintainer: Tim Falken <tim@timfalken.com> |
| 2 | pkgname=bluegit |
| 3 | pkgver=0.1.0 |
| 4 | pkgrel=1 |
| 5 | pkgdesc='Self-hosted git-platform voor git.timfalken.com' |
| 6 | arch=('x86_64') |
| 7 | url='https://git.timfalken.com' |
| 8 | license=('MIT') |
| 9 | depends=('git' 'docker') |
| 10 | makedepends=('go') |
| 11 | backup=('etc/bluegit/config.yml') |
| 12 | options=('!debug') |
| 13 | |
| 14 | build() { |
| 15 | local root |
| 16 | root="$(cd "$startdir/../.." && pwd)" |
| 17 | cd "$root" |
| 18 | export CGO_ENABLED=0 |
| 19 | # go.mod vraagt Go 1.26; een oudere Arch-go haalt die toolchain zelf op. |
| 20 | export GOTOOLCHAIN=auto |
| 21 | export GOFLAGS='-trimpath' |
| 22 | go build -ldflags='-s -w' -o "$srcdir/bluegit" ./cmd/bluegit |
| 23 | } |
| 24 | |
| 25 | package() { |
| 26 | local root |
| 27 | root="$(cd "$startdir/../.." && pwd)" |
| 28 | install -Dm755 "$srcdir/bluegit" "$pkgdir/usr/bin/bluegit" |
| 29 | install -Dm644 "$root/packaging/bluegit.service" "$pkgdir/usr/lib/systemd/system/bluegit.service" |
| 30 | install -Dm644 "$root/packaging/bluegit.yml" "$pkgdir/etc/bluegit/config.yml" |
| 31 | install -Dm644 "$root/packaging/storage.conf" "$pkgdir/usr/share/bluegit/storage.conf.example" |
| 32 | install -Dm644 "$root/packaging/sysusers.conf" "$pkgdir/usr/lib/sysusers.d/bluegit.conf" |
| 33 | install -Dm644 "$root/packaging/tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/bluegit.conf" |
| 34 | install -Dm755 "$root/packaging/bluegit-update.sh" "$pkgdir/usr/lib/bluegit/update" |
| 35 | install -Dm644 "$root/packaging/bluegit-update.service" "$pkgdir/usr/lib/systemd/system/bluegit-update.service" |
| 36 | install -Dm644 "$root/packaging/bluegit-update.rules" "$pkgdir/usr/share/polkit-1/rules.d/49-bluegit-update.rules" |
| 37 | } |