aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--repo/ksutils-github-webhook/PKGBUILD37
-rw-r--r--repo/ksutils-github-webhook/default.toml9
-rw-r--r--repo/ksutils-github-webhook/[email protected]16
-rw-r--r--repo/ksutils-probe-client/PKGBUILD6
5 files changed, 65 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 48e23b6..e152bcc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,4 @@
default:
- tags:
- - medium
image:
archlinux:latest
diff --git a/repo/ksutils-github-webhook/PKGBUILD b/repo/ksutils-github-webhook/PKGBUILD
new file mode 100644
index 0000000..2e4c1ad
--- /dev/null
+++ b/repo/ksutils-github-webhook/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: KunoiSayami <[email protected]>
+
+_basename=github-webhook
+pkgname=ksutils-$_basename
+pkgver=1.0.0
+pkgrel=1
+pkgdesc='A simple webhook server forward message to telegram'
+arch=('any')
+url=https://github.com/KunoiSayami/github-webhook-notification.rs
+source=(
+ git://github.com/KunoiSayami/github-webhook-notification.rs#tag=1.0.0
+ "default.toml")
+license=('AGPL3')
+sha512sums=(
+ 'SKIP'
+ '393f3e06466e3dc6b4e550e0257279094430fab65b44c44d7c09cd6c2b26d200cd3b6aa6bc72d417c20b700a3b0f5e9a4845dddc3511d9dbaba0c3d8ff31b869'
+ '8014c6784febd857a47b9f4460d537a0a967a15fa33c6b8b2ccec382125219530f1d2cd25e406b14a902088e2c1693ed68ea43d4f4daab04829129d89ff9b803')
+makedepends=('cargo' 'git')
+depends=('systemd')
+provides=("$_basename")
+options=(!lto)
+
+build() {
+ cd "$_basename"
+ cargo build --release
+}
+
+package() {
+ install -dm700 "$pkgdir"/etc/ksutils/$_basename
+ install -dm755 "$pkgdir"/usr/bin
+ install -dm755 "$pkgdir"/usr/lib/systemd/system
+
+ install -m755 "$_basename"/target/release/"$_basename" "$pkgdir"/usr/bin/"$pkgname"
+ install -m600 default.toml "$pkgdir"/etc/ksutils/$_basename/
+ install -m644 "[email protected]" "$pkgdir"/usr/lib/systemd/system/
+}
diff --git a/repo/ksutils-github-webhook/default.toml b/repo/ksutils-github-webhook/default.toml
new file mode 100644
index 0000000..3b85e64
--- /dev/null
+++ b/repo/ksutils-github-webhook/default.toml
@@ -0,0 +1,9 @@
+[server]
+bind = ""
+port = 25511
+secrets = ""
+token = ""
+
+[telegram]
+bot_token = ""
+send_to = 0 \ No newline at end of file
diff --git a/repo/ksutils-github-webhook/[email protected] b/repo/ksutils-github-webhook/[email protected]
new file mode 100644
index 0000000..f2c677c
--- /dev/null
+++ b/repo/ksutils-github-webhook/[email protected]
@@ -0,0 +1,16 @@
+[Unit]
+Description=KunoiSayami utils GitHub webhook server
+After=network-online.target
+
+[Service]
+Type=simple
+Restart=on-failure
+RestartSec=10s
+Environment="RUST_LOG=info"
+ExecStart=/usr/bin/ksutils-github-webhook -c %i.toml
+WorkingDirectory=/etc/ksutils/github-webhook/
+KillSignal=SIGINT
+TimeoutStopSec=10
+
+[Install]
+WantedBy=multi-user.target
diff --git a/repo/ksutils-probe-client/PKGBUILD b/repo/ksutils-probe-client/PKGBUILD
index 7e11cf8..1dfb43a 100644
--- a/repo/ksutils-probe-client/PKGBUILD
+++ b/repo/ksutils-probe-client/PKGBUILD
@@ -17,7 +17,7 @@ sha512sums=(
'2895477aef4263fd9cb5fd7d594e064817872c298d30a46676b94274f542b31f0127be339d59d901c5f5691baf14b21861eea4b4b416a457bf9a6f371bd1bf82'
'4750135cc721b513a009c1e656bb8a128ee5930eafa8976f0961258622a6af28c67f6eab89250be8d8cb4268b5c5b156b6b92cafdf130ffbc67d373a1ffb3b12')
makedepends=('cargo' 'git')
-depends=('openssl' 'systemd')
+depends=('systemd')
provides=("$_basename")
options=(!lto)
@@ -27,11 +27,11 @@ build() {
}
package() {
- install -dm700 "$pkgdir"/etc/ksutils/probe-client
+ install -dm700 "$pkgdir"/etc/ksutils/$_basename
install -dm755 "$pkgdir"/usr/bin
install -dm755 "$pkgdir"/usr/lib/systemd/system
install -m755 "$_basename"/target/release/"$_basename" "$pkgdir"/usr/bin/"$pkgname"
- install -m600 default.toml "$pkgdir"/etc/ksutils/probe-client/
+ install -m600 default.toml "$pkgdir"/etc/ksutils/$_basename/
install -m644 "[email protected]" "$pkgdir"/usr/lib/systemd/system/
}