2023-12-28 16:00:04 +05:00
|
|
|
pkgname=gonx
|
2024-03-10 18:19:13 +05:00
|
|
|
pkgver=0.0.4
|
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
|
|
|
|
}
|