pkgsrc/net/sdig/patches/patch-aa
bouyer b656b559e7 Update to 0.30. Major changes:
- rewrite of large parts of code. Now use net-snmp libraries instead of
  calling an external program
- There are now a sdig(8) and sdig.conf(5) man pages
-  the debug code now has multiple levels so using -d once
   doesn't give you all the really messy unimportant stuff.  To see
   that, use several - the really ugly ones are hiding down at 5 and 6.

With some snmp fixes by myself, I can now successfully querry my 3com and
alliedtelesyn switches.
2003-04-07 15:01:22 +00:00

48 lines
1.4 KiB
Text

$NetBSD: patch-aa,v 1.2 2003/04/07 15:01:22 bouyer Exp $
--- Makefile.orig Tue Jul 23 04:56:11 2002
+++ Makefile Wed Apr 2 18:58:25 2003
@@ -1,31 +1,27 @@
# sdig/Makefile: non-autoconf hack, for now
#
-CC = gcc
-CFLAGS = -O2 -Wall # -g -static
-PROGS = sdig nbname swc
+PREFIX ?= /usr/local
+CFLAGS = -g -O2 -Wall -DPREFIX="\"${PREFIX}\""
+PROGS = sdig nbname # swc
# change this to whatever it takes to make these things link on your system
-UCDSNMP_CFLAGS = -lsnmp
-OPENSSL_CFLAGS = -L/usr/local/ssl/lib -lcrypto
+UCDSNMP_CFLAGS = -L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lsnmp
+OPENSSL_CFLAGS = -L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lcrypto
all: $(PROGS)
-sdig: sdig.c common.o snmpget.o
- $(CC) $(CFLAGS) -o sdig sdig.c common.o snmpget.o $(UCDSNMP_CFLAGS) $(OPENSSL_CFLAGS)
+sdig: sdig.o common.o snmpget.o
+ $(CC) $(LDFLAGS) -o $@ sdig.o common.o snmpget.o $(UCDSNMP_CFLAGS) $(OPENSSL_CFLAGS)
-swc: swc.c common.o
+#swc: swc.o common.o
+# $(CC) $(LDFLAGS) -o $@ swc.o common.o
clean:
rm -f $(PROGS) *.o
install: all
- cp sdig /usr/local/bin
- cp nbname /usr/local/bin
- @if ( test -f /etc/sdig.conf ) \
- then \
- echo Not replacing existing file: /etc/sdig.conf; \
- else \
- cp sdig.conf /etc; \
- fi
+ ${BSD_INSTALL_PROGRAM} sdig ${PREFIX}/bin
+ ${BSD_INSTALL_PROGRAM} nbname ${PREFIX}/bin
+ ${BSD_INSTALL_DATA} README ${PREFIX}/share/doc/sdig.README