summaryrefslogtreecommitdiff
blob: 3447560799b48928cfce4c31b8c87a357ea191b1 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit webapp

DESCRIPTION="web companion client for NoMachine NX servers"
HOMEPAGE="http://www.nomachine.com/"

SRC_URI="http://64.34.161.181/download/${PV}/Linux/nxplugin-${PV}-5.i386.tar.gz"
LICENSE="nomachine"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=">=net-misc/nxserver-freeedition-3.0.0"
RDEPEND="${DEPEND}"

src_install() {
	webapp_src_preinst

	einfo "Patching nxapplet.html with server hostname: ${VHOST_HOSTNAME}"
	sed -i -e "s|http://webserver|http://${VHOST_HOSTNAME}/${PN}|" usr/NX/share/plugin/nxapplet.html
	[ "$VHOST_HOSTNAME" = localhost ] && ewarn "Server hostname is localhost, the plugin will not be usable from remote hosts"

	cp -R usr/NX/share/* "${D}"/${MY_HTDOCSDIR}

	#TODO: webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
	# Note to the user that she can access the client at http://localhost/nxweb/plugin/nxapplet.html

	webapp_src_install
}