From 55a515ccd52113272998ccecbcb952a8341ea9ab Mon Sep 17 00:00:00 2001 From: "N0\\A" Date: Fri, 20 Mar 2026 08:46:13 +0100 Subject: [PATCH] dist: bpkg preparation --- Makefile | 19 +++++++++++++++++++ package.json | 7 +++++++ tools/build-standalone.sh | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100644 package.json diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a2a6e85 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +PREFIX ?= /usr/local +BINDIR = $(PREFIX)/bin + +all: kewt + +kewt: + ./tools/build-standalone.sh + +install: kewt + install -d $(DESTDIR)$(BINDIR) + install -m 755 kewt $(DESTDIR)$(BINDIR)/kewt + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/kewt + +clean: + rm -f kewt + +.PHONY: all install uninstall clean diff --git a/package.json b/package.json new file mode 100644 index 0000000..18afdec --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "kewt", + "description": "A minimalist static site generator inspired by werc", + "global": "true", + "install": "make install", + "scripts": ["kewt"] +} diff --git a/tools/build-standalone.sh b/tools/build-standalone.sh index 5e0b65c..e63f6bd 100755 --- a/tools/build-standalone.sh +++ b/tools/build-standalone.sh @@ -26,7 +26,7 @@ exit $? #==PAYLOAD== EOF -VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "standalone") +VERSION=$(git describe --tags 2>/dev/null || echo "standalone") tmpbuild=$(mktemp -d) cp -r "$REPO_ROOT/kewt.sh" "$REPO_ROOT/markdown.sh" "$REPO_ROOT/awk" "$REPO_ROOT/styles" "$tmpbuild/" sed -e "s/kewt version git/kewt version $VERSION/" "$tmpbuild/kewt.sh" > "$tmpbuild/kewt.sh.tmp" && mv "$tmpbuild/kewt.sh.tmp" "$tmpbuild/kewt.sh"