aboutsummaryrefslogtreecommitdiff
path: root/net/netcat/Makefile
blob: 2207e4231ec0f9680194cf3e60a826d9f78903cf (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
# Created by: David O'Brien (obrien@cs.ucdavis.edu)

PORTNAME=	netcat
PORTVERSION=	1.10
PORTREVISION=	3
CATEGORIES=	net
MASTER_SITES=	SF/${DISTNAME}/unix%20netcat%20${PORTVERSION}%20by%20_Hobbit_/%5BUnnamed%20release%5D
DISTNAME=	nc${PORTVERSION:S/.//}

#PATCH_SITES=	ftp://sith.mimuw.edu.pl/pub/users/baggins/IPv6/
PATCH_SITES=	GENTOO
PATCHFILES=	nc-v6-20000918.patch.gz
PATCH_DIST_STRIP=	-p1

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Simple utility which reads and writes data across network connections

USES=		tar:tgz
NO_WRKSUBDIR=	yes

CFLAGS+=	-D${OPSYS:tu}
LDFLAGS+=	-static

PORTDOCS=	README
PLIST_FILES=	bin/netcat man/man1/netcat.1.gz

OPTIONS_DEFINE=	IPV6 TELNET GAPING DOCS
OPTIONS_DEFAULT=TELNET GAPING
TELNET_DESC=	Enable TELNET support
GAPING_DESC=	Enable GAPING_SECURITY_HOLE support

IPV6_CFLAGS=	-DINET6
TELNET_CFLAGS=	-DTELNET
GAPING_CFLAGS=	-DGAPING_SECURITY_HOLE

post-patch:
	@${SED} -e 's|%%DOCSDIR%%|${DOCSDIR}|g' ${FILESDIR}/nc.1 \
		> ${WRKDIR}/${PORTNAME}.1

do-build:
	cd ${WRKSRC} && ${CC} ${CFLAGS} ${PORTNAME}.c -o ${PORTNAME} ${LDFLAGS}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
	${INSTALL_MAN} ${WRKDIR}/${PORTNAME}.1 ${STAGEDIR}${MANPREFIX}/man/man1

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>