/[gentoo-x86]/eclass/nxserver.eclass
Gentoo

Contents of /eclass/nxserver.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.24 - (show annotations) (download)
Mon Nov 30 04:19:36 2009 UTC (5 years, 3 months ago) by abcd
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +1 -1 lines
FILE REMOVED
Remove eclasses that have been marked as deprecated for >=2 years; schedule other deprecated eclasses for removal

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/nxserver.eclass,v 1.23 2007/07/02 14:24:27 peper Exp $
4 #
5 # DEPRECATED
6 # eclass for handling the different nxserver binaries available
7 # from nomachine's website
8
9 inherit rpm
10
11
12 HOMEPAGE="http://www.nomachine.com/"
13 IUSE=""
14 LICENSE="nomachine"
15 SLOT="0"
16 KEYWORDS="x86 -ppc -sparc -alpha -mips"
17 RESTRICT="mirror strip"
18
19 SRC_URI="nxserver-${MY_PV}.i386.rpm"
20 RDEPEND=">=media-libs/jpeg-6b-r3
21 >=sys-libs/glibc-2.3.2-r1
22 >=sys-libs/zlib-1.1.4-r1
23 >=net-misc/openssh-3.6.1_p2
24 >=dev-lang/perl-5.8.0-r12"
25
26 DEPEND=">=sys-apps/shadow-4.0.3-r6
27 >=net-misc/openssh-3.6.1_p2"
28
29 S="${WORKDIR}"
30
31 DESCRIPTION="an X11/RDP/VNC proxy server especially well suited to low bandwidth links such as wireless, WANS, and worse"
32
33 EXPORT_FUNCTIONS pkg_nofetch src_compile src_install pkg_postinst
34
35 nxserver_pkg_nofetch () {
36 eerror "This package requires you to purchase NX Server from:"
37 eerror
38 eerror " http://www.nomachine.com/download.php"
39 eerror
40 eerror "Please purchase the *$1* edition of NX Server packaged for"
41 eerror "RedHat 9.0 and put the RPM file nxserver-1.2.2-72.i386.rpm"
42 eerror "into $DISTDIR/"
43 eerror
44 eerror "This ebuild will also work with the evaluation version of"
45 eerror "the *$1* edition of NX Server packaged for RedHat 9.0"
46
47 die "Automatic download not supported"
48 }
49
50 nxserver_src_compile() {
51 return;
52 }
53
54 nxserver_src_install() {
55 einfo "Installing"
56 find usr/NX/lib -type l -exec rm {} \;
57
58 # NX changed the name of the passwords sample file in 1.3.0
59
60 for x in passwd.sample passwords.sample ; do
61 if [ -f usr/NX/etc/$x ]; then
62 mv usr/NX/etc/$x usr/NX/etc/`basename $x .sample`
63 fi
64 done
65
66 tar -cf - * | ( cd ${D} ; tar -xf - )
67
68 dodir /usr/NX/var
69 dodir /usr/NX/var/sessions
70 touch ${D}/usr/NX/var/sessions/NOT_EMPTY
71
72 doenvd ${FILESDIR}/${PV}/50nxserver
73 }
74
75 nxserver_pkg_postinst() {
76
77 # this is support for users upgrading from NX 1.2.2 to 1.3.0
78
79 l_szPasswd=passwd
80
81 if [ -f /usr/NX/etc/passwd -a -f /usr/NX/etc/passwords ]; then
82 mv /usr/NX/etc/passwd /usr/NX/etc/passwords
83 fi
84 if [ -f /usr/NX/etc/passwords ]; then
85 l_szPasswd=passwords
86 fi
87
88 l_szHome=nxhome
89 if [ -d /usr/NX/home ]; then
90 l_szHome=home
91 fi
92
93 if [ -d /usr/NX/nxhome -a -d /usr/NX/home ]; then
94 einfo "Moving home directory of user 'nx' to /usr/NX/home"
95 usermod -d /usr/NX/home nx
96 fi
97
98 # end of upgrade support
99
100 einfo "Adding user 'nx' for the NX server"
101 enewuser nx -1 /usr/NX/bin/nxserver /usr/NX/$l_szHome
102
103 einfo "Changing permissions for files under /usr/NX"
104 chown nx:root /usr/NX/etc/$l_szPasswd
105 chmod 0600 /usr/NX/etc/$l_szPasswd
106 chown -R nx:root /usr/NX/$l_szHome
107 chown -R nx:root /usr/NX/var
108
109 einfo "Generating SSH keys for the 'nx' user"
110 if [ ! -f /usr/NX/etc/users.id_dsa ]; then
111 ssh-keygen -q -t dsa -N '' -f /usr/NX/etc/users.id_dsa
112 fi
113 chown nx:root /usr/NX/etc/users.id_dsa
114 cp -f /usr/NX/$l_szHome/.ssh/server.id_dsa.pub.key /usr/NX/$l_szHome/.ssh/authorized_keys2
115
116 if [ ! -f /usr/NX/var/broadcast.txt ]; then
117 einfo "Creating NX user registration database"
118 touch /usr/NX/var/broadcast.txt
119 chown nx:root /usr/NX/var/broadcast.txt
120
121 ewarn "None of your system users are registered to use the NX Server."
122 ewarn "To authorise a user, run:"
123 ewarn "'/usr/NX/bin/nxserver --useradd <username>'"
124 fi
125
126 if [ ! -f /usr/NX/etc/key.txt ] ; then
127 ewarn
128 ewarn "You need to place your NX key.txt file into /usr/NX/etc/"
129 ewarn "If you don't have one already, you can get an evaluation"
130 ewarn "key, or purchase a full license, from www.nomachine.com"
131 ewarn
132 fi
133
134 if [ ! -f /usr/NX/etc/node.conf ] ; then
135 ewarn
136 ewarn "To complete the installation, you must create a file called"
137 ewarn "'/usr/NX/etc/node.conf'. An example configuration file can"
138 ewarn "be found in /usr/NX/etc"
139 ewarn
140 fi
141 }

  ViewVC Help
Powered by ViewVC 1.1.20