aboutsummaryrefslogtreecommitdiffstats
path: root/net/ssvnc/Makefile
blob: 14c32ee2ea07710849c3e4b48bba0225b80fc5a9 (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
64
65
66
67
68
69
# Created by: Alejandro Pulver <alepulver@FreeBSD.org>
# $FreeBSD$

PORTNAME=   ssvnc
PORTVERSION=    1.0.29
CATEGORIES= net security
MASTER_SITES=   SF
DISTFILES=  ${DISTNAME}.src${EXTRACT_SUFX}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/COPYING

LIB_DEPENDS=    jpeg.11:${PORTSDIR}/graphics/jpeg
RUN_DEPENDS=    stunnel:${PORTSDIR}/security/stunnel \
        xterm:${PORTSDIR}/x11/xterm

OPTIONS_DEFINE= ULTRAFTP DOCS
ULTRAFTP_DESC=  UltraVNC File Transfer support (Java required)

USES=       imake:env gmake
USE_XORG=   xi xmu xt xaw ice xpm xext sm
USE_TK_WRAPPER= yes
USE_PERL5_RUN=  yes

MAN1=       ssvnc.1 ssvncviewer.1
NO_INSTALL_MANPAGES=    yes

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MULTRAFTP}
USE_JAVA=   yes
PLIST_SUB+= ULTRAFTP=""
.else
PLIST_SUB+= ULTRAFTP="@comment "
.endif

.if ! ${PORT_OPTIONS:MDOCS}
MAKE_ARGS+= DOCS=""
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|grep Linux|grep ${OPSYS}|' ${WRKSRC}/scripts/util/ss_vncviewer
    @${REINPLACE_CMD} -e 's|[[:<:]]ssvnc[[:>:]]|ssvnc-gui|' ${WRKSRC}/man/man1/ssvnc.1
    @${REINPLACE_CMD} -e 's|/usr/local/bin|${LOCALBASE}/bin|' \
        -e 's|^CC =|CC ?=|' ${WRKSRC}/vncstorepw/Makefile
.if ! ${PORT_OPTIONS:MULTRAFTP}
    @${REINPLACE_CMD} -e "s|sh -c 'type javac'|:|" \
        -e "s|sh -c 'type jar'|:|" \
        -e 's|cd $$(JSRC);|: |' \
        -e 's|cp -p $$(ARCHIVE)|:|' \
        ${WRKSRC}/Makefile
.endif

do-configure:
    @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} config

post-install:
    @${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${MAN1PREFIX}/man/man1
.for man in ${MAN1}
    ${INSTALL_MAN} ${WRKSRC}/man/man1/${man} ${MAN1PREFIX}/man/man1
.endfor
.endif

.include <bsd.port.mk>