From 3b28c7db046221d8285581c0e8582abc869f66f1 Mon Sep 17 00:00:00 2001
From: "David W. Chapman Jr." <dwcjr@FreeBSD.org>
Date: Mon, 18 Jun 2001 05:03:14 +0000
Subject: Add trafcount, a "loadable module for freebsd lets admin see how much
 amount of data was transfered by each user"

PR:		27836
Submitted by:	Amir S. <amir@boom.org.il>
---
 net/Makefile                              |  1 +
 net/trafcount/Makefile                    | 30 ++++++++++++++++++++++++++++++
 net/trafcount/distinfo                    |  1 +
 net/trafcount/files/patch-client-Makefile | 11 +++++++++++
 net/trafcount/files/patch-module-Makefile |  8 ++++++++
 net/trafcount/pkg-comment                 |  1 +
 net/trafcount/pkg-descr                   |  3 +++
 net/trafcount/pkg-plist                   |  3 +++
 8 files changed, 58 insertions(+)
 create mode 100644 net/trafcount/Makefile
 create mode 100644 net/trafcount/distinfo
 create mode 100644 net/trafcount/files/patch-client-Makefile
 create mode 100644 net/trafcount/files/patch-module-Makefile
 create mode 100644 net/trafcount/pkg-comment
 create mode 100644 net/trafcount/pkg-descr
 create mode 100644 net/trafcount/pkg-plist

(limited to 'net')

diff --git a/net/Makefile b/net/Makefile
index fc9a6e073510..20ba35fe683d 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -369,6 +369,7 @@
     SUBDIR += tn5250
     SUBDIR += totd
     SUBDIR += traceroute
+    SUBDIR += trafcount
     SUBDIR += trafd
     SUBDIR += trafshow
     SUBDIR += tridiavnc
diff --git a/net/trafcount/Makefile b/net/trafcount/Makefile
new file mode 100644
index 000000000000..796b7821e891
--- /dev/null
+++ b/net/trafcount/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for:    trafcount
+# Date created:         Sat Jun  2 16:29:22 IDT 2001
+# Whom:                 amir@boom.org.il
+#
+# $FreeBSD$
+#
+
+PORTNAME=		trafcount
+PORTVERSION=		0.2.1
+CATEGORIES=		net
+MASTER_SITES=		${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR=	trafcount
+
+MAINTAINER=		amir@boom.org.il
+
+STARTUP=		trafcount.sh
+MAN1=			trafcount.1
+
+MAN_COMPRESSED=		no
+
+post-patch:
+	@${PERL} -pi.fbsd -e 's@kmoddir=/modules@kmoddir=${PREFIX}/libexec@g' ${WRKSRC}/trafcount.sh
+	@${PERL} -pi.fbsd -e 's@/usr/local@${PREFIX}@g' \
+		${WRKSRC}/client/Makefile ${WRKSRC}/module/Makefile ${WRKSRC}/Makefile
+
+.if !exists(/usr/src/sys/Makefile)
+BROKEN=			"Kernel source files required"
+.endif
+
+.include <bsd.port.mk>
diff --git a/net/trafcount/distinfo b/net/trafcount/distinfo
new file mode 100644
index 000000000000..b3959cb838f3
--- /dev/null
+++ b/net/trafcount/distinfo
@@ -0,0 +1 @@
+MD5 (trafcount-0.2.1.tar.gz) = 18ab6b5f82ac70567121c6e92a14050d
diff --git a/net/trafcount/files/patch-client-Makefile b/net/trafcount/files/patch-client-Makefile
new file mode 100644
index 000000000000..cedb05588dfe
--- /dev/null
+++ b/net/trafcount/files/patch-client-Makefile
@@ -0,0 +1,11 @@
+--- client/Makefile.orig	Fri Jun  1 11:58:57 2001
++++ client/Makefile	Sun Jun 17 18:29:15 2001
+@@ -1,6 +1,8 @@
+ PROG	=	trafcount
+ SRCS	=	trafcount.c ../include/trafcount.h
+ BINDIR ?=	/usr/local/bin
++MANDIR	=	/usr/local/man/man
+ CFLAGS += 	-Wall
++NOMANCOMPRESS = yes
+ 
+ .include <bsd.prog.mk>
diff --git a/net/trafcount/files/patch-module-Makefile b/net/trafcount/files/patch-module-Makefile
new file mode 100644
index 000000000000..3f56bbea4252
--- /dev/null
+++ b/net/trafcount/files/patch-module-Makefile
@@ -0,0 +1,8 @@
+--- module/Makefile.orig	Fri Jun  1 11:20:26 2001
++++ module/Makefile	Sun Jun 17 18:15:28 2001
+@@ -1,4 +1,5 @@
+ KMOD	=	trafcount
+ SRCS	=	trafcount.c ../include/trafcount.h
++KMODDIR	=	/usr/local/libexec
+ 
+ .include <bsd.kmod.mk>
diff --git a/net/trafcount/pkg-comment b/net/trafcount/pkg-comment
new file mode 100644
index 000000000000..eb3bb86d0a70
--- /dev/null
+++ b/net/trafcount/pkg-comment
@@ -0,0 +1 @@
+Ethernet Traffic Counter
diff --git a/net/trafcount/pkg-descr b/net/trafcount/pkg-descr
new file mode 100644
index 000000000000..38f1e404b6e7
--- /dev/null
+++ b/net/trafcount/pkg-descr
@@ -0,0 +1,3 @@
+Trafcount is a loadable kernel module that provides you the option to
+measure the total amount of bandwidth that is consumed by each of
+your users.
diff --git a/net/trafcount/pkg-plist b/net/trafcount/pkg-plist
new file mode 100644
index 000000000000..e1b31ce470ad
--- /dev/null
+++ b/net/trafcount/pkg-plist
@@ -0,0 +1,3 @@
+bin/trafcount
+etc/rc.d/trafcount.sh
+libexec/trafcount.ko
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0