$NetBSD: patch-ac,v 1.3 2004/01/22 10:08:19 agc Exp $

--- Makefile	2000/02/07 15:16:12	1.1
+++ Makefile	2000/02/07 15:17:47
@@ -20,7 +20,7 @@
 #
 #
 # Generic compiler (usually linked to gcc on most platforms)
-CC = cc
+#CC = cc
 
 # GNU..
 #CC = gcc 
@@ -37,8 +37,8 @@
 #CFLAGS = -pg -O -Wall -DNODAEMON
 #LIBS = /usr/lib/libefence.a
 
-INSTALLDIR = /usr/local/psionic
-CHILDDIR=/portsentry
+INSTALLDIR = ${PREFIX}
+CHILDDIR=/share/examples/portsentry
 
 all:
 		@echo "Usage: make <systype>"
@@ -69,21 +69,17 @@
 install:	
 		@echo "Creating psionic directory $(INSTALLDIR)"
 		@if [ ! -d $(INSTALLDIR) ]; then /bin/mkdir $(INSTALLDIR); fi
-		@echo "Setting directory permissions"
-		@if [ "$(INSTALLDIR)" = "/usr/local/psionic" ]; then /bin/chmod 700 $(INSTALLDIR) ; fi
 		@echo "Creating portsentry directory $(INSTALLDIR)$(CHILDDIR)"
 		@if [ ! -d $(INSTALLDIR)$(CHILDDIR) ]; then /bin/mkdir\
 			$(INSTALLDIR)$(CHILDDIR); fi
-		@echo "Setting directory permissions"
-		chmod 700 $(INSTALLDIR)$(CHILDDIR)
 		@echo "Copying files"
-		cp ./portsentry.conf $(INSTALLDIR)$(CHILDDIR)
-		cp ./portsentry.ignore $(INSTALLDIR)$(CHILDDIR)
-		cp ./portsentry $(INSTALLDIR)$(CHILDDIR)
+		${BSD_INSTALL_DATA} ./portsentry.conf $(INSTALLDIR)$(CHILDDIR)
+		${BSD_INSTALL_DATA} ./portsentry.ignore $(INSTALLDIR)$(CHILDDIR)
+		${BSD_INSTALL_PROGRAM} ./portsentry ${PREFIX}/sbin
 		@echo "Setting permissions"
 		chmod 600 $(INSTALLDIR)$(CHILDDIR)/portsentry.ignore
 		chmod 600 $(INSTALLDIR)$(CHILDDIR)/portsentry.conf
-		chmod 700 $(INSTALLDIR)$(CHILDDIR)/portsentry
+		chmod 700 ${PREFIX}/sbin/portsentry
 		@echo ""
 		@echo ""
 		@echo "Edit $(INSTALLDIR)$(CHILDDIR)/portsentry.conf and change"
