summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD26
-rw-r--r--tgp.service11
3 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..65be8e2602c7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = tgp
+ pkgdesc = tgp telegram proxy
+ pkgver = 0.2.1
+ pkgrel = 1
+ url = https://github.com/geovex/tgp
+ arch = x86_64
+ arch = aarch64
+ arch = i686
+ makedepends = git
+ makedepends = go
+ source = https://github.com/geovex/tgp/archive/refs/tags/v0.2.1.tar.gz
+ source = tgp.service
+ sha256sums = d7925af3354e348c9910fbe353fab76500f9a84eef981ce5bb55bfdbc881fa9b
+ sha256sums = 61a78cb68d8e86ffbcb5e8a4328bd3581548531cc6fe5b02f6058176c97566b2
+
+pkgname = tgp
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c2152ab6ce65
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: geov <code@mail.geov.name>
+
+pkgname=tgp
+pkgrel=1
+pkgver=0.2.1
+pkgdesc="tgp telegram proxy"
+arch=('x86_64' 'aarch64' 'i686')
+url="https://github.com/geovex/tgp"
+makedepends=('git' 'go')
+source=(
+ "https://github.com/geovex/tgp/archive/refs/tags/v${pkgver}.tar.gz"
+ tgp.service
+)
+sha256sums=('d7925af3354e348c9910fbe353fab76500f9a84eef981ce5bb55bfdbc881fa9b'
+ '61a78cb68d8e86ffbcb5e8a4328bd3581548531cc6fe5b02f6058176c97566b2')
+
+build() {
+ cd $pkgname-$pkgver
+ export GOFLAGS="-trimpath"
+ go build ./cmd/tgp
+}
+
+package() {
+ install -Dm755 "$pkgname-$pkgver/tgp" "$pkgdir/usr/bin/tgp"
+ install -Dm644 "tgp.service" "$pkgdir/usr/lib/systemd/system/tgp.service"
+}
diff --git a/tgp.service b/tgp.service
new file mode 100644
index 000000000000..15da3e57135e
--- /dev/null
+++ b/tgp.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=tgp telegram proxy
+After=network.target
+
+[Service]
+StandardOutput=syslog
+StandardError=syslog
+ExecStart=/usr/bin/tgp /etc/tgp.toml
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file