aboutsummaryrefslogtreecommitdiffstats
path: root/net/sslh/Makefile
blob: 032f1461615e333efbdadf5649d44d9e86c12f5a (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
58
59
60
61
62
63
# Created by: Jui-Nan Lin <jnlin@csie.nctu.edu.tw>
# $FreeBSD$

PORTNAME=   sslh
PORTVERSION=    1.18
DISTVERSIONPREFIX=  v
CATEGORIES= net

MAINTAINER= olivier@FreeBSD.org
COMMENT=    SSL/SSH multiplexer

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/COPYING

LIB_DEPENDS=    libconfig.so:devel/libconfig

USE_GITHUB= yes
GH_ACCOUNT= yrutschle

USES=       gmake perl5
USE_PERL5=  build

OPTIONS_DEFINE= EXAMPLES LIBWRAP
OPTIONS_DEFAULT=    EXAMPLES LIBWRAP

CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PLIST_FILES=    sbin/sslh-fork \
        sbin/sslh-select \
        etc/sslh.conf.sample \
        man/man8/sslh.8.gz

USE_RC_SUBR=    sslh

PORTEXAMPLES=   example.cfg

MAKE_JOBS_UNSAFE=   yes

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MLIBWRAP}
MAKE_ENV+=  USELIBWRAP=1
.endif

post-patch:
    @${REINPLACE_CMD} -Ee 's,^(release=)$$,\1${PORTVERSION},' \
        ${WRKSRC}/genver.sh
    @${REINPLACE_CMD} -Ee 's,/etc/init.d/(sslh),${PREFIX}/etc/rc.d/\1,g; \
        s,/etc/default/(sslh),${PREFIX}/etc/\1.conf,g' \
        ${WRKSRC}/sslh.pod

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/sslh-fork ${STAGEDIR}${PREFIX}/sbin
    ${INSTALL_PROGRAM} ${WRKSRC}/sslh-select ${STAGEDIR}${PREFIX}/sbin
    ${INSTALL_DATA} ${WRKSRC}/basic.cfg \
        ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
    ${INSTALL_MAN} ${WRKSRC}/sslh.8.gz ${STAGEDIR}${MANPREFIX}/man/man8
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${PORTEXAMPLES:S,^,${WRKSRC}/,} \
        ${STAGEDIR}${EXAMPLESDIR}/

.include <bsd.port.mk>