summaryrefslogtreecommitdiff
path: root/security/portsentry/patches/patch-ac
blob: 008708a9d483a6b6e05d50b19e91b97ca0916c50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$NetBSD: patch-ac,v 1.1.1.1 2000/02/07 16:20:19 agc Exp $

--- Makefile	2000/02/07 15:16:12	1.1
+++ Makefile	2000/02/07 15:17:47
@@ -21,9 +21,9 @@
 #
 #
 # Generic compiler
-CC = cc
+# CC = cc
 # GNU..
-#CC = gcc 
+CC = gcc 
 
 # Normal systems flags
 CFLAGS = -O -Wall
@@ -35,8 +35,8 @@
 #CFLAGS = -pg -O -Wall -DNODAEMON
 #LIBS = /usr/lib/libefence.a
 
-INSTALLDIR = /usr/local/psionic
-CHILDDIR=/portsentry
+INSTALLDIR = ${PREFIX}
+CHILDDIR=/etc
 
 all:
 		@echo "Usage: make <systype>"
@@ -67,21 +67,17 @@
 install:	
 		@echo "Creating psionic directory $(INSTALLDIR)"
 		@if [ ! -d $(INSTALLDIR) ]; then /bin/mkdir $(INSTALLDIR); fi
-		@echo "Setting directory permissions"
-		chmod 700 $(INSTALLDIR)
 		@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"