summaryrefslogtreecommitdiffhomepage
path: root/packaging/dispatch.install
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-05-27 23:17:18 +0900
committerAdam Malczewski <[email protected]>2026-05-27 23:17:18 +0900
commit60f56367dfc1e3c5095d034bed4fb4f572e32b55 (patch)
treeaa4bc7be095e7030ce0b1a67e33b1abe4cc8c36a /packaging/dispatch.install
parent4f0ed4ed9456e30344228f0106f6bb104417da3d (diff)
downloaddispatch-60f56367dfc1e3c5095d034bed4fb4f572e32b55.tar.gz
dispatch-60f56367dfc1e3c5095d034bed4fb4f572e32b55.zip
refactor(packaging): split into dispatch/dispatch-systemd/dispatch-s6, separate dispatch-electron, add bun-based frontend serve
PKGBUILD is now a split package producing three .pkg.tar.zst files in one makepkg run: - dispatch base application files (/opt/dispatch), CLI wrappers (dispatch-api, dispatch-frontend), env configs (/etc/dispatch/dispatch-api.conf, /etc/dispatch/dispatch-frontend.conf) - dispatch-systemd systemd user units for dispatch-api + dispatch-frontend (conflicts with dispatch-s6) - dispatch-s6 s6-rc service pipelines (-srv + -log) for both services (conflicts with dispatch-systemd) The Electron desktop wrapper moved to its own self-contained PKGBUILD at packaging/electron/, producing dispatch-electron. It bundles its own copy of the frontend dist + electron entry points under /opt/dispatch-electron and does not depend on the base dispatch package, so users can install it standalone and point VITE_API_URL at any backend at build time. Files under packaging/ are now read directly from ${_projectdir}/packaging/ rather than via source=(); the two s6 service dirs share basenames (run, type) which would collide inside ${srcdir}. New frontend static server: packages/frontend/serve.ts uses Bun's built-in HTTP server (no extra runtime deps) with SPA fallback to index.html and path-traversal protection. PORT/HOST/DIST_DIR overridable via env. Exposed as 'bun run --cwd packages/frontend serve' and via /usr/bin/dispatch-frontend. Build scripts: - bin/build-pkg now prints the freshest built packages - bin/install-pkg installs dispatch + dispatch-systemd by default; accepts package names or --all; searches both packaging/ and packaging/electron/ - bin/build-pkg-electron new, builds the electron split - bin/build-pkg-windows replaces bin/windows-pkg; drops the hard-coded WSL copy step, just prints the win-unpacked path .gitignore extended to cover packaging/*.tar.zst and packaging/electron/{src,pkg,*.pkg.tar.zst,*.tar.zst}.
Diffstat (limited to 'packaging/dispatch.install')
-rw-r--r--packaging/dispatch.install29
1 files changed, 22 insertions, 7 deletions
diff --git a/packaging/dispatch.install b/packaging/dispatch.install
index 7d1439f..76837f5 100644
--- a/packaging/dispatch.install
+++ b/packaging/dispatch.install
@@ -1,16 +1,31 @@
post_install() {
echo ""
- echo "==> Dispatch has been installed."
- echo " Edit /etc/dispatch/dispatch-api.conf to configure the API."
- echo " Then enable and start the service:"
- echo " systemctl --user enable --now dispatch-api"
+ echo "==> Dispatch (base) has been installed."
+ echo " Application files: /opt/dispatch"
+ echo " Config:"
+ echo " /etc/dispatch/dispatch-api.conf"
+ echo " /etc/dispatch/dispatch-frontend.conf"
+ echo ""
+ echo " Run manually:"
+ echo " dispatch-api # backend (port 18390 by default)"
+ echo " dispatch-frontend # static frontend (port 18391 by default)"
+ echo ""
+ echo " To run as a service, install one of:"
+ echo " pacman -S dispatch-systemd # systemd user services"
+ echo " pacman -S dispatch-s6 # s6 services (Artix)"
+ echo ""
+ echo " For the Electron desktop wrapper:"
+ echo " pacman -S dispatch-electron"
echo ""
}
post_upgrade() {
echo ""
- echo "==> Dispatch has been upgraded."
- echo " You may need to restart the service:"
- echo " systemctl --user restart dispatch-api"
+ echo "==> Dispatch (base) upgraded."
+ echo " If you use dispatch-systemd, restart the units:"
+ echo " systemctl --user restart dispatch-api dispatch-frontend"
+ echo " If you use dispatch-s6, restart the services:"
+ echo " s6-svc -r /run/service/dispatch-api"
+ echo " s6-svc -r /run/service/dispatch-frontend"
echo ""
}