$OpenBSD: patch-Makefile,v 1.1.1.1 2021/05/04 18:53:01 tb Exp $

Don't install into ${HOME}, but rather where many projects assume
sharness to be. Using INSTALL_DIR confuses the build infrastructure.

Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -1,6 +1,6 @@
-prefix = $(HOME)
+prefix = $(PREFIX)
 
-INSTALL_DIR = $(prefix)/share/sharness
+SHARNESS_DIR = $(prefix)/share/sharness
 DOC_DIR = $(prefix)/share/doc/sharness
 EXAMPLE_DIR = $(DOC_DIR)/examples
 
@@ -16,14 +16,14 @@ TOMDOCSH = tomdoc.sh
 all:
 
 install: all
-	$(INSTALL) -d -m 755 $(INSTALL_DIR) $(DOC_DIR) $(EXAMPLE_DIR)
-	$(INSTALL) -m 644 $(INSTALL_FILES) $(INSTALL_DIR)
+	$(INSTALL) -d -m 755 $(SHARNESS_DIR) $(DOC_DIR) $(EXAMPLE_DIR)
+	$(INSTALL) -m 644 $(INSTALL_FILES) $(SHARNESS_DIR)
 	$(INSTALL) -m 644 $(DOC_FILES) $(DOC_DIR)
-	$(SED) -e "s!aggregate-results.sh!$(INSTALL_DIR)/aggregate-results.sh!" test/Makefile > $(EXAMPLE_DIR)/Makefile
-	$(SED) -e "s!. ./sharness.sh!. $(INSTALL_DIR)/sharness.sh!" test/simple.t > $(EXAMPLE_DIR)/simple.t
+	$(SED) -e "s!aggregate-results.sh!$(SHARNESS_DIR)/aggregate-results.sh!" test/Makefile > $(EXAMPLE_DIR)/Makefile
+	$(SED) -e "s!. ./sharness.sh!. $(SHARNESS_DIR)/sharness.sh!" test/simple.t > $(EXAMPLE_DIR)/simple.t
 
 uninstall:
-	$(RM) -r $(INSTALL_DIR) $(DOC_DIR) $(EXAMPLE_DIR)
+	$(RM) -r $(SHARNESS_DIR) $(DOC_DIR) $(EXAMPLE_DIR)
 
 doc: all
 	{ printf "# Sharness API\n\n"; \
