aboutsummaryrefslogtreecommitdiff
path: root/repo/rdpgw
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2023-12-01 20:26:38 +0800
committerKunoiSayami <[email protected]>2023-12-01 20:26:38 +0800
commita95a507cbb80a194d161a91367348c97ec4b7d5b (patch)
treeee94eb458bebd83be257f9072284e042e5ceabc0 /repo/rdpgw
parent2e23003dcce95b9bcd78cacd6fcb91da828dacbd (diff)
feat(add-pkg): Add rpdgw
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'repo/rdpgw')
-rw-r--r--repo/rdpgw/PKGBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/repo/rdpgw/PKGBUILD b/repo/rdpgw/PKGBUILD
new file mode 100644
index 0000000..c56dd1b
--- /dev/null
+++ b/repo/rdpgw/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: KunoiSayami <[email protected]>
+
+pkgname=rdpgw
+pkgver=2.0
+pkgrel=1
+pkgdesc='Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes'
+arch=('any')
+url=https://github.com/bolkedebruin/rdpgw
+source=(git+https://github.com/bolkedebruin/rdpgw.git#commit=e9e592b43a5d77d1f07ad58abdf2750a2514f7e4)
+license=('Apache-2.0')
+md5sums=('SKIP')
+makedepends=('go>=1.19')
+options=(!lto)
+depends=()
+provides=('rdpgw')
+
+prepare() {
+ cd "$srcdir/$pkgname/"
+ #git submodule update --init
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ #export CGO_LDFLAGS="-linkmode=external -extldflags \"${LDFLAGS}\""
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+ sed -i 's/$(LDFLAGS)/-linkmode=external -extldflags \"${LDFLAGS}\"/g' Makefile
+
+ make -j1
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ install -dm755 "$pkgdir"/usr/share/"$pkgname"/
+ install -dm755 "$pkgdir"/usr/share/license/"$pkgname"
+ install -dm755 "$pkgdir"/usr/bin
+
+ install -m755 build/"$pkgname" "$pkgdir"/usr/share/"$pkgname"/
+
+ install -Dm644 LICENSE.txt "$pkgdir"/usr/share/license/"$pkgname"/
+
+ ln -s /usr/share/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
+}