summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNebulaNeko2019-09-01 11:07:45 +0800
committerNebulaNeko2019-09-01 11:07:45 +0800
commitd7e35f1b95b90608ed1f6a0e7fc372602a6762c3 (patch)
tree0bd41cfd7e683ff259f6bb28189706826f2b6ef3
downloadaur-d7e35f1b95b90608ed1f6a0e7fc372602a6762c3.tar.gz
init commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD28
-rw-r--r--config.json7
-rw-r--r--coolq-cqhttp-api.install12
-rw-r--r--tmpfiles.d3
5 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ce32e3a9465c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = coolq-cqhttp-api-bin
+ pkgdesc = CoolQ 插件实现通过 HTTP 上报事件信息及调用接口
+ pkgver = 4.10.1
+ pkgrel = 1
+ url = https://github.com/richardchien/coolq-http-api
+ install = coolq-cqhttp-api.install
+ arch = any
+ groups = eqs
+ license = GPL3
+ depends = coolq
+ provides = coolq-cqhttp-api
+ backup = etc/coolq/app/io.github.richardchien.coolqhttpapi/config.json
+ source = https://github.com/richardchien/coolq-http-api/releases/download/v4.10.1/io.github.richardchien.coolqhttpapi.cpk
+ source = config.json
+ source = tmpfiles.d
+ sha512sums = d4da9f4fa15f7a2d67e12a9bb967cb20201203fb4f766ca7c8dba5b190d8b139535d087305bdd326055b9f7d6fb82e2173fe08c651de16e80aead6707ed6481f
+ sha512sums = e35f4c0b1061e38f88459035fb23ba6658a26d8f9d5b56ce96bb9d0a5afab18a376274f837b72c3efcf700ae8157d6363ae89f074cec8a454d24ddb11b12aed8
+ sha512sums = 991cb2da80f16f47a49b439c8f42acef9d112d9a88e29cb6ea972e2c3957ab49cbb95a9a6aa3403be8a2cf38ffa09f08be4648a45cff4d46a50fb165a2fa4a05
+
+pkgname = coolq-cqhttp-api-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a4a005a8b460
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: NebulaNeko <chfsefefgesfen foxmail>
+
+_pkgname=coolq-cqhttp-api
+pkgname=${_pkgname}-bin
+pkgver=4.10.1
+pkgrel=1
+pkgdesc="CoolQ 插件实现通过 HTTP 上报事件信息及调用接口"
+arch=(any)
+url="https://github.com/richardchien/coolq-http-api"
+license=('GPL3')
+groups=(eqs)
+backup=(etc/coolq/app/io.github.richardchien.coolqhttpapi/config.json)
+depends=(coolq)
+provides=(coolq-cqhttp-api)
+install=coolq-cqhttp-api.install
+source=("https://github.com/richardchien/coolq-http-api/releases/download/v$pkgver/io.github.richardchien.coolqhttpapi.cpk"
+ config.json
+ tmpfiles.d)
+sha512sums=('d4da9f4fa15f7a2d67e12a9bb967cb20201203fb4f766ca7c8dba5b190d8b139535d087305bdd326055b9f7d6fb82e2173fe08c651de16e80aead6707ed6481f'
+ 'e35f4c0b1061e38f88459035fb23ba6658a26d8f9d5b56ce96bb9d0a5afab18a376274f837b72c3efcf700ae8157d6363ae89f074cec8a454d24ddb11b12aed8'
+ '991cb2da80f16f47a49b439c8f42acef9d112d9a88e29cb6ea972e2c3957ab49cbb95a9a6aa3403be8a2cf38ffa09f08be4648a45cff4d46a50fb165a2fa4a05')
+
+package() {
+ install -Dm644 io.github.richardchien.coolqhttpapi.cpk "$pkgdir/usr/lib/coolq/app/io.github.richardchien.coolqhttpapi.cpk"
+ install -Dm644 config.json "$pkgdir/etc/coolq/app/io.github.richardchien.coolqhttpapi/config.json"
+
+ install -Dm644 tmpfiles.d "$pkgdir/usr/lib/tmpfiles.d/coolq-cqhttp-api.conf"
+}
diff --git a/config.json b/config.json
new file mode 100644
index 000000000000..25d8755ae586
--- /dev/null
+++ b/config.json
@@ -0,0 +1,7 @@
+{
+ "general": {
+ "host": "127.0.0.1",
+ "post_url": "http://127.0.0.1:8000",
+ "post_message_format": "array"
+ }
+}
diff --git a/coolq-cqhttp-api.install b/coolq-cqhttp-api.install
new file mode 100644
index 000000000000..7bf62cf075ba
--- /dev/null
+++ b/coolq-cqhttp-api.install
@@ -0,0 +1,12 @@
+# Thanks aur#cow-proxy
+post_install() {
+ post_upgrade
+}
+
+post_upgrade() {
+cat << EOF
+ Please execute:
+ novnc --vnc 127.0.0.1:6133 --listen 9801
+ and enable HTTP API app in coolq
+EOF
+}
diff --git a/tmpfiles.d b/tmpfiles.d
new file mode 100644
index 000000000000..f7855f94e988
--- /dev/null
+++ b/tmpfiles.d
@@ -0,0 +1,3 @@
+d /var/log/coolq/app/io.github.richardchien.coolqhttpapi 0755 coolq coolq
+d /var/lib/coolq/data/app/io.github.richardchien.coolqhttpapi/ 0755 coolq coolq
+L /var/lib/coolq/data/app/io.github.richardchien.coolqhttpapi/log 0755 coolq coolq - /var/log/coolq/app/io.github.richardchien.coolqhttpapi