| 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 | export GOFLAGS='-trimpath' |
| 20 | go build -ldflags='-s -w' -o "$srcdir/bluegit" ./cmd/bluegit |
| 21 | } |
| 22 | |
| 23 | package() { |
| 24 | local root |
| 25 | root="$(cd "$startdir/../.." && pwd)" |
| 26 | install -Dm755 "$srcdir/bluegit" "$pkgdir/usr/bin/bluegit" |
| 27 | install -Dm644 "$root/packaging/bluegit.service" "$pkgdir/usr/lib/systemd/system/bluegit.service" |
| 28 | install -Dm644 "$root/packaging/bluegit.yml" "$pkgdir/etc/bluegit/config.yml" |
| 29 | install -Dm644 "$root/packaging/storage.conf" "$pkgdir/usr/share/bluegit/storage.conf.example" |
| 30 | install -Dm644 "$root/packaging/sysusers.conf" "$pkgdir/usr/lib/sysusers.d/bluegit.conf" |
| 31 | install -Dm644 "$root/packaging/tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/bluegit.conf" |
| 32 | } |