summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authororhun2020-08-22 19:13:04 +0300
committerorhun2020-08-22 19:13:04 +0300
commitbcbd5d33be761714e4001f1ffc39a19c2a975468 (patch)
tree086dd957c3979d70e29ad18aded2b75faa845c04 /PKGBUILD
downloadaur-bcbd5d33be761714e4001f1ffc39a19c2a975468.tar.gz
Initial upload: passwall-server-git 1.1.2.r5.g11d7778-1
Add passwall-server-git
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 33 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d312bb07c668
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: orhun <orhunparmaksiz@gmail.com>
+pkgname=passwall-server-git
+pkgdesc="Core backend infrastructure of the PassWall platform (git)"
+pkgver=1.1.2.r5.g11d7778
+pkgrel=1
+arch=('x86_64')
+url="https://github.com/passwall/passwall-server"
+license=('AGPL3')
+depends=('git')
+makedepends=('go')
+conflicts=("${pkgname%-bin}" "${pkgname%-bin}-git")
+source=("git+$url")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}/cmd/${pkgname%-git}"
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}/cmd/${pkgname%-git}"
+ go get -d ./...
+ go build \
+ -gcflags "all=-trimpath=$PWD" \
+ -asmflags "all=-trimpath=$PWD" \
+ -ldflags "-extldflags $LDFLAGS" \
+ -o "${pkgname%-git}" .
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}/cmd/${pkgname%-git}"
+ install -Dm 755 "${pkgname%-git}" "$pkgdir/usr/local/bin/${pkgname%-git}"
+}