- 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>
This commit is contained in:
R. Imura 2000-02-12 20:19:01 +00:00
parent 7a68599f58
commit 6834994524
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=25704
14 changed files with 182 additions and 40 deletions

View File

@ -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>

View File

@ -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."
--- Makefile.orig Tue Feb 8 21:57:24 2000
+++ Makefile Tue Feb 8 21:34:45 2000
@@ -12,22 +12,22 @@
#
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.
# 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}\"\

View File

@ -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
#

View File

@ -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
#

View File

@ -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
#

View File

@ -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
#

View File

@ -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

View File

@ -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>

View File

@ -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."
--- Makefile.orig Tue Feb 8 21:57:24 2000
+++ Makefile Tue Feb 8 21:34:45 2000
@@ -12,22 +12,22 @@
#
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.
# 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}\"\

7
net/trafd/files/patch-ab Normal file
View File

@ -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
#

7
net/trafd/files/patch-ac Normal file
View File

@ -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
#

7
net/trafd/files/patch-ad Normal file
View File

@ -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
#

7
net/trafd/files/patch-ae Normal file
View File

@ -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
#

View File

@ -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