# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# 
# T2 SDE: package/.../p0f/install.patch
# Copyright (C) 2007 The T2 SDE Project
# 
# More information can be found in the files COPYING and README.
# 
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---

--- p0f/mk/Linux.vanilla	2007-06-19 21:06:22.625452266 +0200
+++ p0f/mk/Linux	2007-06-19 21:09:19.615538356 +0200
@@ -16,6 +16,8 @@
 FILE	= p0f
 TOOLS   = test/sendack test/sendack2 test/sendsyn
 
+prefix	= /usr
+
 all: $(FILE) strip	
 	@echo ">> You can also try 'make p0fq' to compile a sample query"
 	@echo ">> client (see README for more information)."
@@ -29,7 +31,7 @@
 	$(CC) -static $(CFLAGS) -o $@ $(FILE).c $(FILE)-query.c crc32.c $(LIBS)
 
 strip:
-	strip $(FILE) 2>/dev/null || true
+	$(STRIP) $(FILE) 2>/dev/null || true
 
 p0fq: test/p0fq
 
@@ -47,9 +49,9 @@
 	rm -f /tmp/p0f.tgz
 	
 install: $(FILE)
-	cp -f $(FILE) /usr/sbin/
-	cp -f p0frep /usr/sbin/
-	mkdir /etc/p0f || true
-	cp -f p0f.fp p0fa.fp p0fr.fp p0fo.fp /etc/p0f/
-	cp -f p0f.1 /usr/man/man1/ || cp -f p0f.1 /usr/local/man/man1/
+	cp -f $(FILE) $(DESTDIR)$(prefix)/sbin/
+	cp -f p0frep $(DESTDIR)$(prefix)/sbin/
+	mkdir $(DESTDIR)/etc/p0f || true
+	cp -f p0f.fp p0fa.fp p0fr.fp p0fo.fp $(DESTDIR)/etc/p0f/
+	cp -f p0f.1 $(DESTDIR)$(prefix)/man/man1/
 	@echo "You might want to manually install test/ tools now."
