From 0c58692dddac6643c55dc35f0b8f03ea4991104f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 22 May 2022 00:32:48 +0200 Subject: Makefile: Bundle dependencies for packaging Since I can't load Quicklisp dependencies when building with Homebrew or MacPorts, do `(ql:bundle-systems)` to create a bundle that includes all dependencies and can be packaged into a tarball for building from package managers. --- .gitignore | 4 ++++ Makefile | 14 +++++++++++++- bundle.lisp | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 bundle.lisp diff --git a/.gitignore b/.gitignore index be303db..b85e18e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ *.fasl + +/bundle/ +/lib/wajir/ +system-index.txt diff --git a/Makefile b/Makefile index b01ee3e..1ae8c87 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,19 @@ $(MAN_PAGE): doc/wajir.1.txt a2x --no-xmllint --format manpage $< +bundle: bundle.lisp + mkdir -p lib/wajir + cp -a wajir.asd src lib/wajir/ + + $(LISP) --load bundle.lisp + +bundle/bundled-local-projects/0000/wajir/wajir: bundle + $(LISP) --load bundle/bundle.lisp \ + --eval '(asdf:make :wajir)' \ + --eval '(quit)' + + .PHONY: install install: - install -m 755 wajir $(PREFIX)/bin + install -m 755 bundle/bundled-local-projects/0000/wajir/wajir $(PREFIX)/bin install -m 755 $(MAN_PAGE) $(PREFIX)/share/man/man1 diff --git a/bundle.lisp b/bundle.lisp new file mode 100644 index 0000000..8961589 --- /dev/null +++ b/bundle.lisp @@ -0,0 +1,14 @@ +(setf ql:*local-project-directories* '("./lib")) + +(let ((dependencies (asdf:system-depends-on (asdf:find-system :wajir))) + (local-dependencies '("com.inuoe.jzon" + "sysexits"))) + (ql:bundle-systems + (set-difference + (sort dependencies #'string-lessp) + local-dependencies + :test #'equal) + :to "./bundle" + :include-local-projects t)) + +(quit) -- cgit v1.2.3