summaryrefslogtreecommitdiff
blob: 96bec3bb4e5680e0b44ed930bb1f416f2449f2d7 (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/nxclient-2xterminalserver/nxclient-2xterminalserver-1.5.0.ebuild,v 1.2 2007/04/30 13:34:53 voyageur Exp $

inherit eutils qt3

DESCRIPTION="2X Terminal Server GPL NX client, based on NoMachine code"
HOMEPAGE="http://www.2x.com/terminalserver/"
SRC_URI="http://code.2x.com/release/linuxterminalserver/src/linuxterminalserver-1.5.0-common-r21-src.tar.gz
	http://code.2x.com/release/linuxterminalserver/src/linuxterminalserver-1.5.0-client-r21-src.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="
	dev-libs/openssl
	media-libs/jpeg
	media-libs/libpng
	net-print/cups
	sys-libs/zlib
	=x11-libs/qt-3*
	!net-misc/nxclient"
RDEPEND="${DEPEND}"

S="${WORKDIR}"

src_unpack()
{
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/1.5.0/nxcomp-1.5.0-gcc4.patch
	epatch ${FILESDIR}/1.5.0/nxcomp-1.5.0-pic.patch

	# Set correct product name
	einfo "Setting official product name"
	find client/nxclient common/nx-X11/programs/Xserver/hw/nxagent/Args.c \
		-type f -exec sed -i "s/@PRODUCT_NAME@/2X TerminalServer/g" {} \;
}

src_compile()
{
	cd ${S}/common/nxcomp
	econf || die
	emake || die

	cd ${S}/common/nxssh
	econf || die
	emake || die

	cd ${S}/client/nxesd
	econf || die
	emake || die

	cd ${S}/client/nxclient
	econf || die
	emake || die

	cd ${S}/client/nxclient/nxprint
	emake || die
}

src_install() {
	# we install into /usr/NX, as NoMachine and 2X do

	for x in nxclient nxprint nxssh nxesd ; do
		make_wrapper $x ./$x /usr/NX/bin /usr/NX/lib || die
	done

	into /usr/NX
	dobin client/nxclient/nxclient
	dobin client/nxclient/nxprint/nxprint
	dobin client/nxesd/nxesd
	dobin common/nxssh/nxssh

	dodir /usr/NX/lib
	cp -P common/nxcomp/libXcomp.so* ${D}/usr/NX/lib || die

	dodir /usr/NX/share
	cp -R client/nxclient/share ${D}/usr/NX || die

	# Add icons/desktop entries
	doicon client/nxclient/share/icons/*.png
	make_desktop_entry "nxclient" "NX Client" nx-desktop.png
	make_desktop_entry "nxclient -admin" "NX Session Administrator" nxclient-admin.png
	make_desktop_entry "nxclient -wizard" "NX Connection Wizard" nxclient-wizard.png
}