aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/trafd
diff options
context:
space:
mode:
authorimura <imura@FreeBSD.org>2000-02-13 04:19:01 +0800
committerimura <imura@FreeBSD.org>2000-02-13 04:19:01 +0800
commit766216217097cd4df296a1adf47d880e50491996 (patch)
treec1be4833e399618252259a4ea213117b407a908b /net-mgmt/trafd
parente3f2468d546066a236e52a774ba27b65817873da (diff)
downloadfreebsd-ports-gnome-766216217097cd4df296a1adf47d880e50491996.tar.gz
freebsd-ports-gnome-766216217097cd4df296a1adf47d880e50491996.tar.zst
freebsd-ports-gnome-766216217097cd4df296a1adf47d880e50491996.zip
- Changed port to use ${PREFIX}
- Changed to use ${CFLAGS} in /etc/make.conf - Added do-install:, so proper INSTALL macros could be used PR: 16595 Submitted by: Christopher J. Michaels <cjm2@altavista.net>
Diffstat (limited to 'net-mgmt/trafd')
-rw-r--r--net-mgmt/trafd/Makefile14
-rw-r--r--net-mgmt/trafd/files/patch-aa68
-rw-r--r--net-mgmt/trafd/files/patch-ab7
-rw-r--r--net-mgmt/trafd/files/patch-ac7
-rw-r--r--net-mgmt/trafd/files/patch-ad7
-rw-r--r--net-mgmt/trafd/files/patch-ae7
-rw-r--r--net-mgmt/trafd/pkg-plist3
7 files changed, 92 insertions, 21 deletions
diff --git a/net-mgmt/trafd/Makefile b/net-mgmt/trafd/Makefile
index 5d4e8b6f7776..7ab4da2b16fd 100644
--- a/net-mgmt/trafd/Makefile
+++ b/net-mgmt/trafd/Makefile
@@ -13,10 +13,22 @@ EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/trafd/trafd ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/trafd/trafstart ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/trafd/trafstop ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/trafd/trafsave ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/trafd/trafdump ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/trafstat/trafstat ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/trafstatd/trafstatd ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/traflog/traflog ${PREFIX}/bin
+ ${INSTALL_DATA} ${WRKSRC}/traflog/traflog.format ${PREFIX}/etc
+
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/bpft
${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/bpft/README
.endif
-
+ ${MKDIR} ${PREFIX}/var/trafd
+ ${MKDIR} ${PREFIX}/var/log
.include <bsd.port.mk>
diff --git a/net-mgmt/trafd/files/patch-aa b/net-mgmt/trafd/files/patch-aa
index 8a703a73dc9e..ded851e24a73 100644
--- a/net-mgmt/trafd/files/patch-aa
+++ b/net-mgmt/trafd/files/patch-aa
@@ -1,21 +1,49 @@
---- Makefile.orig Sun Jan 23 16:02:11 2000
-+++ Makefile Sun Jan 23 16:02:35 2000
-@@ -64,14 +64,14 @@
- @echo "Done."
-
- install: all
-- install -s -o root -g ${GROUP} -m ${MODE} trafd/trafd ${PATH_BINDIR}
-+ install -c -s -o root -g ${GROUP} -m ${MODE} trafd/trafd ${PATH_BINDIR}
- install -c -o root -g ${GROUP} -m ${MODE} trafd/trafstart ${PATH_BINDIR}
- install -c -o root -g ${GROUP} -m ${MODE} trafd/trafstop ${PATH_BINDIR}
- install -c -o root -g ${GROUP} -m ${MODE} trafd/trafsave ${PATH_BINDIR}
- install -c -o root -g ${GROUP} -m ${MODE} trafd/trafdump ${PATH_BINDIR}
-- install -s -o root -g ${GROUP} -m ${MODE} trafstat/trafstat ${PATH_BINDIR}
-- install -s -o root -g ${GROUP} -m ${MODE} trafstatd/trafstatd ${PATH_BINDIR}
-- install -s -o root -g ${GROUP} -m ${MODE} traflog/traflog ${PATH_BINDIR}
-+ install -c -s -o root -g ${GROUP} -m ${MODE} trafstat/trafstat ${PATH_BINDIR}
-+ install -c -s -o root -g ${GROUP} -m ${MODE} trafstatd/trafstatd ${PATH_BINDIR}
-+ install -c -s -o root -g ${GROUP} -m ${MODE} traflog/traflog ${PATH_BINDIR}
- install -c -o root -g ${GROUP} -m ${MODE} traflog/traflog.format ${PATH_TRAFLOG_FMT}
- @echo Done.
+--- Makefile.orig Tue Feb 8 21:57:24 2000
++++ Makefile Tue Feb 8 21:34:45 2000
+@@ -12,22 +12,22 @@
+ #
+ # Target directory for install execution files.
+-PATH_BINDIR=/usr/local/bin
++PATH_BINDIR=${PREFIX}/bin
+
+ # Target directory for install man pages.
+-PATH_MANDIR=/usr/local/man/man1
++PATH_MANDIR=${MANPREFIX}/man1
+
+ # Trailing slash directory, summary traffic log files will be put there.
+-PATH_TOSAVE=/var/trafd/
++PATH_TOSAVE=${PREFIX}/var/trafd/
+
+ # Full pathname where locate tarfstat program.
+-PATH_TRAFSTAT=/usr/local/bin/trafstat
++PATH_TRAFSTAT=${PREFIX}/bin/trafstat
+
+ # Where locate trafstatd log file, if you want log then file must exist.
+-PATH_TRAFSTAT_LOG=/var/log/trafstat.log
++PATH_TRAFSTAT_LOG=${PREFIX}/var/log/trafstat.log
+
+ # File with user defined descriptions of the traflog output format.
+-PATH_TRAFLOG_FMT=/usr/local/etc/traflog.format
++PATH_TRAFLOG_FMT=${PREFIX}/etc/traflog.format
+
+ # Only group wheel can execute binary files.
+ SHELL = /bin/sh
+@@ -36,7 +36,7 @@
+
+ # This options intended for BSD/OS V2.
+ CC = gcc
+-FLAGS = -O2
++#FLAGS = -O2
+ DEFINE = -DRETSIGTYPE=void -DRETSIGVAL=
+ #DEFINE += -DHAVE_FCNTL_H=1
+ #DEFINE += -DHAVE_MEMORY_H=1
+@@ -45,7 +45,7 @@
+ LDFLAGS = -L../lib -lbpft -lpcap -lcurses -ltermcap -ll
+
+ INCLUDE = -I../include
+-CFLAGS = ${FLAGS} ${INCLUDE} ${DEFINE} \
++CFLAGS += ${INCLUDE} ${DEFINE} \
+ -DPATH_TOSAVE=\"${PATH_TOSAVE}\"\
+ -DPATH_TRAFSTAT=\"${PATH_TRAFSTAT}\"\
+ -DPATH_TRAFSTAT_LOG=\"${PATH_TRAFSTAT_LOG}\"\
diff --git a/net-mgmt/trafd/files/patch-ab b/net-mgmt/trafd/files/patch-ab
new file mode 100644
index 000000000000..37b96f3f6542
--- /dev/null
+++ b/net-mgmt/trafd/files/patch-ab
@@ -0,0 +1,7 @@
+--- trafd/trafdump.orig Tue Feb 8 00:14:22 2000
++++ trafd/trafdump Tue Feb 8 00:15:05 2000
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ #
+ # trafdump Copyright (c)1993 CAD lab
+ #
diff --git a/net-mgmt/trafd/files/patch-ac b/net-mgmt/trafd/files/patch-ac
new file mode 100644
index 000000000000..3bd0c67318ad
--- /dev/null
+++ b/net-mgmt/trafd/files/patch-ac
@@ -0,0 +1,7 @@
+--- trafd/trafsave.orig Tue Feb 8 00:14:31 2000
++++ trafd/trafsave Tue Feb 8 00:15:15 2000
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ #
+ # trafsave Copyright (c)1993 CAD lab
+ #
diff --git a/net-mgmt/trafd/files/patch-ad b/net-mgmt/trafd/files/patch-ad
new file mode 100644
index 000000000000..d03435051373
--- /dev/null
+++ b/net-mgmt/trafd/files/patch-ad
@@ -0,0 +1,7 @@
+--- trafd/trafstart.orig Tue Feb 8 00:14:42 2000
++++ trafd/trafstart Tue Feb 8 00:15:38 2000
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ #
+ # trafstart Copyright (c)1993 CAD lab
+ #
diff --git a/net-mgmt/trafd/files/patch-ae b/net-mgmt/trafd/files/patch-ae
new file mode 100644
index 000000000000..b583de35ce86
--- /dev/null
+++ b/net-mgmt/trafd/files/patch-ae
@@ -0,0 +1,7 @@
+--- trafd/trafstop.orig Tue Feb 8 00:14:49 2000
++++ trafd/trafstop Tue Feb 8 00:15:51 2000
+@@ -1,3 +1,4 @@
++#!/bin/sh
+ #
+ # trafstop Copyright (c)1993 CAD lab
+ #
diff --git a/net-mgmt/trafd/pkg-plist b/net-mgmt/trafd/pkg-plist
index b6a9dcf01cc9..42889dab52f8 100644
--- a/net-mgmt/trafd/pkg-plist
+++ b/net-mgmt/trafd/pkg-plist
@@ -9,3 +9,6 @@ bin/trafstop
etc/traflog.format
share/doc/bpft/README
@dirrm share/doc/bpft
+@dirrm var/trafd
+@unexec rmdir %D/var/log 2>/dev/null || true
+@unexec rmdir %D/var 2>/dev/null || true