arrpc
This commit is contained in:
parent
38537e3a63
commit
60a70baa48
11
arrpc/arrpc.service
Normal file
11
arrpc/arrpc.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=arRPC Discord RPC daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/arrpc
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
15
arrpc/async.patch
Normal file
15
arrpc/async.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- index.js 2023-03-10 18:32:51.934337975 -0500
|
||||
+++ index.js 2023-03-10 18:34:27.619332243 -0500
|
||||
@@ -6,6 +6,9 @@
|
||||
import * as Bridge from './bridge.js';
|
||||
import Server from './server.js';
|
||||
|
||||
-const server = await new Server();
|
||||
+async function main() {
|
||||
+ const server = await new Server();
|
||||
+ server.on('activity', data => Bridge.send(data));
|
||||
+}
|
||||
|
||||
-server.on('activity', data => Bridge.send(data));
|
||||
\ No newline at end of file
|
||||
+main();
|
32
arrpc/lure.sh
Normal file
32
arrpc/lure.sh
Normal file
@ -0,0 +1,32 @@
|
||||
name='arrpc'
|
||||
version='3.3.1'
|
||||
release='1'
|
||||
desc='Open Discord RPC server for atypical setups'
|
||||
homepage='https://electronjs.org'
|
||||
maintainer="Евгений Храмов <xpamych@yandex.ru>"
|
||||
architectures=('amd64')
|
||||
license=('MIT')
|
||||
provides=('arrpc')
|
||||
conflicts=('arrpc-git')
|
||||
|
||||
deps=('glibc' 'gcc-libs')
|
||||
build_deps=('npm' 'git')
|
||||
|
||||
sources=("git+https://github.com/OpenAsar/arrpc.git")
|
||||
checksums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/arrpc/"
|
||||
patch ./src/index.js ../async.patch
|
||||
npm i esbuild pkg
|
||||
# use node 18 as pkg apparently doesn't support 19 yet
|
||||
npx esbuild --bundle --platform=node --target=node18 --outdir=dist ./src/index.js
|
||||
npx pkg -t node18-linux-x64 -o arrpc ./dist/index.js
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/arrpc"
|
||||
install-binary ./arrpc
|
||||
install-license ./LICENSE
|
||||
install-systemd-user ../arrpc.service
|
||||
}
|
Loading…
Reference in New Issue
Block a user