summaryrefslogtreecommitdiffstats
path: root/sysutils/pfstat/Makefile
blob: e2b9387c0e739738f97693958b4102d5e518c17b (plain)
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
# New ports collection makefile for:	pfstat
# Date created:		10 October 2003
# Whom:			Max Laier <max@love2party.net>
#
# $FreeBSD$
#

PORTNAME=	pfstat
PORTVERSION=	1.7
CATEGORIES=	sysutils net
MASTER_SITES=	http://www.benzedrine.cx/
DISTNAME=	${PORTNAME}-${PORTVERSION}

MAINTAINER=	mlaier@freebsd.org
COMMENT=	Utility to render grafical statistics for pf

.if defined(WITH_GD1)
LIB_DEPENDS=	gd1.2:${PORTSDIR}/graphics/gd1
CFLAGS+=	-I${LOCALBASE}/include/gd
MAKE_ARGS=	"LD_GD=gd1"
.else
LIB_DEPENDS=	gd.4:${PORTSDIR}/graphics/gd
MAKE_ARGS=	"LD_GD=gd"
.endif

USE_REINPLACE=	yes

MAN8=		pfstat.8

MANCOMPRESSED=	no
PLIST_FILES=	bin/pfstat

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
IGNORE=		"Only for 5.0 and above"
.endif

.if ${OSVERSION} < 502106
BUILD_DEPENDS=	${LOCALBASE}/include/pf/net/pfvar.h:${PORTSDIR}/security/pf
RUN_DEPENDS=	${LOCALBASE}/modules/pf.ko:${PORTSDIR}/security/pf

CFLAGS+=	-I${LOCALBASE}/include/pf
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|-lgd|-l$${LD_GD}|; s| -lttf||' \
		${WRKSRC}/Makefile

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/pfstat ${PREFIX}/bin
	${INSTALL_MAN} ${WRKSRC}/pfstat.8 ${PREFIX}/man/man8

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud