$NetBSD: patch-ag,v 1.5 2008/09/13 00:36:37 bjs Exp $

--- templates/Makefile.orig	2008-08-24 19:41:58.000000000 -0400
+++ templates/Makefile
@@ -8,7 +8,7 @@ INSTALL ?= install
 TAR ?= tar
 RM ?= rm -f
 prefix ?= $(HOME)
-template_instdir ?= $(prefix)/share/git-core/templates
+template_instdir = ${GIT_TEMPLATE_INSTDIR}
 # DESTDIR=
 
 # Shell quote (do not use $(call) to accommodate ancient setups);
@@ -29,7 +29,7 @@ boilerplates.made : $(bpsrc)
 		case "$$boilerplate" in *~) continue ;; esac && \
 		dst=`echo "$$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \
 		dir=`expr "$$dst" : '\(.*\)/'` && \
-		$(INSTALL) -d -m 755 blt/$$dir && \
+		$(BSD_INSTALL_DATA_DIR) blt/$$dir && \
 		case "$$boilerplate" in \
 		*--) ;; \
 		*) cp -p $$boilerplate blt/$$dst ;; \
@@ -46,6 +46,6 @@ clean:
 	$(RM) -r blt boilerplates.made
 
 install: all
-	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(template_instdir_SQ)'
+	$(BSD_INSTALL_DATA_DIR) '$(DESTDIR_SQ)$(template_instdir_SQ)'
 	(cd blt && $(TAR) cf - .) | \
 	(cd '$(DESTDIR_SQ)$(template_instdir_SQ)' && umask 022 && $(TAR) xfo -)
