summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/arping/Makefile30
-rw-r--r--net/arping/distinfo8
-rw-r--r--net/arping/options.mk32
-rw-r--r--net/arping/patches/patch-aa58
4 files changed, 68 insertions, 60 deletions
diff --git a/net/arping/Makefile b/net/arping/Makefile
index e02ae916f82..1cf2315cd8e 100644
--- a/net/arping/Makefile
+++ b/net/arping/Makefile
@@ -1,34 +1,42 @@
-# $NetBSD: Makefile,v 1.5 2005/01/28 23:35:59 adrianp Exp $
+# $NetBSD: Makefile,v 1.6 2005/02/01 18:24:34 adrianp Exp $
#
-DISTNAME= arping-2.01
-PKGREVISION= 1
+DISTNAME= arping-2.05
CATEGORIES= net
MASTER_SITES= ftp://ftp.habets.pp.se/pub/synscan/
MAINTAINER= cube@NetBSD.org
-HOMEPAGE= ftp://ftp.habets.pp.se/pub/synscan/
+HOMEPAGE= http://www.habets.pp.se/synscan/programs.php?prog=arping
COMMENT= ARP-level ping utility
USE_BUILDLINK3= yes
NO_CONFIGURE= yes
-BUILDLINK_DEPENDS.libnet+= libnet<=1.0.1b
+LIBS.SunOS+= -lsocket -lnsl
.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD"
-BUILD_TARGET= openbsd
+BUILD_FOR= openbsd
.elif ${OPSYS} == "Linux"
-BUILD_TARGET= linux
+BUILD_FOR= linux
.elif ${OPSYS} == "FreeBSD"
-BUILD_TARGET= freebsd
+BUILD_FOR= freebsd
.elif ${OPSYS} == "SunOS"
-BUILD_TARGET= solaris
+BUILD_FOR= solaris
.elif ${OPSYS} == "Darwin"
-BUILD_TARGET= macosx
+BUILD_FOR= macosx
+.endif
+
+.if !empty(PKG_OPTIONS:Marping1)
+BUILD_TARGET= arping1 ${BUILD_FOR}
.endif
-.include "../../devel/libnet/buildlink3.mk"
.include "../../net/libpcap/buildlink3.mk"
+
+do-install:
+ ${INSTALL_MAN} ${WRKSRC}/arping.8 ${PREFIX}/man/man8
+ ${INSTALL_PROGRAM} ${WRKSRC}/arping ${PREFIX}/bin
+
.include "../../mk/bsd.pkg.mk"
diff --git a/net/arping/distinfo b/net/arping/distinfo
index 235394c77f0..7f181cb20e9 100644
--- a/net/arping/distinfo
+++ b/net/arping/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2004/07/07 17:30:12 xtraeme Exp $
+$NetBSD: distinfo,v 1.2 2005/02/01 18:24:34 adrianp Exp $
-SHA1 (arping-2.01.tar.gz) = 00a84f390c9f9b5c9ac2ce457f0bd405bab2a63b
-Size (arping-2.01.tar.gz) = 31366 bytes
-SHA1 (patch-aa) = 3c6b4d78ddec573527c9f59173b17427ffc678d1
+SHA1 (arping-2.05.tar.gz) = 35434c22679284607a49319cf1ff566c0af935e6
+Size (arping-2.05.tar.gz) = 32287 bytes
+SHA1 (patch-aa) = bf47354f1c8d9157bea0a572d52ef5c9eea62dd4
SHA1 (patch-ab) = 17ef8cc62a202589bb9efb276d1bd99772648a22
diff --git a/net/arping/options.mk b/net/arping/options.mk
new file mode 100644
index 00000000000..5fa613688a4
--- /dev/null
+++ b/net/arping/options.mk
@@ -0,0 +1,32 @@
+# $NetBSD: options.mk,v 1.1 2005/02/01 18:24:34 adrianp Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.arping
+PKG_SUPPORTED_OPTIONS= arping1 arping2
+
+.if !defined(PKG_OPTIONS.arping)
+PKG_DEFAULT_OPTIONS+= arping1
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Can't support both versions of arping
+###
+.if !empty(PKG_OPTIONS:Marping1) && !empty(PKG_OPTIONS:Marping2)
+PKG_FAIL_REASON+= "arping1 and arping2 cannot both be selected." \
+ "This is due to the conflicting versions of libnet."
+.endif
+
+###
+### Build arping1 which uses libnet 1.0.x branch as is more tested
+###
+.if !empty(PKG_OPTIONS:Marping1)
+. include "../../devel/libnet/buildlink3.mk"
+.endif
+
+###
+### Build arping2 which uses libnet 1.1.x branch as is less tested
+###
+.if !empty(PKG_OPTIONS:Marping2)
+. include "../../devel/libnet11/buildlink3.mk"
+.endif
diff --git a/net/arping/patches/patch-aa b/net/arping/patches/patch-aa
index 0bcef240adf..31004fab3be 100644
--- a/net/arping/patches/patch-aa
+++ b/net/arping/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.1.1.1 2004/07/07 17:30:12 xtraeme Exp $
+$NetBSD: patch-aa,v 1.2 2005/02/01 18:24:34 adrianp Exp $
---- Makefile.orig 2003-08-04 01:20:07.000000000 +0200
-+++ Makefile
-@@ -9,9 +9,9 @@ SOLARIS=0
+--- Makefile.orig 2004-08-29 19:47:37.000000000 +0100
++++ Makefile 2005-01-21 00:09:28.000000000 +0000
+@@ -19,9 +19,9 @@
FREEBSD=0
MACOSX=0
@@ -14,48 +14,16 @@ $NetBSD: patch-aa,v 1.1.1.1 2004/07/07 17:30:12 xtraeme Exp $
all: message arping2
-@@ -54,34 +54,34 @@ doc: arping.yodl
- yodl2man -o arping.8 arping.yodl
+@@ -94,9 +94,9 @@
+ $(CC) $(CFLAGS) -g -o arping $(O_arping) `libnet-config --libs` -lpcap
- linux-nofindif:
-- make USE_NETIF=1 LINUX=1 FINDIF=0 arping1-make
-+ $(MAKE) USE_NETIF=1 LINUX=1 FINDIF=0 arping1-make
- linux:
-- make USE_NETIF=1 LINUX=1 arping1-make
-+ $(MAKE) USE_NETIF=1 LINUX=1 arping1-make
-
- freebsd:
-- make USE_NETIF=1 FREEBSD=1 arping1-make
-+ $(MAKE) USE_NETIF=1 FREEBSD=1 arping1-make
-
- macosx:
-- make USE_NETIF=1 MACOSX=1 arping1-make
-+ $(MAKE) USE_NETIF=1 MACOSX=1 arping1-make
-
- openbsd:
-- make OPENBSD=1 arping1-make
-+ $(MAKE) OPENBSD=1 arping1-make
- netbsd:
-- make openbsd
-+ $(MAKE) openbsd
-
- solaris:
-- make USE_NETIF=0 SOLARIS=1 arping1-make
-+ $(MAKE) USE_NETIF=0 SOLARIS=1 arping1-make
-
- install:
-- install -c arping /usr/local/bin/arping
-- install arping.8 /usr/local/man/man8/arping.8
-+ $(BSD_INSTALL) -c arping $(PREFIX)/bin/arping
-+ $(BSD_INSTALL) -c arping.8 $(PREFIX)/man/man8/arping.8
-
- arping.o: arping.c
- $(CC) -Wall $(CFLAGS) -c `libnet-config --defines` `libnet-config --cflags` arping.c
-
- O_arping=arping.o
- arping1-make: $(O_arping)
-- $(CC) $(CFLAGS) -g -o arping $(O_arping) `libnet-config --libs` -lpcap
-+ $(CC) $(CFLAGS) -o arping $(O_arping) `libnet-config --libs` -lpcap
+ SYS=$(shell uname -s)
+-ifeq ($(SYS),SunOS)
+-EXTRA_LIBS=-lsocket -lnsl
+-endif
++#ifeq ($(SYS),SunOS)
++#EXTRA_LIBS=-lsocket -lnsl
++#endif
O_arping2=arping-2/arping.c
arping2: arping-2/arping