justfile: collapse 9p/dbus into default and kf5 variants

This commit is contained in:
Levi Neely 2026-07-27 08:53:25 +02:00
parent f8b6b499d1
commit 62f65ff9b0
1 changed files with 26 additions and 67 deletions

View File

@ -1,12 +1,8 @@
# Ollie monorepo build system
#
# Two paths (KF6, default):
# just 9P frontend: core, 9p, acme, httpgw, webui + install
# just dbus D-Bus frontend: core, dbus (ollied), kde, httpgw, webui + install
#
# KF5 variants (Plasma 5.27):
# just ninep-kf5 9P frontend with KF5/Qt5
# just dbus-kf5 D-Bus frontend with KF5/Qt5
# Two variants:
# just Default (KF6): core, 9p, acme, kde, httpgw, webui, emacs
# just kf5 KF5/Qt5 variant (Plasma 5.27)
#
# Build and install are separate phases. No sudo.
@ -16,21 +12,17 @@ home := env_var('HOME')
cfg := home / ".config/ollie"
bin := home / "bin"
# === Default (9P) path ===
default: build-9p install-9p
# === Default (KF6) path ===
default: build install
# === KF5 variants ===
ninep-kf5: build-ninep-kf5 install-ninep-kf5
# === KF5 variant ===
kf5: build-kf5 install-kf5
# === Build targets ===
build-9p: core ninep acme httpgw webui kde
build: core ninep acme httpgw webui kde
build-dbus: core dbus-bin kde httpgw webui
build-ninep-kf5: core ninep acme httpgw webui kde-kf5
build-dbus-kf5: core dbus-bin kde-kf5 httpgw webui
build-kf5: core ninep acme httpgw webui kde-kf5
core:
@echo === Building ollie-core ===
@ -41,10 +33,6 @@ ninep:
cd 9p && go build -buildvcs=false -o {{bin}}/olliesrv .
cd 9p && go build -buildvcs=false -o {{bin}}/ollie-9p-mount ./cmd/ollie-9p-mount/
dbus-bin:
@echo === Building ollie-dbus (ollied) ===
cd dbus && go build -o ollied .
acme:
@echo === Building ollie-acme ===
cd acme && go build -o {{bin}}/Ollie .
@ -77,16 +65,16 @@ kde-kf5:
# === Install targets ===
install-9p: test install-data install-scripts install-contrib install-kde install-el
install: test install-data install-scripts install-contrib install-kde install-el
install -m644 prompts/SYSTEM_PROMPT.md {{cfg}}/prompts/SYSTEM_PROMPT.md
install -m644 prompts/session-9p.md {{cfg}}/prompts/session.md
@echo === Install complete \(9P\) ===
@echo === Install complete ===
@echo 'Restart Plasma to pick up KDE plugins.'
install-ninep-kf5: test install-data install-scripts install-contrib install-kde-kf5 install-el
install-kf5: test install-data install-scripts install-contrib install-kde-kf5 install-el
install -m644 prompts/SYSTEM_PROMPT.md {{cfg}}/prompts/SYSTEM_PROMPT.md
install -m644 prompts/session-9p.md {{cfg}}/prompts/session.md
@echo === Install complete \(9P + KF5\) ===
@echo === Install complete \(KF5\) ===
@echo 'Restart Plasma to pick up KDE plugins.'
install-kde:
@ -281,15 +269,10 @@ uninstall:
rm -f {{bin}}/Ollie {{bin}}/Kmpl {{bin}}/Oi {{bin}}/Theo
rm -f {{bin}}/ollie-remount {{bin}}/ollie-watchdog
rm -rf {{cfg}}
# D-Bus daemon
pkill -u "$(id -u)" -x ollied 2>/dev/null; true
rm -f ~/.local/bin/ollied
rm -f ~/.config/autostart/org.ollie.SessionManager.desktop
# Service files
rm -f ~/.config/systemd/user/ollie.service
rm -f ~/.config/rc/init.d/ollie
rm -f ~/.config/autostart/org.ollie.olliesrv.desktop
# KDE
# KDE (KF6)
rm -f ~/.local/bin/ollie-tray ~/.local/bin/ollie-gui
rm -f ~/.local/bin/ollie-ask ~/.local/bin/ollie-session-here
rm -f ~/.local/share/applications/org.ollie.gui.desktop
@ -306,8 +289,8 @@ uninstall:
rm -f ~/.config/plasma-workspace/env/99-ollie.sh
@echo === Uninstall complete ===
uninstall-ninep-kf5:
@echo === Uninstalling ollie \(9P + KF5\) ===
uninstall-kf5:
@echo === Uninstalling ollie \(KF5\) ===
rm -f {{bin}}/olliesrv {{bin}}/ollie-9p-mount
rm -f {{bin}}/ollie-httpgw
rm -f {{bin}}/Ollie {{bin}}/Kmpl {{bin}}/Oi {{bin}}/Theo
@ -315,7 +298,6 @@ uninstall-ninep-kf5:
rm -rf {{cfg}}
# Service files
rm -f ~/.config/systemd/user/ollie.service
rm -f ~/.config/rc/init.d/ollie
rm -f ~/.config/autostart/org.ollie.olliesrv.desktop
# KDE (KF5)
rm -f ~/.local/bin/ollie-tray ~/.local/bin/ollie-gui
@ -333,23 +315,7 @@ uninstall-ninep-kf5:
rm -rf ~/.config/emacs/ellie
# Plasma env
rm -f ~/.config/plasma-workspace/env/99-ollie.sh
@echo === Uninstall complete \(9P + KF5\) ===
uninstall-kde-kf5:
@echo === Uninstalling ollie-kde \(KF5\) ===
rm -f ~/.local/bin/ollie-tray ~/.local/bin/ollie-gui
rm -f ~/.local/bin/ollie-ask ~/.local/bin/ollie-session-here
rm -f ~/.local/share/applications/org.ollie.gui.desktop
rm -f ~/.local/share/icons/hicolor/scalable/apps/ollie.svg
rm -f ~/.local/share/kio/servicemenus/ollie-actions.desktop
rm -f ~/.local/lib/qt5/plugins/kf5/krunner/krunner_ollie.so
rm -f ~/.local/lib/qt5/plugins/ktexteditor/ollie_kate.so
rm -rf ~/.local/share/plasma/plasmoids/org.ollie.plasmoid
rm -f ~/.local/share/metainfo/org.ollie.plasmoid.appdata.xml
rm -rf ~/.local/lib/x86_64-linux-gnu/qml/org/ollie
rm -f ~/.config/plasma-workspace/env/99-ollie.sh
kquitapp5 krunner 2>/dev/null; true
@echo === KF5 uninstall complete ===
@echo === Uninstall complete \(KF5\) ===
# === Test targets ===
@ -374,7 +340,6 @@ clean:
rm -f {{bin}}/olliesrv {{bin}}/ollie-9p-mount
rm -f {{bin}}/ollie-httpgw
rm -f {{bin}}/Ollie {{bin}}/Kmpl {{bin}}/Oi {{bin}}/Theo
rm -f dbus/ollied
rm -f {{bin}}/ollie-remote
rm -rf kde/build-cmake kde/build-kf5
@ -382,23 +347,17 @@ clean:
help:
@echo 'Ollie monorepo build targets:'
@echo ' just Build 9P path + install (default, KF6)'
@echo ' just dbus Build D-Bus path + install (KF6)'
@echo ' just ninep-kf5 Build 9P path + install (KF5)'
@echo ' just dbus-kf5 Build D-Bus path + install (KF5)'
@echo ' just build-9p Build only (9P): core, 9p, acme, httpgw, webui, kde'
@echo ' just build-dbus Build only (D-Bus): core, ollied, kde, httpgw, webui'
@echo ' just build-ninep-kf5 Build only (9P + KF5)'
@echo ' just build-dbus-kf5 Build only (D-Bus + KF5)'
@echo ' just install-9p Install with 9P prompt'
@echo ' just kde-kf5 Build KDE tools for KF5/Qt5 (Plasma 5.27)'
@echo ' just install-kde-kf5 Install KDE KF5 plugins'
@echo ' just uninstall-kde-kf5 Uninstall KDE KF5 plugins'
@echo ' just uninstall-ninep-kf5 Uninstall everything (9P + KF5)'
@echo ' just Build + install (default, KF6)'
@echo ' just kf5 Build + install (KF5/Qt5, Plasma 5.27)'
@echo ' just build Build only (KF6): core, 9p, acme, kde, httpgw, webui'
@echo ' just build-kf5 Build only (KF5): core, 9p, acme, kde-kf5, httpgw, webui'
@echo ' just install Install (KF6)'
@echo ' just install-kf5 Install (KF5)'
@echo ' just test Run all tests (core + 9p)'
@echo ' just test-core Run core tests'
@echo ' just test-9p Run 9p tests'
@echo ' just uninstall Remove all installed files'
@echo ' just uninstall Remove all installed files (KF6)'
@echo ' just uninstall-kf5 Remove all installed files (KF5)'
@echo ' just clean Clean build artifacts'
@echo ''
@echo 'Individual: just core | ninep | dbus-bin | acme | httpgw | webui | kde | kde-kf5'
@echo 'Individual: just core | ninep | acme | httpgw | webui | kde | kde-kf5 | ollie-remote'