| 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://gitlab.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://gitlab.com/Timfa/bluegit/-/archive/${_commit}/bluegit-${_commit}.tar.gz") |
| 16 | sha256sums=('5a2b29413e1a4a19e9a018924478c5174f508ef552b63154628a3c2679f60b02') |
| 17 | |
| 18 | build() { |
| 19 | cd "$srcdir/bluegit-${_commit}" |
| 20 | export CGO_ENABLED=0 |
| 21 | export GOFLAGS='-trimpath' |
| 22 | # De geïnstalleerde updater zet HOME op /var/lib/bluegit-build. Die map |
| 23 | # bestaat pas na tmpfiles, dus deze bouw mag daar niet schrijven. |
| 24 | export GOCACHE="${BUILDDIR:-$srcdir}/gocache" |
| 25 | export GOPATH="${BUILDDIR:-$srcdir}/gopath" |
| 26 | go build -ldflags='-s -w' -o bluegit ./cmd/bluegit |
| 27 | } |
| 28 | |
| 29 | package() { |
| 30 | cd "$srcdir/bluegit-${_commit}" |
| 31 | install -Dm755 bluegit "$pkgdir/usr/bin/bluegit" |
| 32 | install -Dm644 packaging/bluegit.service "$pkgdir/usr/lib/systemd/system/bluegit.service" |
| 33 | install -Dm644 packaging/bluegit.yml "$pkgdir/etc/bluegit/config.yml" |
| 34 | install -Dm644 packaging/storage.conf "$pkgdir/usr/share/bluegit/storage.conf.example" |
| 35 | install -Dm644 packaging/sysusers.conf "$pkgdir/usr/lib/sysusers.d/bluegit.conf" |
| 36 | install -Dm644 packaging/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/bluegit.conf" |
| 37 | install -Dm755 packaging/bluegit-update.sh "$pkgdir/usr/lib/bluegit/update" |
| 38 | install -Dm644 packaging/bluegit-update.service "$pkgdir/usr/lib/systemd/system/bluegit-update.service" |
| 39 | install -Dm644 packaging/bluegit-update.rules "$pkgdir/usr/share/polkit-1/rules.d/49-bluegit-update.rules" |
| 40 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 41 | } |