/[gentoo-x86]/net-misc/nxserver-freeedition/nxserver-freeedition-3.0.0-r2.ebuild
Gentoo

Contents of /net-misc/nxserver-freeedition/nxserver-freeedition-3.0.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Sep 20 23:19:27 2007 UTC (12 years, 5 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Remove vulnerable NX 2.1 versions, security bug #192712
(Portage version: 2.1.3.9)

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/nxserver-freeedition/nxserver-freeedition-3.0.0-r2.ebuild,v 1.1 2007/07/22 14:38:37 voyageur Exp $
4
5 inherit eutils
6
7 DESCRIPTION="Free edition NX server from NoMachine"
8 HOMEPAGE="http://www.nomachine.com/"
9 SRC_URI="amd64? ( http://64.34.161.181/download/3.0.0/Linux/FE/nxserver-${PV}-63.x86_64.tar.gz )
10 x86? ( http://64.34.161.181/download/3.0.0/Linux/FE/nxserver-${PV}-63.i386.tar.gz )"
11
12 LICENSE="nomachine"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE=""
16 RESTRICT="strip"
17
18 DEPEND="=net-misc/nxnode-3.0*
19 !net-misc/nxserver-freenx
20 !net-misc/nxserver-2xterminalserver"
21 RDEPEND="${DEPEND}
22 media-fonts/font-misc-misc
23 media-fonts/font-cursor-misc
24 x11-apps/xauth"
25
26 S="${WORKDIR}"/NX
27
28 pkg_preinst()
29 {
30 enewuser nx -1 -1 /usr/NX/home/nx
31 }
32
33 src_unpack()
34 {
35 unpack ${A}
36 cd ${S}
37 epatch ${FILESDIR}/nxserver-3.0.0-setup.patch
38 }
39
40 src_install()
41 {
42 # we install nxserver into /usr/NX, to make sure it doesn't clash
43 # with libraries installed for FreeNX
44
45 into /usr/NX
46 for x in nxserver ; do
47 dobin bin/$x
48 done
49
50 dodir /usr/NX/etc
51 insinto /usr/NX/etc
52 doins etc/administrators.db.sample
53 doins etc/guests.db.sample
54 doins etc/passwords.db.sample
55 doins etc/profiles.db.sample
56 doins etc/users.db.sample
57 doins etc/server.lic.sample
58
59 newins etc/server-debian.cfg.sample server-gentoo.cfg.sample
60
61 cp -R etc/keys ${D}/usr/NX/etc || die
62
63 cp -R home ${D}/usr/NX || die
64 cp -R lib ${D}/usr/NX || die
65 cp -R scripts ${D}/usr/NX || die
66 cp -R share ${D}/usr/NX || die
67 cp -R var ${D}/usr/NX || die
68
69 newinitd ${FILESDIR}/nxserver-2.1.0-init nxserver
70 }
71
72 pkg_postinst ()
73 {
74 usermod -s /usr/NX/bin/nxserver nx || die "Unable to set login shell of nx user!!"
75 usermod -d /usr/NX/home/nx nx || die "Unable to set home directory of nx user!!"
76
77 # only run install when no configuration file is found
78 if [ -f /usr/NX/etc/server.cfg ]; then
79 einfo "Running NoMachine's update script"
80 ${ROOT}/usr/NX/scripts/setup/nxserver --update
81 else
82 einfo "Running NoMachine's setup script"
83 ${ROOT}/usr/NX/scripts/setup/nxserver --install
84 fi
85
86 elog "Remember to add nxserver to your default runlevel"
87 }

  ViewVC Help
Powered by ViewVC 1.1.20