1
0
mirror of https://github.com/nxshock/gonx.git synced 2024-11-27 17:11:01 +05:00
gonx/PKGBUILD

24 lines
662 B
Bash
Raw Normal View History

2023-12-28 16:00:04 +05:00
pkgname=gonx
2023-12-29 12:16:35 +05:00
pkgver=0.0.3
2023-12-28 16:00:04 +05:00
pkgrel=1
pkgdesc='Simple reverse proxy server'
arch=('x86_64' 'aarch64')
url="https://github.com/nxshock/$pkgname"
license=('MIT')
makedepends=('go' 'git')
2023-12-28 16:15:54 +05:00
source=("git+https://github.com/nxshock/$pkgname#tag=v$pkgver")
2023-12-28 16:00:04 +05:00
sha256sums=('SKIP')
backup=("etc/$pkgname.conf")
build() {
2023-12-28 16:15:54 +05:00
cd "$pkgname"
2023-12-28 16:00:04 +05:00
go build -o "$pkgname" -ldflags "-linkmode=external -s -w" -buildmode=pie -trimpath -mod=readonly -modcacherw
}
package() {
2023-12-28 16:15:54 +05:00
cd "$pkgname"
2023-12-28 16:00:04 +05:00
install -Dm755 "$pkgname" "$pkgdir"/usr/bin/$pkgname
install -Dm644 "$pkgname.conf" "$pkgdir/etc/$pkgname.conf"
install -Dm755 $pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service
}