| 1 | # Maintainer: Tim Falken <tim@timfalken.com> |
| 2 | pkgname=bluegit |
| 3 | pkgver=20261022020626 |
| 4 | pkgrel=1 |
| 5 | pkgdesc='Self-hosted git-platform' |
| 6 | arch=('x86_64') |
| 7 | url='https://git.timfalken.com/timfa/bluegit' |
| 8 | license=('MIT') |
| 9 | depends=('git' 'docker') |
| 10 | makedepends=('go') |
| 11 | backup=('etc/bluegit/config.yml') |
| 12 | options=('!debug') |
| 13 | install=bluegit.install |
| 14 | _commit=e65fc3c65c4e830955b015eba9b971335b6ceed8 |
| 15 | source=("bluegit-${_commit}.tar.gz::https://git.timfalken.com/timfa/bluegit/-/archive/${_commit}/bluegit-${_commit}.tar.gz") |
| 16 | sha256sums=('f40837ad2c6bf3cdea6080b3d257af44d2fcdb78659e59468c8fea5c33b7f338') |
| 17 | |
| 18 | build() { |
| 19 | cd "$srcdir/bluegit-${_commit}" |
| 20 | export CGO_ENABLED=0 |
| 21 | # go.mod vraagt Go 1.26; een oudere Arch-go haalt die toolchain zelf op. |
| 22 | export GOTOOLCHAIN=auto |
| 23 | export GOFLAGS='-trimpath' |
| 24 | # De geïnstalleerde updater zet HOME op /var/lib/bluegit-build. Die map |
| 25 | # bestaat pas na tmpfiles, dus deze bouw mag daar niet schrijven. |
| 26 | export GOCACHE="${BUILDDIR:-$srcdir}/gocache" |
| 27 | export GOPATH="${BUILDDIR:-$srcdir}/gopath" |
| 28 | go build -ldflags='-s -w' -o bluegit ./cmd/bluegit |
| 29 | } |
| 30 | |
| 31 | package() { |
| 32 | cd "$srcdir/bluegit-${_commit}" |
| 33 | install -Dm755 bluegit "$pkgdir/usr/bin/bluegit" |
| 34 | install -Dm644 packaging/bluegit.service "$pkgdir/usr/lib/systemd/system/bluegit.service" |
| 35 | install -Dm644 packaging/bluegit.yml "$pkgdir/etc/bluegit/config.yml" |
| 36 | install -Dm644 packaging/storage.conf "$pkgdir/usr/share/bluegit/storage.conf.example" |
| 37 | install -Dm644 packaging/sysusers.conf "$pkgdir/usr/lib/sysusers.d/bluegit.conf" |
| 38 | install -Dm644 packaging/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/bluegit.conf" |
| 39 | install -Dm755 packaging/bluegit-update.sh "$pkgdir/usr/lib/bluegit/update" |
| 40 | install -Dm644 packaging/bluegit-update.service "$pkgdir/usr/lib/systemd/system/bluegit-update.service" |
| 41 | install -Dm644 packaging/bluegit-update.rules "$pkgdir/usr/share/polkit-1/rules.d/49-bluegit-update.rules" |
| 42 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 43 | } |