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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Mar 10 00:55:38 2008 UTC (11 years, 6 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix license file ownership, remove some versions (security bug #210317)
(Portage version: 2.1.4.4)

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

  ViewVC Help
Powered by ViewVC 1.1.20