summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormochaaP2022-01-15 00:30:46 +0800
committermochaaP2022-01-15 00:30:46 +0800
commit7e161deed0e51bd4392498af57539bee9666ed93 (patch)
treebcd8d032189bfd313aebb91bc01e9b5a7993c632
downloadaur-7e161deed0e51bd4392498af57539bee9666ed93.tar.gz
chore: init
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD30
3 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c018cdd8ed49
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = relaygram
+ pkgdesc = NekoX compatible WebSocket relay
+ pkgver = 0.2.0
+ pkgrel = 1
+ url = https://github.com/traidento/relaygram
+ arch = x86_64
+ license = GPL
+ makedepends = go
+ source = https://github.com/traidento/relaygram/archive/v0.2.0.tar.gz
+ sha256sums = f1b2de65a3f86fa3ece02d9dc40e59bc3ca25411cd6b2e082d081d24e34fcb73
+
+pkgname = relaygram
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..48cf588794a8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg
+src
+*.tar.zst
+*.tar.zst.sig
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5c133d64283a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+pkgname=relaygram
+pkgver=0.2.0
+pkgrel=1
+pkgdesc='NekoX compatible WebSocket relay'
+arch=($CARCH)
+url="https://github.com/traidento/$pkgname"
+license=('GPL')
+makedepends=('go')
+source=("$url/archive/v$pkgver.tar.gz")
+sha256sums=('f1b2de65a3f86fa3ece02d9dc40e59bc3ca25411cd6b2e082d081d24e34fcb73')
+
+prepare(){
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o build ./...
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
+}