summaryrefslogtreecommitdiff
path: root/sysutils/tcplist/files/patch-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/tcplist/files/patch-Makefile')
-rw-r--r--sysutils/tcplist/files/patch-Makefile79
1 files changed, 79 insertions, 0 deletions
diff --git a/sysutils/tcplist/files/patch-Makefile b/sysutils/tcplist/files/patch-Makefile
new file mode 100644
index 000000000000..4d10f8a98f2f
--- /dev/null
+++ b/sysutils/tcplist/files/patch-Makefile
@@ -0,0 +1,79 @@
+--- Makefile.orig 2013-11-16 20:34:19.000000000 +0800
++++ Makefile 2013-11-16 20:35:17.000000000 +0800
+@@ -1,14 +1,16 @@
+ # Compiler: eg. cc or gcc
+ CC = cc
+
++#PREFIX= /local
++
+ # Directory to install tcplist executable
+-BINDIR = /local/bin
++BINDIR = $(PREFIX)/bin
+
+ # Directory to install tcplist man page
+-MANDIR = /local/man/man1
++MANDIR = $(PREFIX)/man/man1
+
+ # Location of NOIDENT file
+-NOIDENT = /etc/hosts.noident
++NOIDENT = $(PREFIX)/etc/hosts.noident
+
+ # Owner of tcplist executable
+ OWNER = root
+@@ -45,18 +47,18 @@ MANEXT = 1
+ #
+ # Solaris 2.x (using LSOF):
+ #
+-LIBRARIES = -lsocket -lnsl
+-DEFS = -DLSOF
+-MODE = 755
+-GROUP = staff
++#LIBRARIES = -lsocket -lnsl
++#DEFS = -DLSOF
++#MODE = 755
++#GROUP = staff
+
+ #
+ # Generic LSOF:
+ #
+-# LIBRARIES =
+-# DEFS = -DLSOF
+-# MODE = 755
+-# GROUP = staff
++ LIBRARIES =
++ DEFS = -DLSOF
++ MODE = 755
++ GROUP = staff
+ #
+
+ # If you're using an old version of lsof, uncomment this:
+@@ -76,8 +78,8 @@ OBJS = $(SRCS:.c=.o)
+ RM = /bin/rm -rf
+ CP = /bin/cp
+ CHMOD = /bin/chmod
+-CHOWN = /bin/chown
+-CHGRP = /bin/chgrp
++CHOWN = /usr/sbin/chown
++CHGRP = /usr/bin/chgrp
+
+ all:: tcplist
+
+@@ -95,13 +97,13 @@ depend:
+
+ install: tcplist
+ strip tcplist
+- $(CP) tcplist $(BINDIR)
+- $(CHGRP) $(GROUP) $(BINDIR)/tcplist
+- $(CHMOD) $(MODE) $(BINDIR)/tcplist
++ $(CP) tcplist $(DESTDIR)$(BINDIR)
++ $(CHGRP) $(GROUP) $(DESTDIR)$(BINDIR)/tcplist
++ $(CHMOD) $(MODE) $(DESTDIR)$(BINDIR)/tcplist
+
+ install.man: tcplist.1
+- $(CP) tcplist.1 $(MANDIR)/tcplist.$(MANEXT)
+- $(CHMOD) $(MANMODE) $(MANDIR)/tcplist.$(MANEXT)
++ $(CP) tcplist.1 $(DESTDIR)$(MANDIR)/tcplist.$(MANEXT)
++ $(CHMOD) $(MANMODE) $(DESTDIR)$(MANDIR)/tcplist.$(MANEXT)
+
+ shar:
+ shar `awk '{print $$1}' MANIFEST` >tcplist-`awk '{print $$7;exit}' patchlevel.h`.shar