openbsd-ports/net/trafd/patches/patch-Makefile

78 lines
2.7 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-Makefile,v 1.1.1.1 2000/09/15 05:17:40 form Exp $
--- Makefile.orig Thu Nov 25 17:38:29 1999
+++ Makefile Fri Sep 15 11:25:57 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}/man8
# Trailing slash directory, summary traffic log files will be put there.
PATH_TOSAVE=/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
# File with user defined descriptions of the traflog output format.
-PATH_TRAFLOG_FMT=/usr/local/etc/traflog.format
+PATH_TRAFLOG_FMT=/etc/traflog.format
# Only group wheel can execute binary files.
SHELL = /bin/sh
@@ -35,17 +35,17 @@ MODE = 750
GROUP = wheel
# This options intended for BSD/OS V2.
-CC = gcc
-FLAGS = -O2
+CC ?= gcc
+#FLAGS = -O2
DEFINE = -DRETSIGTYPE=void -DRETSIGVAL=
#DEFINE += -DHAVE_FCNTL_H=1
#DEFINE += -DHAVE_MEMORY_H=1
#DEFINE += -DHAVE_MALLOC_H=1
-LDFLAGS = -L../lib -lbpft -lpcap -lcurses -ltermcap -ll
+LDFLAGS = -L../lib -lbpft -lpcap -lcurses -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}\"\
@@ -64,15 +64,15 @@ all:
@echo "Done."
install: all
- install -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 -o root -g ${GROUP} -m ${MODE} traflog/traflog.format ${PATH_TRAFLOG_FMT}
+ ${INSTALL_PROGRAM} trafd/trafd ${PATH_BINDIR}
+ ${INSTALL_SCRIPT} trafd/trafstart ${PATH_BINDIR}
+ ${INSTALL_SCRIPT} trafd/trafstop ${PATH_BINDIR}
+ ${INSTALL_SCRIPT} trafd/trafsave ${PATH_BINDIR}
+ ${INSTALL_SCRIPT} trafd/trafdump ${PATH_BINDIR}
+ ${INSTALL_PROGRAM} trafstat/trafstat ${PATH_BINDIR}
+ ${INSTALL_PROGRAM} trafstatd/trafstatd ${PATH_BINDIR}
+ ${INSTALL_PROGRAM} traflog/traflog ${PATH_BINDIR}
+ ${INSTALL_SCRIPT} traflog/traflog.format ${PATH_TRAFLOG_FMT}
@echo Done.
clean: