aboutsummaryrefslogtreecommitdiffstats
path: root/net/datapipe/Makefile
blob: dd836514146eaae537a533ec7e596839009b38ee (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
# Created by: Daniel Baker <dbaker@FreeBSD.org> <dbaker@cuckoo.com>
# $FreeBSD$

PORTNAME=   datapipe
PORTVERSION=    1.0
PORTREVISION=   1
CATEGORIES= net
MASTER_SITES=   ftp://ftp.distributed.net/pub/dcti/unsupported/ \
        http://http.distributed.net/pub/dcti/unsupported/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Bind a local port and connect it to a remote socket

PLIST_FILES=    bin/datapipe

OPTIONS_DEFINE= REUSEADDR NOFORK
OPTIONS_DEFAULT=    REUSEADDR
REUSEADDR_DESC= Reuse the listening socket address
NOFORK_DESC=    Do not fork and background

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MREUSEADDR}
CFLAGS+=    -DDATAPIPE_REUSEADDR
.endif

.if ${PORT_OPTIONS:MNOFORK}
CFLAGS+=    -DDATAPIPE_NOFORK
PKGNAMESUFFIX+=-nofork
.endif

do-build:
    ${CC} ${CFLAGS} -o ${WRKDIR}/${DISTNAME}/datapipe ${WRKDIR}/${DISTNAME}/datapipe.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/datapipe ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.post.mk>