apkbuilds @ eed21034efae03ee661e06122f96dc01e53afaa4

 1# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
 2pkgname=s4o
 3pkgver=0.1.1
 4pkgrel=3
 5pkgdesc="Static server behing single sign on"
 6url="https://git.sr.ht/~gabrielgio/s4o"
 7arch="x86_64"
 8license="MIT"
 9makedepends="
10    go
11"
12builddir="$srcdir/$pkgname-v$pkgver/"
13install="$pkgname.pre-install"
14subpackages="$pkgname-openrc"
15source="
16    ${pkgname}-${pkgver}.tar.gz::https://artifacts.gabrielgio.me/${pkgname}/${pkgname}-v${pkgver}.tar.gz
17"
18
19build() {
20    go mod vendor
21    go build \
22        -trimpath \
23        -mod=vendor \
24        -ldflags="-X 'main.Version=${pkgver}'" \
25        .
26}
27
28package() {
29	install -Dm755 "$pkgname" "$pkgdir"/usr/lib/"$pkgname"/"$pkgname"
30
31    mkdir -p "$pkgdir"/usr/bin
32
33    ln -s /usr/lib/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
34}
35
36sha512sums="
37a114bfe718d95ad5157aa55870b6bceb61dfcea7e0cb5d76b2ecd3b29a266d1c1e8c1204a4020da798a8bd24210b3eccdf1779311b524897458be511652692ba  midr-0.1.1.tar.gz
38b540b2a8210ef525226ca798f39866bebcd60e2c17296e4d256dc6e8e887f37f493835c4e9f25c5ef7e6cee3e903f91afdbf2abf8bcb903c1a485c89b1e85411  midr.initd
39eaa355698e89b978c2158360802fa7ced7ead961187a0145af862fac09704b73d4e22e906a280c87e2280d2567dde0644382c5b226cb18d4165750a0a029d79f  midr.confd
40"