pkgsrc/net/traceroute-as/patches/patch-aa

121 lines
3.1 KiB
Text

$NetBSD: patch-aa,v 1.1.1.1 2001/10/16 22:40:11 seb Exp $
--- Makefile.orig Fri Aug 28 10:40:36 1998
+++ Makefile
@@ -5,10 +5,10 @@
# ----------------------------------------------------------------------
# This is where the traceroute executable will go.
-DESTBIN = /usr/local/etc
+DESTBIN = $(DESTDIR)$(PREFIX)/sbin
# This is where the traceroute manual page will go.
-DESTMAN = /usr/local/man
+DESTMAN = $(DESTDIR)$(PREFIX)/man
BINDIR = $(DESTBIN)
MANDIR = $(DESTMAN)/man8
@@ -42,7 +42,7 @@
SYSDEFS = -D_BSD_SOURCE
#endif
-SYSDEFS =
+SYSDEFS = $(PKG_SYSDEFS)
# ----------------------------------------------------------------------
# Configuration definitions.
@@ -53,7 +53,7 @@
CONFIGDEFS = -DOLD_RES_STATE
#endif
-CONFIGDEFS =
+CONFIGDEFS = $(PKG_CONFIGDEFS)
# ----------------------------------------------------------------------
# Include file directories.
@@ -79,7 +79,7 @@
COPTS =
COPTS = -O
-CFLAGS = $(COPTS) $(DEFS)
+CFLAGS = $(PKG_CFLAGS) $(DEFS)
# Select your favorite compiler.
CC = /usr/ucb/cc #if defined(solaris) && BSD
@@ -113,7 +113,7 @@
LIBS = -lsocket -lnsl #if defined(solaris) && not BSD
LIBS =
-LIBRARIES = $(RES) $(COMPLIB) $(LIBS)
+LIBRARIES = $(PKG_LIBRARIES)
LDFLAGS =
@@ -121,10 +121,11 @@
# Miscellaneous definitions.
# ----------------------------------------------------------------------
-MAKE = make $(MFLAGS)
-
-# This assumes the BSD install.
-INSTALL = install -c
+INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM)
+INSTALL_PROGRAM_SUID = $(BSD_INSTALL_PROGRAM_SUID)
+INSTALL_PROGRAM_DIR = $(BSD_INSTALL_PROGRAM_DIR)
+INSTALL_MAN = $(BSD_INSTALL_MAN)
+INSTALL_MAN_DIR = $(BSD_INSTALL_MAN_DIR)
# Grrr
SHELL = /bin/sh
@@ -144,13 +145,13 @@
UHDR = aslookup.h port.h exit.h
USRC = aslookup.c vers.c
-UOBJ = aslookup.o vers.o
+UOBJ = aslookup-std.o vers-std.o
UTIL = aslookup
PACKAGE = traceroute
TARFILE = $(PACKAGE).tar
-CLEANUP = $(PROG) $(UTIL) $(OBJS) $(TARFILE) $(TARFILE).Z
+CLEANUP = $(PROG) $(UTIL) $(OBJS) $(UOBJ) $(TARFILE) $(TARFILE).Z
# ----------------------------------------------------------------------
# Rules for installation.
@@ -161,25 +162,29 @@
MODE = 4755
STRIP = -s
-all: $(PROG)
+all: $(PROG) $(UTIL)
$(OBJS): $(SRCS) $(HDRS)
$(PROG): $(OBJS)
$(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBRARIES)
-install: $(PROG)
- $(INSTALL) -m $(MODE) -o $(OWNER) -g $(GROUP) $(STRIP) $(PROG) $(BINDIR)
+install: $(PROG) $(UTIL) man
+ $(INSTALL_PROGRAM_DIR) $(BINDIR)
+ $(INSTALL_PROGRAM_SUID) traceroute $(BINDIR)/traceroute-as
+ $(INSTALL_PROGRAM) aslookup $(BINDIR)/aslookup
man: $(MANS)
- $(INSTALL) -m 444 traceroute.8 $(MANDIR)
+ $(INSTALL_MAN_DIR) $(MANDIR)
+ $(INSTALL_MAN) traceroute.8 $(MANDIR)/traceroute-as.8
clean:
rm -f $(CLEANUP) *.o a.out core
$(UTIL): $(USRC) $(UHDR)
- $(CC) $(CFLAGS) -DSTANDALONE -o $(UTIL) $(USRC) $(LIBRARIES)
- rm -f $(UOBJ)
+ $(CC) $(CFLAGS) -DSTANDALONE -c aslookup.c -o aslookup-std.o
+ $(CC) $(CFLAGS) -DSTANDALONE -c vers.c -o vers-std.o
+ $(CC) $(CFLAGS) -o $(UTIL) aslookup-std.o vers-std.o $(LIBRARIES)
# ----------------------------------------------------------------------
# Rules for maintenance.