From ef8ac4efbedfb41dfe17c9fbae3baf746a7ee042 Mon Sep 17 00:00:00 2001
From: agc <agc>
Date: Mon, 20 Aug 2007 21:42:26 +0000
Subject: Add DESTDIR support

---
 pkgtools/pkgsurvey/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'pkgtools')

diff --git a/pkgtools/pkgsurvey/Makefile b/pkgtools/pkgsurvey/Makefile
index af98e9190d5..223362d8608 100644
--- a/pkgtools/pkgsurvey/Makefile
+++ b/pkgtools/pkgsurvey/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2007/02/22 19:27:02 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2007/08/20 21:42:26 agc Exp $
 #
 
 DISTNAME=	pkgsurvey-0.0
@@ -16,10 +16,13 @@ NO_BUILD=	yes
 
 INSTALLATION_DIRS=	bin
 
+PKG_DESTDIR_SUPPORT=	user-destdir
+
 do-install:
+	${INSTALL_PROGRAM_DIR} ${DESTDIR}${PREFIX}/bin
 	${SED} -e 's|\$${PKG_INFO}|${PKG_INFO}|'			\
 		-e 's|\$${UNAME}|${UNAME}|g'				\
-		${FILESDIR}/pkgsurvey.sh > ${PREFIX}/bin/pkgsurvey
-	${CHMOD} 755 ${PREFIX}/bin/pkgsurvey
+		${FILESDIR}/pkgsurvey.sh > ${DESTDIR}${PREFIX}/bin/pkgsurvey
+	${CHMOD} 755 ${DESTDIR}${PREFIX}/bin/pkgsurvey
 
 .include "../../mk/bsd.pkg.mk"
-- 
cgit v1.2.3