aboutsummaryrefslogtreecommitdiffstats
path: root/net/vtun/Makefile
blob: 3451d6206f4cc99a3cf4a718eaf24dff0fecead8 (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
52
53
54
55
56
57
# Created by: Kevin Lo <kevlo@FreeBSD.org>
# $FreeBSD$

PORTNAME=   vtun
PORTVERSION=    3.0.4
PORTREVISION=   3
CATEGORIES= net
MASTER_SITES=   SF

MAINTAINER= cy@FreeBSD.org
COMMENT=    Virtual Tunnels over TCP/IP networks with traffic shaping

LICENSE=        GPLv2

LIB_DEPENDS=    liblzo2.so:archivers/lzo2

CFLAGS+=    -ansi -Wno-pointer-sign -I${LOCALBASE}/include
USES=       ssl
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --localstatedir=/var \
        --with-ssl-headers=${OPENSSLINC} \
        --with-ssl-lib=${OPENSSLLIB} \
        --with-lzo-headers=${LOCALBASE}/include/lzo \
        --with-lzo-lib=${LOCALBASE}/lib
CONFIGURE_ENV=  YACC=${YACC}
USE_RC_SUBR=    vtunclient vtund

ALL_TARGET= vtund

DOCS=       ChangeLog Credits FAQ README README.LZO README.Setup \
        README.Shaper TODO

OPTIONS_DEFINE= DOCS

# Extended mode patches, obtained from
# http://home.jp.FreeBSD.org/~simokawa/vtun-v6.html
# are now dynamically enabled using the -e option.

.include <bsd.port.options.mk>

post-patch:
    ${REINPLACE_CMD} \
        -e 's|$$\(SSL_HDR_DIR\)|$$\1 $$\1/openssl|g' \
        -e 's|$$\(BLOWFISH_HDR_DIR\)|$$\1 $$SSL_HDR_DIR/openssl|g' \
        ${WRKSRC}/configure

post-install:
    @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/vtund
    @${INSTALL_DATA} ${WRKSRC}/vtund.conf ${STAGEDIR}${PREFIX}/etc/vtund.conf.sample
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
.for doc in ${DOCS}
    @${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
.endfor
    @cd ${STAGEDIR}${PREFIX}/man/man1/ && \
    ${LN} -s vtund.8 ../man1/vtun.1

.include <bsd.port.mk>