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

Contents of /eclass/nxserver-1.3.2.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Mon Nov 30 04:19:36 2009 UTC (5 years, 8 months ago) by abcd
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +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-1.3.2.eclass,v 1.16 2007/07/02 14:17:26 peper Exp $
4 #
5 # DEPRECATED
6 # eclass for handling the different nxserver binaries available
7 # from nomachine's website
8
9 inherit rpm eutils
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 DEPEND="$DEPEND
21 >=net-misc/nxclient-1.3.2"
22
23 RDEPEND="$RDEPEND
24 >=media-libs/jpeg-6b-r3
25 >=sys-libs/glibc-2.3.2-r1
26 >=sys-libs/zlib-1.1.4-r1
27 >=net-misc/openssh-3.6.1_p2
28 >=dev-lang/perl-5.8.0-r12"
29
30 DEPEND="$DEPEND
31 >=sys-apps/shadow-4.0.3-r6
32 >=net-misc/openssh-3.6.1_p2
33 >=net-misc/nxssh-1.3.2
34 >=net-misc/nxproxy-1.3.2"
35
36 S="${WORKDIR}"
37
38 DESCRIPTION="an X11/RDP/VNC proxy server especially well suited to low bandwidth links such as wireless, WANS, and worse"
39
40 EXPORT_FUNCTIONS pkg_nofetch src_compile src_install pkg_postinst
41
42 nxserver-1.3.2_pkg_nofetch () {
43 eerror "This package requires you to purchase NX Server from:"
44 eerror
45 eerror " http://www.nomachine.com/download.php"
46 eerror
47 eerror "Please purchase the *$1* edition of NX Server packaged for"
48 eerror "RedHat 9.0 and put the RPM file nxserver-1.2.2-72.i386.rpm"
49 eerror "into $DISTDIR/"
50 eerror
51 eerror "This ebuild will also work with the evaluation version of"
52 eerror "the *$1* edition of NX Server packaged for RedHat 9.0"
53
54 die "Automatic download not supported"
55 }
56
57 nxserver-1.3.2_src_compile() {
58 return;
59 }
60
61 nxserver-1.3.2_src_install() {
62 einfo "Installing"
63 find usr/NX/lib -type l -exec rm {} \;
64
65 # NX changed the name of the passwords sample file in 1.3.0
66
67 for x in passwd.sample passwords.sample ; do
68 if [ -f usr/NX/etc/$x ]; then
69 mv usr/NX/etc/$x usr/NX/etc/`basename $x .sample`
70 fi
71 done
72
73 tar -cf - * | ( cd ${D} ; tar -xf - )
74
75 dodir /usr/NX/var
76 dodir /usr/NX/var/sessions
77 touch ${D}/usr/NX/var/sessions/NOT_EMPTY
78
79 doenvd ${FILESDIR}/1.3.0/50nxserver
80 }
81
82 nxserver-1.3.2_pkg_postinst() {
83
84 # arg - the 'nx' user's home directory keeps moving
85 #
86 # release user homedir
87 # 1.2.2 nx /usr/NX/home/nx
88 # 1.3.0 nx /usr/NX/home
89 # 1.3.2 nx /usr/NX/home/nx
90
91 l_szPasswd=passwd
92
93 if [ -f /usr/NX/etc/passwd -a -f /usr/NX/etc/passwords ]; then
94 mv /usr/NX/etc/passwd /usr/NX/etc/passwords
95 fi
96 if [ -f /usr/NX/etc/passwords ]; then
97 l_szPasswd=passwords
98 fi
99
100 # end of upgrade support
101
102 einfo "Adding user 'nx' for the NX server"
103 enewuser nx -1 /usr/NX/bin/nxserver /usr/NX/home/nx
104
105 # we do this to move the home directory of older installs
106
107 einfo "Setting home directory of user 'nx' to /usr/NX/home/nx"
108 usermod -d /usr/NX/home/nx nx
109
110 einfo "Changing permissions for files under /usr/NX"
111 chown nx:root /usr/NX/etc/$l_szPasswd
112 chmod 0600 /usr/NX/etc/$l_szPasswd
113 chown -R nx:root /usr/NX/home/nx
114 chown -R nx:root /usr/NX/var
115
116 einfo "Generating SSH keys for the 'nx' user"
117 if [ ! -f /usr/NX/etc/users.id_dsa ]; then
118 ssh-keygen -q -t dsa -N '' -f /usr/NX/etc/users.id_dsa
119 fi
120 chown nx:root /usr/NX/etc/users.id_dsa
121 cp -f /usr/NX/home/nx/.ssh/server.id_dsa.pub.key /usr/NX/home/nx/.ssh/authorized_keys2
122
123 if [ ! -f /usr/NX/var/broadcast.txt ]; then
124 einfo "Creating NX user registration database"
125 touch /usr/NX/var/broadcast.txt
126 chown nx:root /usr/NX/var/broadcast.txt
127
128 ewarn "None of your system users are registered to use the NX Server."
129 ewarn "To authorise a user, run:"
130 ewarn "'/usr/NX/bin/nxserver --useradd <username>'"
131 fi
132
133 if [ ! -f /usr/NX/etc/key.txt ] ; then
134 ewarn
135 ewarn "You need to place your NX key.txt file into /usr/NX/etc/"
136 ewarn "If you don't have one already, you can get an evaluation"
137 ewarn "key, or purchase a full license, from www.nomachine.com"
138 ewarn
139 fi
140
141 if [ ! -f /usr/NX/etc/node.conf ] ; then
142 ewarn
143 ewarn "To complete the installation, you must create a file called"
144 ewarn "'/usr/NX/etc/node.conf'. An example configuration file can"
145 ewarn "be found in /usr/NX/etc"
146 ewarn
147 fi
148
149 # regen the ld.so cache, because Portage sometimes doesn't
150 ldconfig -v > /dev/null
151 }

  ViewVC Help
Powered by ViewVC 1.1.20