From 9b71b697fed5f3abc69abb63a97e7bce3ded5fcd Mon Sep 17 00:00:00 2001
From: "Roberto E. Vargas Caballero" <k0ga@shike2.com>
Date: Thu, 13 Mar 2025 12:06:12 +0100
Subject: [PATCH] build: Avoid using numbers in dist target directory

We are using a wildcard to copy things into the directory used to
build the distribution tar file, and this directory can contain
the .1 extension used in the *.1 wildcard used to copy the man
pages. Also, changed the cp command line from -r to -R because
-r is not specified in POSIX.
---
 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index e3b6936..5713266 100644
--- a/Makefile
+++ b/Makefile
@@ -235,8 +235,9 @@ sbase-box-uninstall: sbase-box proto
 	scripts/uninstall proto
 
 dist: clean
-	mkdir -p sbase-$(VERSION)
-	cp -r LICENSE Makefile README TODO config.mk *.c *.1 *.h libutf libutil sbase-$(VERSION)
+	mkdir -p sbase
+	cp -R LICENSE Makefile README TODO config.mk *.c *.1 *.h libutf libutil sbase
+	mv sbase sbase-$(VERSION)
 	tar -cf sbase-$(VERSION).tar sbase-$(VERSION)
 	gzip sbase-$(VERSION).tar
 	rm -rf sbase-$(VERSION)