59 lines
1.9 KiB
Text
59 lines
1.9 KiB
Text
$NetBSD: patch-ac,v 1.5 2008/06/12 02:14:45 joerg Exp $
|
|
|
|
--- Makefile.orig 2003-05-23 18:10:13.000000000 +0000
|
|
+++ Makefile
|
|
@@ -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 = -O -Wall
|
|
#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 @@ uninstall:
|
|
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 ${DESTDIR}${PREFIX}/sbin
|
|
@echo "Setting permissions"
|
|
chmod 600 $(INSTALLDIR)$(CHILDDIR)/portsentry.ignore
|
|
chmod 600 $(INSTALLDIR)$(CHILDDIR)/portsentry.conf
|
|
- chmod 700 $(INSTALLDIR)$(CHILDDIR)/portsentry
|
|
+ chmod 700 ${DESTDIR}${PREFIX}/sbin/portsentry
|
|
@echo ""
|
|
@echo ""
|
|
@echo "Edit $(INSTALLDIR)$(CHILDDIR)/portsentry.conf and change"
|
|
@@ -125,7 +121,7 @@ openbsd:
|
|
./portsentry_io.c ./portsentry_util.c
|
|
|
|
|
|
-freebsd:
|
|
+freebsd dragonfly:
|
|
SYSTYPE=freebsd
|
|
@echo "Making $(SYSTYPE)"
|
|
$(CC) $(CFLAGS) -DBSD44 -o ./portsentry ./portsentry.c \
|