aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-05-22 00:56:44 +0200
committerTeddy Wing2022-05-22 00:56:44 +0200
commit5752d9f149108711ed8347b4c60f6220f6f58a8f (patch)
treeb34a1e72472c50856864c75ee6f0432db5b8d43f
parentbaafd4c35f4d85f14e95a2927f958e4d70517a27 (diff)
downloadwajir-5752d9f149108711ed8347b4c60f6220f6f58a8f.tar.bz2
Makefile: Add `pkg` targeto
Packages source files including dependencies for release.
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1e9815e..8d57d41 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,8 @@ PREFIX=/usr/local
LISP ?= sbcl
+VERSION := $(shell fgrep ':version' wajir.asd | awk -F '"' '{ print $$2 }')
+
MAN_PAGE := doc/wajir.1
@@ -56,6 +58,15 @@ bundle/bundled-local-projects/0000/wajir/wajir: bundle
--eval '(quit)'
+.PHONY: pkg
+pkg: wajir_$(VERSION).tar.bz2
+
+wajir_$(VERSION).tar.bz2: bundle
+ git archive --output=wajir_$(VERSION).tar HEAD
+ tar -rf wajir_$(VERSION).tar bundle
+ bzip2 wajir_$(VERSION).tar
+
+
.PHONY: install
install: bundle/bundled-local-projects/0000/wajir/wajir $(MAN_PAGE)
install -m 755 bundle/bundled-local-projects/0000/wajir/wajir $(PREFIX)/bin