aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nettop/Makefile
blob: 15dbb7d9171790eaceaa5e8ba125c1a27607461f (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
# New ports collection makefile for:	nettop
# Date created:				21 April 2006
# Whom:	      				Yen-Ming Lee <leeym@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	nettop
PORTVERSION=	0.2.3
PORTREVISION=	2
CATEGORIES=	net-mgmt
MASTER_SITES=	http://srparish.net/scripts/

MAINTAINER=	leeym@FreeBSD.org
COMMENT=	A program which looks like top, but is for network packets

LIB_DEPENDS=	slang.2:${PORTSDIR}/devel/libslang2

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-slang-libraries=${LOCALBASE}/lib \
		--with-slang-includes=${LOCALBASE}/include
CONFIGURE_ENV=	LDFLAGS="-lcurses"

PLIST_FILES=	bin/nettop
PORTDOCS=	README THANKS ChangeLog

post-patch:
	${REINPLACE_CMD} -e '/count.*size/s/(int) //g' ${WRKSRC}/nettop.c
.if !exists(/usr/lib/libpthread.so)
	${REINPLACE_CMD} -e 's/lpthread/lc_r/g' ${WRKSRC}/${CONFIGURE_SCRIPT}
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif

.include <bsd.port.mk>