/[gentoo-x86]/net-misc/nxnode/nxnode-3.2.0.ebuild
Gentoo

Contents of /net-misc/nxnode/nxnode-3.2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Fri May 29 13:54:39 2009 UTC (10 years, 3 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Removing 3.2 versions, including security-vulnerable 3.2.0, bug #271745
(Portage version: 2.2_rc33/cvs/Linux x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/nxnode/nxnode-3.2.0.ebuild,v 1.3 2008/06/05 15:11:07 pva Exp $
4
5 inherit eutils
6
7 MY_PV="${PV}-5"
8 DESCRIPTION="shared components between the different editions of NoMachine's NX
9 Servers"
10 HOMEPAGE="http://www.nomachine.com/"
11 SRC_URI="amd64? ( http://64.34.161.181/download/${PV}/Linux/nxnode-${MY_PV}.x86_64.tar.gz )
12 x86? ( http://64.34.161.181/download/${PV}/Linux/nxnode-${MY_PV}.i386.tar.gz )"
13
14 LICENSE="nomachine"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 IUSE="rdesktop vnc"
18 RESTRICT="strip"
19
20 DEPEND="!net-misc/nxserver-freenx
21 !<net-misc/nxserver-freeedition-3.0.0"
22
23 RDEPEND="=net-misc/nxclient-3.2*
24 x11-libs/libICE
25 x11-libs/libXmu
26 x11-libs/libSM
27 x11-libs/libXt
28 x11-libs/libXaw
29 x11-libs/libXpm
30 x11-apps/xrdb
31 rdesktop? ( net-misc/rdesktop )
32 vnc? ( || ( net-misc/vnc net-misc/tightvnc ) )"
33
34 S=${WORKDIR}/NX
35
36 pkg_preinst()
37 {
38 enewuser nx -1 -1 /usr/NX/home/nx
39 }
40
41 pkg_setup() {
42 if use vnc; then
43 if has_version net-misc/vnc && ! built_with_use net-misc/vnc server;
44 then
45 die "net-misc/vnc needs to be built with USE=\"server\" for VNC support"
46 fi
47
48 if has_version net-misc/tightvnc && ! built_with_use net-misc/tightvnc server;
49 then
50 die "net-misc/tightvnc needs to be built with USE=\"server\" for VNC support"
51 fi
52 fi
53 }
54
55 src_unpack()
56 {
57 unpack ${A}
58 cd "${S}"
59 epatch "${FILESDIR}"/nxnode-3.0.0-setup.patch
60 }
61
62 src_install()
63 {
64 # we install nxnode into /usr/NX, to make sure it doesn't clash
65 # with libraries installed for FreeNX
66
67 into /usr/NX
68 for x in nxagent nxnode nxsensor nxspool nxuexec ; do
69 dobin bin/$x
70 done
71
72 dodir /usr/NX/etc
73 cp etc/node-debian.cfg.sample "${D}"/usr/NX/etc/node-gentoo.cfg.sample || die
74 sed -e 's|COMMAND_FUSER = .*|COMMAND_FUSER = "/usr/bin/fuser"|;' -i "${D}"/usr/NX/etc/node-gentoo.cfg.sample || die
75 cp etc/node.lic.sample "${D}"/usr/NX/etc/node.lic.sample || die
76
77 dodir /usr/NX/lib
78 cp -R lib "${D}"/usr/NX || die
79
80 dodir /usr/NX/scripts
81 cp -R scripts "${D}"/usr/NX || die
82
83 dodir /usr/NX/share
84 cp -R share "${D}"/usr/NX || die
85
86 dodir /usr/NX/var
87 cp -R var "${D}"/usr/NX || die
88
89 dodir /etc/init.d
90 newinitd "${FILESDIR}"/nxnode-3.0.0-init nxsensor
91 }
92
93 pkg_postinst()
94 {
95 # Only install license file if none is found
96 if [ ! -f /usr/NX/etc/node.lic ]; then
97 cp "${ROOT}"/usr/NX/etc/node.lic.sample "${ROOT}"/usr/NX/etc/node.lic || die
98 chmod 0400 "${ROOT}"/usr/NX/etc/node.lic
99 chown nx:0 "${ROOT}"/usr/NX/etc/node.lic
100 fi
101
102 # only run install on the first time
103 if [ -f /usr/NX/etc/node.cfg ]; then
104 einfo "Running NoMachine's update script"
105 "${ROOT}"/usr/NX/scripts/setup/nxnode --update
106 else
107 einfo "Running NoMachine's setup script"
108 "${ROOT}"/usr/NX/scripts/setup/nxnode --install
109 fi
110
111 elog "If you want server statistics, please add nxsensor to your default runlevel"
112 elog
113 elog " rc-update add nxsensor default"
114 elog
115 elog "You will also need to change EnableSensor to 1 in /usr/NX/etc/node.cfg"
116 }

  ViewVC Help
Powered by ViewVC 1.1.20