summaryrefslogtreecommitdiff
path: root/net/iplog/Makefile
blob: faa302074747c5759eadd2d2b6db1636284e0a99 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# New ports collection makefile for:        iplog
# Date created:		4 Oct 1999
# Whom:			Dominik Rothert <dr@domix.de>
#
# $FreeBSD$
#

PORTNAME=	iplog
PORTVERSION=	2.2.3
PORTREVISION=	2
CATEGORIES=	net security
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	ojnk

MAINTAINER=	udo.schweigert@siemens.com
COMMENT=	TCP/IP traffic logging tool

USE_GMAKE=	yes
USE_REINPLACE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CPPFLAGS=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS=	-L${LOCALBASE}/lib ${PTHREAD_LIBS}
MAN5=	iplog.conf.5
MAN8=	iplog.8

.include <bsd.port.pre.mk>
post-patch:
.for FILE in example-iplog.conf iplog.8 iplog.conf.5 src/iplog.h
	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/${FILE}
.endfor
	@${REINPLACE_CMD} -e 's|-pthread||g' ${WRKSRC}/configure

post-install:
	${INSTALL_DATA} ${WRKSRC}/example-iplog.conf ${PREFIX}/etc
.if !exists(${PREFIX}/etc/iplog.conf)
	${INSTALL_DATA} ${WRKSRC}/example-iplog.conf ${PREFIX}/etc/iplog.conf
.endif
.if exists(${PREFIX}/etc/iplog.rules)
	@${ECHO_MSG}
	@${ECHO_MSG} "============================================================================"
	@${ECHO_MSG} "Hint:	iplog changed its configuration file from ${PREFIX}/etc/iplog.rules"
	@${ECHO_MSG} "	to ${PREFIX}/etc/iplog.conf"
	@${ECHO_MSG}
	@${ECHO_MSG} "See ${PREFIX}/etc/example-iplog.conf for an example"
	@${ECHO_MSG} "============================================================================"
.endif
	@${ECHO_MSG}
	@${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/iplog.sh.sample file."
	@${CAT} ${FILESDIR}/iplog.sh.tmpl | \
		${SED} -e 's;PREFIX;${PREFIX};' \
		> ${PREFIX}/etc/rc.d/iplog.sh.sample
	@${CHMOD} 555 ${PREFIX}/etc/rc.d/iplog.sh.sample
	@${ECHO_MSG} "----------------------------------------------------------------------------"
	@${ECHO_MSG} "If you want iplog to be run as a daemon then do:"
	@${ECHO_MSG} "cp -p ${PREFIX}/etc/rc.d/iplog.sh.sample ${PREFIX}/etc/rc.d/iplog.sh"
	@${ECHO_MSG} "----------------------------------------------------------------------------"
	@${ECHO_MSG}

.include <bsd.port.post.mk>