Commit 57d82fdfbbdef2dceedeedd828ddb3981259541e

Thomas de Grivel 2022-12-04T00:24:55

cl-unix-cybernetics

diff --git a/.gitignore b/.gitignore
index 84c048a..641d98d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /build/
+/release/
diff --git a/Makefile b/Makefile
index 4f8385d..4c339b4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
 ## Adams - UNIX system administration tool written in Common Lisp
 ## Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
 
-PACKAGE = adams
+PACKAGE = cl-unix-cybernetics
 VERSION = 0.3.2
 RELEASE_DIR = ${PACKAGE}-${VERSION}
 RELEASE_TARBALL = ${PACKAGE}-${VERSION}.tar.gz
 RELEASE_DEPS_TARBALL = ${PACKAGE}-${VERSION}.deps.tar.gz
-PROGRAM = build/adams
+PROGRAM = build/cl-unix-cybernetics
 PREFIX = /usr/local
 LISP = sbcl --dynamic-space-size 2048
 LISP_LOAD = ${LISP} --load
@@ -22,7 +22,7 @@ build/systems.lisp: prepare-build.lisp adams.asd
 	LANG=C.UTF-8 ${LISP_LOAD} prepare-build.lisp --quit
 
 ${PROGRAM}: build.lisp config.lisp build/systems.lisp toplevel.lisp
-	LANG=C.UTF-8 ${LISP_LOAD} build.lisp --quit
+	LANG=C.UTF-8 ${LISP_LOAD} build.lisp --eval '(build "${PROGRAM}")' --quit
 
 install:
 	install -m 0755 ${PROGRAM} ${PREFIX}/bin
diff --git a/README.md b/README.md
index 3408ef9..846f01e 100644
--- a/README.md
+++ b/README.md
@@ -9,14 +9,6 @@ The properties are then probed and synchronized by Adams using only
 `/bin/sh` on the remote host, and `/usr/bin/ssh` on the control host.
 
 
-Configuration example
----------------------
-
-Check out
-<https://github.com/kmx-io/kmx-io/>
-for a detailed example of Adams usage.
-
-
 Current status
 --------------
 
diff --git a/adams.asd b/adams.asd
deleted file mode 100644
index 00eab78..0000000
--- a/adams.asd
+++ /dev/null
@@ -1,61 +0,0 @@
-;; Adams - UNIX system administration tool written in Common Lisp
-;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
-
-(defpackage :adams.system
-  (:use :cl :asdf))
-
-(in-package :adams.system)
-
-(defsystem :adams
-  :name "adams"
-  :author "Thomas de Grivel <thoxdg@gmail.com>"
-  :version "0.1"
-  :description "Remote system administration tools"
-  :depends-on ("alexandria"
-	       "chronicity"
-	       "cl-base64"
-	       "cl-debug"
-	       "cl-ppcre"
-	       "closer-mop"
-	       "ironclad"
-               "parse-number"
-	       "re"
-	       "str"
-	       "trivial-utf-8")
-  :components
-  ((:file "package")
-   (:module "shell" :depends-on ("package")
-	    :components
-	    ((:file "shell")
-	     #+sbcl
-	     (:file "sb-shell" :depends-on ("shell"))))
-   (:module "core" :depends-on ("package" "shell")
-            :components
-            ((:file "defs")
-             (:file "helpers")
-             (:file "host"       :depends-on ("defs" "os" "resource-container"
-                                                     "syntaxes"))
-             (:file "include")
-             (:file "operation"  :depends-on ("defs" "host" "properties"))
-	     (:file "os")
-	     (:file "probe"      :depends-on ("defs" "host" "properties"))
-	     (:file "properties" :depends-on ("defs"))
-	     (:file "resource"   :depends-on ("defs" "probe"))
-	     (:file "resource-container" :depends-on ("defs"))
-	     (:file "spec"       :depends-on ("defs" "resource"))
-             (:file "syntaxes")))
-   (:module "unix" :depends-on ("package" "shell" "core")
-	    :components
-	    ((:file "commands")
-	     (:file "debian" :depends-on ("commands" "defs" "syntaxes"))
-	     (:file "defs")
-	     (:file "linux" :depends-on ("commands" "defs"))
-	     (:file "openbsd" :depends-on ("commands" "defs"))
-	     (:file "freebsd" :depends-on ("commands" "defs"))
-	     (:file "darwin" :depends-on ("commands" "defs"))
-	     (:file "operations" :depends-on ("commands" "defs"))
-	     (:file "probes"  :depends-on ("commands" "defs"
-                                           "stat" "syntaxes"))
-             (:file "ssh" :depends-on ("defs"))
-	     (:file "stat")
-	     (:file "syntaxes")))))
diff --git a/cl-unix-cybernetics.asd b/cl-unix-cybernetics.asd
new file mode 100644
index 0000000..998cc94
--- /dev/null
+++ b/cl-unix-cybernetics.asd
@@ -0,0 +1,61 @@
+;; cl-unix-cybernetics
+;; Copyright 2013-2022 Thomas de Grivel <thodg@kmx.io>
+
+(defpackage :cl-unix-cybernetics.system
+  (:use :cl :asdf))
+
+(in-package :cl-unix-cybernetics.system)
+
+(defsystem :cl-unix-cybernetics
+  :name "cl-unix-cybernetics"
+  :author "Thomas de Grivel <thodg@kmx.io>"
+  :version "0.1"
+  :description "UNIX cybernetics in Common Lisp"
+  :depends-on ("alexandria"
+	       "chronicity"
+	       "cl-base64"
+	       "cl-debug"
+	       "cl-ppcre"
+	       "closer-mop"
+	       "ironclad"
+               "parse-number"
+	       "re"
+	       "str"
+	       "trivial-utf-8")
+  :components
+  ((:file "package")
+   (:module "shell" :depends-on ("package")
+	    :components
+	    ((:file "shell")
+	     #+sbcl
+	     (:file "sb-shell" :depends-on ("shell"))))
+   (:module "core" :depends-on ("package" "shell")
+            :components
+            ((:file "defs")
+             (:file "helpers")
+             (:file "host"       :depends-on ("defs" "os" "resource-container"
+                                                     "syntaxes"))
+             (:file "include")
+             (:file "operation"  :depends-on ("defs" "host" "properties"))
+	     (:file "os")
+	     (:file "probe"      :depends-on ("defs" "host" "properties"))
+	     (:file "properties" :depends-on ("defs"))
+	     (:file "resource"   :depends-on ("defs" "probe"))
+	     (:file "resource-container" :depends-on ("defs"))
+	     (:file "spec"       :depends-on ("defs" "resource"))
+             (:file "syntaxes")))
+   (:module "unix" :depends-on ("package" "shell" "core")
+	    :components
+	    ((:file "commands")
+	     (:file "debian" :depends-on ("commands" "defs" "syntaxes"))
+	     (:file "defs")
+	     (:file "linux" :depends-on ("commands" "defs"))
+	     (:file "openbsd" :depends-on ("commands" "defs"))
+	     (:file "freebsd" :depends-on ("commands" "defs"))
+	     (:file "darwin" :depends-on ("commands" "defs"))
+	     (:file "operations" :depends-on ("commands" "defs"))
+	     (:file "probes"  :depends-on ("commands" "defs"
+                                           "stat" "syntaxes"))
+             (:file "ssh" :depends-on ("defs"))
+	     (:file "stat")
+	     (:file "syntaxes")))))
diff --git a/toplevel.lisp b/toplevel.lisp
index 576873b..a31ab40 100644
--- a/toplevel.lisp
+++ b/toplevel.lisp
@@ -7,6 +7,7 @@
   (let ((*package* (find-package :adams-user)))
     (sb-impl::toplevel-init)))
 
-(sb-ext:save-lisp-and-die #P"~/common-lisp/cl-adams/adams/build/adams"
-                          :toplevel #'adams-toplevel
-                          :executable t)
+(defun build (path)
+  (sb-ext:save-lisp-and-die path
+                            :toplevel #'cl-unix-cybernetics-toplevel
+                            :executable t))