summaryrefslogtreecommitdiffstats
path: root/sysutils/pfstat/Makefile
blob: 7d4e84de70096fa91230b43cd211c8ea1aa914f9 (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
# Created by: Max Laier <max@love2party.net>
# $FreeBSD$

PORTNAME=	pfstat
PORTVERSION=	2.5
PORTREVISION=	3
CATEGORIES=	sysutils net
MASTER_SITES=	http://www.benzedrine.cx/

MAINTAINER=	araujo@FreeBSD.org
COMMENT=	Utility to render graphical statistics for pf

LIB_DEPENDS=	libgd.so:graphics/gd

MAKE_ARGS=	"LD_GD=gd"
MAKE_ENV+=	__MAKE_CONF=/dev/null
USES=		iconv

USE_RC_SUBR=	pfstatd

PLIST_FILES=	bin/pfstat \
		bin/pfstatd \
		man/man8/pfstat.8.gz \
		man/man8/pfstatd.8.gz

.include <bsd.port.pre.mk>

post-patch:
	@${REINPLACE_CMD} -e 's|-lgd|-l$${LD_GD}|; s| -lttf||' \
		${WRKSRC}/Makefile
	@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
		${WRKSRC}/pfstat.[c8]
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100070
	@${REINPLACE_CMD} 's|altq/|net/&|' ${WRKSRC}/pf.c
.endif

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

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