Package Details: arrpc 3.4.0-3

Git Clone URL: https://aur.archlinux.org/arrpc.git (read-only, click to copy)
Package Base: arrpc
Description: Open Discord RPC server for atypical setups
Upstream URL: https://arrpc.openasar.dev/
Keywords: discord rpc
Licenses: MIT
Submitter: Freso
Maintainer: Freso (AutoUpdateBot)
Last Packager: Freso
Votes: 3
Popularity: 0.78
First Submitted: 2023-05-16 16:52 (UTC)
Last Updated: 2024-04-29 00:33 (UTC)

Required by (3)

Sources (2)

Latest Comments

1 2 Next › Last »

eevil commented on 2024-06-17 10:40 (UTC)

Shouldn't nodejs be added as a dependency to the PKGBUILD, as arrpc doesn't run without it?

XenHat commented on 2024-06-07 14:45 (UTC) (edited on 2024-06-07 14:46 (UTC) by XenHat)

For anyone trying to make this work, here's a full PKGBUILD with BrianAllred's and k1f0's fixes. I had to use makepkg --sync --install --force but I finally got it installed and running, systemd unit and all:

# Maintainer: Frederik “Freso” S. Olesen <archlinux@freso.dk>
# Contributor: Scarlett Veldt <scarlett AT enby DOT site>
pkgname=arrpc
pkgver=3.4.0
pkgrel=3
pkgdesc="Open Discord RPC server for atypical setups"
arch=('x86_64' 'x86_64_v3')
url="https://arrpc.openasar.dev/"
license=('MIT')
depends=("glibc" "gcc-libs" "nodejs")
makedepends=("npm")
# for some reason stripping the binary breaks it
options=(!strip)
install=arrpc.install
source=("$pkgname-$pkgver.tar.gz::https://github.com/OpenAsar/arrpc/archive/refs/tags/${pkgver}.tar.gz"
    "arrpc.service")
sha256sums=('8f1f2054e70221922f30920c3ef11cfdded1ddf7425f73c808c033bdc18a0911'
    'dccc409ef768766d8d4141f8d89366e0bbecd30d9b08d4d31856b01f180c4005')
build() {
    cd "${pkgname}-${pkgver}" || exit 1
    node update_db.js
    npm install
    npm pack
}

package() {
    cd "${pkgname}-${pkgver}" || exit 1
    npm install --cache "${srcdir}/npm-cache" \
        -g --prefix "${pkgdir}/usr" \
        "${pkgname}-${pkgver}.tgz"

    install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -D -m644 ../arrpc.service "${pkgdir}/usr/lib/systemd/user/arrpc.service"
}

BrianAllred commented on 2024-05-31 14:52 (UTC)

This needs nodejs as a runtime dependency. I removed it because none of my packages explicitly depended on it, and arrpc broke as a result.

/usr/bin/env: ‘node’: No such file or directory

k1f0 commented on 2024-05-11 19:59 (UTC) (edited on 2024-05-11 20:00 (UTC) by k1f0)

Adjusted again, this should now do it, also uses the updater script to pull the newest detectable DB before installing.

+build() {
+  cd "${pkgname}-${pkgver}"
+  node update_db.js
+  npm install
+  npm pack
+}
+
 package() {
+  cd "${pkgname}-${pkgver}"
   npm install --cache "${srcdir}/npm-cache" \
     -g --prefix "${pkgdir}/usr" \
-    "${srcdir}/${pkgname}-${pkgver}.tar.gz"
+    "${pkgname}-${pkgver}.tgz"

-  install -D -m644 "${pkgname}-${pkgver}"/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-  install -D -m644 arrpc.service "${pkgdir}/usr/lib/systemd/user/arrpc.service"
+  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -D -m644 ../arrpc.service "${pkgdir}/usr/lib/systemd/user/arrpc.service"
 }

theblu3j commented on 2024-05-04 21:33 (UTC) (edited on 2024-05-11 00:52 (UTC) by theblu3j)

k1f0's solution works for me, you might have just made a typo? edit: It worked once, no longer. Cloning and running the GitHub source works.

echolessowl commented on 2024-05-04 19:16 (UTC)

doesn't install correctly, changing the pkgbuild to what k1f0 suggested below spits out a 0kb package that doesn't work.

k1f0 commented on 2024-04-29 01:04 (UTC) (edited on 2024-04-29 01:06 (UTC) by k1f0)

This currently doesn't build due to upstream not being a packed npm package yet. We need to manually do that. Below works fine for me.

+build() {
+  cd "${pkgname}-${pkgver}"
+  rm -rf .github/
+  npm install
+  npm pack
+}
+
 package() {
+  cd "${pkgname}-${pkgver}"
   npm install --cache "${srcdir}/npm-cache" \
     -g --prefix "${pkgdir}/usr" \
-    "${srcdir}/${pkgname}-${pkgver}.tar.gz"
-
-  install -D -m644 "${pkgname}-${pkgver}"/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-  install -D -m644 arrpc.service "${pkgdir}/usr/lib/systemd/user/arrpc.service"
+    "${pkgname}-${pkgver}.tgz"
+  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -D -m644 ../arrpc.service "${pkgdir}/usr/lib/systemd/user/arrpc.service"
 }

Yamashiro commented on 2024-04-28 21:26 (UTC)

I'm not sure what pm2 does or is needed? Either way I see that it's available in the official repos as well. But even just running npm install inside the cloned repository and then node src will start arrpc without it immediatelly failing.

So I guess this package needs to be updated to the current commit and remove the patches. Should the package be marked as out-of-date then?

tickbase commented on 2024-04-26 11:03 (UTC)

Cloning the github project and running it from there seems to work just fine but the aur package as of now is fully broken. For now here is a solution to run arrpc on your pc and on startup.

Step 1: Install pm2 and start arRPC

cd arrpc
npm install pm2
./node_modules/.bin/pm2 start src

Step 2: Create a systemd service file

sudo nano /etc/systemd/system/arrpc.service
[Unit]
Description=arRPC Service
After=network.target

[Service]
ExecStart=/usr/bin/node /path/to/arrpc/src
Restart=always
User=<your-user-name>
Group=<your-group-name>
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/path/to/arrpc

[Install]
WantedBy=multi-user.target

Then run the following commands:

sudo systemctl daemon-reload
sudo systemctl enable arrpc
sudo systemctl start arrpc
sudo systemctl status arrpc

If you encounter an error, run pm2 logs --no-daemon and check the log for errors. If you see ER_UNSUPPORTED_DIR_IMPORT, edit package.json and add "type": "commonjs" under "main": "src/index.js".