aboutsummaryrefslogtreecommitdiffstats
path: root/net/x2goclient/Makefile
blob: 56a099e5b6adaf02058c2911e24fefd5327d66db (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
70
71
72
73
74
75
# Created by: arved
# $FreeBSD$

PORTNAME=   x2goclient
PORTVERSION=    4.0.1.1
CATEGORIES= net
MASTER_SITES=   http://code.x2go.org/releases/source/x2goclient/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Qt client for the X2Go system

LICENSE=    GPLv2

LIB_DEPENDS=    libcups.so:${PORTSDIR}/print/cups-client \
        libssh.so:${PORTSDIR}/security/libssh
RUN_DEPENDS=    nxproxy:${PORTSDIR}/net/nxproxy \
        x2goclient-cli:${PORTSDIR}/net/x2goclient-cli

OPTIONS_DEFINE= LDAP DOCS
OPTIONS_DEFAULT=LDAP

USE_XORG=   xpm
USE_QT4=    gui network svg \
        linguist_build moc_build qmake_build rcc_build uic_build
QMAKEFLAGS= QMAKE_LRELEASE="${QT_PREFIX}/bin/lrelease-qt4"
INSTALLS_ICONS= yes

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MLDAP}
USE_OPENLDAP=   yes
CFLAGS+=    -DUSELDAP
QMAKEFLAGS+=    LIBS+="-lX11 -lXpm -lcups -lldap"
.else
QMAKEFLAGS+=    LIBS+="-lX11 -lXpm -lcups"
.endif

post-patch:
    @${FIND} ${WRKSRC} -name "*.cpp" -or -name "*.h" | ${XARGS} \
        ${REINPLACE_CMD} -e \
        's|Q_OS_LINUX|Q_OS_UNIX| ; \
         /<linux\/fs.h>/s|^|//| ; \
         /#define USELDAP/s|^|//|'

do-configure:
    @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${QMAKE} ${QMAKEFLAGS})

pre-build:
    @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
        ${MAKEFILE} compiler_TSQM_make_all)

do-install:
    (cd ${WRKSRC} && ${INSTALL_PROGRAM} x2goclient \
        ${STAGEDIR}${PREFIX}/bin)
    (cd ${WRKSRC}/man/man1 && ${INSTALL_MAN} x2goclient.1 \
        ${STAGEDIR}${MANPREFIX}/man/man1)
    @${MKDIR} ${STAGEDIR}${DESKTOPDIR}
    (cd ${WRKSRC}/desktop && ${INSTALL_DATA} x2goclient.desktop \
        ${STAGEDIR}${DESKTOPDIR})
.for i in 16x16 32x32 48x48 64x64 128x128
    @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}/apps
    (cd ${WRKSRC}/icons/${i} && ${INSTALL_DATA} x2goclient.png \
        ${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}/apps)
.endfor
    @${MKDIR} ${STAGEDIR}${DATADIR}/icons
    (cd ${WRKSRC}/icons && ${INSTALL_DATA} x2goclient.xpm \
        ${STAGEDIR}${DATADIR}/icons)
.for i in x2goclient.png x2gosession.png 
    (cd ${WRKSRC}/icons/128x128 && ${INSTALL_DATA} ${i} \
        ${STAGEDIR}${DATADIR}/icons)
.endfor
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    (cd ${WRKSRC} && ${INSTALL_DATA} HOWTO.GPGCARD ${STAGEDIR}${DOCSDIR})

.include <bsd.port.mk>