summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authordatabase641282022-11-26 12:45:40 +0800
committerdatabase641282022-11-26 12:45:40 +0800
commit23ba32574cfcabdae04298be97a420b0511dfea6 (patch)
treea5a8cae8e272e2f1317f6d174ee66c6a9b2704cf /PKGBUILD
downloadaur-conn-opener-go-git.tar.gz
🌊 Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0e1e7c5a2d55
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: database64128 <free122448@hotmail.com>
+
+_pkgname=conn-opener-go
+pkgname=$_pkgname-git
+pkgver=1.0.0.r0.g42ca2f6
+pkgrel=1
+pkgdesc="Open and maintain the specified number of connections to a network endpoint"
+arch=('x86_64' 'aarch64')
+url="https://github.com/database64128/$_pkgname"
+license=('GPL3')
+makedepends=('git' 'go')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+source=("$pkgname::git+$url.git")
+b2sums=('SKIP')
+
+pkgver() {
+ cd $pkgname
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd $pkgname
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -ldflags='-s -w -linkmode=external'
+}
+
+package() {
+ cd $pkgname
+ install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
+}