add Arch Linux packaging

- Bundle the server into dist/rotrouter.cjs with esbuild (npm run build),
  so the package needs only nodejs at runtime and is arch=any.
- Read the config and static file paths from ROTROUTER_CONFIG and
  ROTROUTER_PUBLIC (defaults unchanged for npm start).
- PKGBUILD for rotrouter-git and a hardened systemd unit running as a
  DynamicUser without capabilities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 04:17:27 +00:00
co-authored by Claude Opus 5.5
parent fb1c733699
commit 65ccd1a025
6 changed files with 213 additions and 111 deletions
+3 -2
View File
@@ -8,8 +8,8 @@
"main": "src/index.ts",
"scripts": {
"start": "tsx src/index.ts",
"typecheck": "tsc --noEmit",
"test": "echo \"Error: no test specified\" && exit 1"
"build": "esbuild src/index.ts --bundle --platform=node --target=node22 --format=cjs --outfile=dist/rotrouter.cjs --external:bufferutil --external:utf-8-validate",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@hono/node-server": "^1.19.11",
@@ -19,6 +19,7 @@
},
"devDependencies": {
"@types/node": "^25.5.0",
"esbuild": "^0.27.7",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
}