aboutsummaryrefslogtreecommitdiff
path: root/apks/s4o/APKBUILD
blob: 50cb59b13be6f0c7bddddfe71916c6ec532cee1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me>
pkgname=s4o
pkgver=0.1.0
pkgrel=3
pkgdesc="Static server behing single sign on"
url="https://git.sr.ht/~gabrielgio/s4o"
arch="x86_64"
license="MIT"
makedepends="
    go
"
builddir="$srcdir/$pkgname-v$pkgver/"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="
    ${pkgname}-${pkgver}.tar.gz::https://artifacts.gabrielgio.me/archive/${pkgname}/${pkgname}-v${pkgver}.tar.gz
"

build() {
    go mod vendor
    go build \
        -trimpath \
        -mod=vendor \
        -ldflags="-X 'main.Version=${pkgver}'" \
        .
}

package() {
	install -Dm755 "$pkgname" "$pkgdir"/usr/lib/"$pkgname"/"$pkgname"

    mkdir -p "$pkgdir"/usr/bin

    ln -s /usr/lib/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
}

sha512sums="
bc165a49aaedd72be4df129c7db2b4f5f41c56ce3f573b35c29f8c616236eb50ef65d19e2e879c682322914c960d118b01928ee916b35afbebd205d1bf38e389  s4o-0.1.0.tar.gz
"