summaryrefslogtreecommitdiff
path: root/net/tdetect/Makefile
blob: 55bacf9e3d455dee29b1b6f1bc447e48d2d2bad6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# New ports collection makefile for:   tdetect
# Ports collection makefile for:  tdetect
# Version required:     	  0.2
# Date created:			  Sun Jan 31, 1997
# Whom:               		  shipley@dis.org
#
# $FreeBSD$
#

DISTNAME=	tdetect-0.2
PKGNAME=	tdetect-0.2.1
CATEGORIES=	net
MASTER_SITES=	http://sb.123.org/ \
		http://www.genocide2600.com/~tattooman/unix-loggers/ \
		http://ftp.ceti.com.pl/pub/scout/progs/Unix/

MAINTAINER=	shipley@dis.org

.include <bsd.port.pre.mk>

pre-configure:
	${PERL} -pi.dist -e 's/trdetect/tdetect/g' ${WRKSRC}/config.h
.if ${OSVERSION} > 330002
	${PERL} -pi.orig -e 's/LOG_AUTHPRIV/LOG_SECURITY/g' ${WRKSRC}/config.h
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/tdetect ${PREFIX}/sbin/tdetect

post-install:
	strip ${PREFIX}/sbin/tdetect
	@if [ ! -f ${PREFIX}/etc/rc.d/tdetect.sh ]; then \
		${ECHO} "Installing ${PREFIX}/etc/rc.d/tdetect.sh startup file."; \
		${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/tdetect.sh; \
		${ECHO} "ETHERNETDEV=ed0" >> ${PREFIX}/etc/rc.d/tdetect.sh; \
		${ECHO} '[ -x ${PREFIX}/sbin/tdetect ] && ${PREFIX}/sbin/tdetect \$ETHERNETDEV && ${ECHO} -n " tdetect"' >> ${PREFIX}/etc/rc.d/tdetect.sh; \
		${CHMOD} 750 ${PREFIX}/etc/rc.d/tdetect.sh; \
		${ECHO} ''; \
		${ECHO} 'IMPORTANT edit ${PREFIX}/etc/rc.d/tdetect.sh and set "ETHERNETDEV" to'; \
		${ECHO} "the name of the ethernetdev you wish to monitor"; \
		${ECHO} ''; \
	fi

.include <bsd.port.post.mk>