aboutsummaryrefslogtreecommitdiffstats
path: root/net/linux-nx-client/Makefile
blob: bd0d3ffc84be6c94c6ffa32fa198ceb4451a4703 (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
# New ports collection makefile for:    linux-nx-client
# Date created:         01 Sep 2004
# Whom:             Jean-Yves Lefort <jylefort@brutele.be>
#
# $FreeBSD$
#

PORTNAME=       linux-nx-client
PORTVERSION=        1.4.0
CATEGORIES=     net
MASTER_SITES=       http://www.nomachine.com/download/nxclient/${PORTVERSION}/Linux-Static-Tar/
DISTNAME=       nxclient-${PORTVERSION}-91.i386

MAINTAINER=     jylefort@brutele.be
COMMENT=        The NoMachine NX client

RUN_DEPENDS=        ${LINUXBASE}/usr/lib/libjpeg.so.62:${PORTSDIR}/graphics/linux-jpeg

NO_WRKSUBDIR=       yes
USE_X_PREFIX=       yes
USE_LINUX=      yes
ONLY_FOR_ARCHS=     i386
NO_BUILD=       yes

NXSRC=          ${WRKSRC}/NX
NXDST=          ${PREFIX}/lib/linux-nx-client
ICONS3232=      nx.png nxclient-admin.png nxclient-wizard.png

# Linux binary should not be stripped by INSTALL_PROGRAM
# because as a side effect it brands the binary as FreeBSD.
STRIP=

PLIST_SUB+=     PORTVERSION=${PORTVERSION}

post-extract:
    ${CP} ${NXSRC}/share/applnk/NX\ Client\ for\ Linux/* ${WRKSRC}

do-install:
    ${MKDIR} ${NXDST}/bin
    ${INSTALL_PROGRAM} ${NXSRC}/bin/* ${NXDST}/bin
    ${MKDIR} ${NXDST}/lib
    ${INSTALL_DATA} ${NXSRC}/lib/libXcomp.so.${PORTVERSION} ${NXDST}/lib
    ${LN} -sf libXcomp.so.${PORTVERSION} ${NXDST}/lib/libXcomp.so
    ${LN} -sf libXcomp.so.${PORTVERSION} ${NXDST}/lib/libXcomp.so.1
    ${MKDIR} ${NXDST}/share
    ${INSTALL_DATA} ${NXSRC}/share/client.id_dsa.key ${NXDST}/share
    ${MKDIR} ${NXDST}/share/images
    ${INSTALL_DATA} ${NXSRC}/share/images/* ${NXDST}/share/images

    ${MKDIR} ${PREFIX}/share/gnome/applications
    ${INSTALL_DATA} ${WRKSRC}/*.desktop ${PREFIX}/share/gnome/applications
    ${MKDIR} ${PREFIX}/share/gnome/pixmaps
    ${INSTALL_DATA} ${NXSRC}/share/icons/* ${PREFIX}/share/gnome/pixmaps
    ${MKDIR} ${LOCALBASE}/share/applnk/Internet
    ${INSTALL_DATA} ${WRKSRC}/*.desktop ${LOCALBASE}/share/applnk/Internet
    ${MKDIR} ${LOCALBASE}/share/icons/crystalsvg/48x48 \
        ${LOCALBASE}/share/icons/crystalsvg/32x32
    ${INSTALL_DATA} ${NXSRC}/share/icons/nx-desktop.png \
        ${LOCALBASE}/share/icons/crystalsvg/48x48
.for FILE in ${ICONS3232}
    ${INSTALL_DATA} ${NXSRC}/share/icons/${FILE} \
        ${LOCALBASE}/share/icons/crystalsvg/32x32
.endfor

    ${MKDIR} ${PREFIX}/bin
.for f in nxclient nxprint nxproxy nxssh
    ${ECHO_CMD} "#!/bin/sh" > ${WRKSRC}/${f}
    ${ECHO_CMD} "export NXDIR=${NXDST}" >> ${WRKSRC}/${f}
    ${ECHO_CMD} "exec \$$NXDIR/bin/${f} \"\$$@\"" >> ${WRKSRC}/${f}
    ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${PREFIX}/bin
.endfor

.include <bsd.port.mk>