| 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 | go build -ldflags='-s -w' -o bluegit ./cmd/bluegit |
| 23 | } |
| 24 | |
| 25 | package() { |
| 26 | cd "$srcdir/bluegit-${_commit}" |
| 27 | install -Dm755 bluegit "$pkgdir/usr/bin/bluegit" |
| 28 | install -Dm644 packaging/bluegit.service "$pkgdir/usr/lib/systemd/system/bluegit.service" |
| 29 | install -Dm644 packaging/bluegit.yml "$pkgdir/etc/bluegit/config.yml" |
| 30 | install -Dm644 packaging/storage.conf "$pkgdir/usr/share/bluegit/storage.conf.example" |
| 31 | install -Dm644 packaging/sysusers.conf "$pkgdir/usr/lib/sysusers.d/bluegit.conf" |
| 32 | install -Dm644 packaging/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/bluegit.conf" |
| 33 | install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 34 | } |