/[gentoo-x86]/net-misc/nxserver-freenx/nxserver-freenx-0.6.0.ebuild
Gentoo

Contents of /net-misc/nxserver-freenx/nxserver-freenx-0.6.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Sep 20 23:16:10 2007 UTC (12 years, 2 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +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-freenx/nxserver-freenx-0.6.0.ebuild,v 1.5 2007/07/03 11:14:53 opfer Exp $
4
5 inherit multilib eutils
6
7 MY_PN="freenx"
8 DESCRIPTION="An X11/RDP/VNC proxy server especially well suited to low bandwidth links such as wireless, WANS, and worse"
9 HOMEPAGE="http://freenx.berlios.de/"
10 SRC_URI="http://download.berlios.de/${MY_PN}/${MY_PN}-${PV}.tar.gz"
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 x86"
14 RESTRICT="strip"
15 IUSE="arts cups esd nxclient"
16 DEPEND="virtual/ssh
17 dev-tcltk/expect
18 sys-apps/gawk
19 net-analyzer/gnu-netcat
20 nxclient? ( net-misc/nxclient )
21 !nxclient? ( !net-misc/nxclient
22 || ( x11-misc/xdialog
23 x11-apps/xmessage ) )
24 net-misc/nx
25 arts? ( kde-base/arts )
26 cups? ( net-print/cups )
27 esd? ( media-sound/esound )
28 !net-misc/nxserver-freeedition
29 !net-misc/nxserver-2xterminalserver"
30
31 RDEPEND="${DEPEND}
32 media-fonts/font-misc-misc
33 media-fonts/font-cursor-misc
34 x11-apps/xauth"
35
36 S=${WORKDIR}/${MY_PN}-${PV}
37
38 export NX_HOME_DIR=/var/lib/nxserver/home
39
40 pkg_setup () {
41 enewuser nx -1 -1 ${NX_HOME_DIR}
42 }
43
44 src_unpack() {
45 unpack ${A}
46 cd ${S}
47
48 # fix fullscreen support and rootless mode image compression
49 epatch ${FILESDIR}/${P}-rootless-mode.patch
50 # fix rdesktop/vnc proxying
51 epatch ${FILESDIR}/${P}-rdesktop.patch
52
53 mv node.conf.sample node.conf || die
54
55 epatch ${FILESDIR}/${P}-nxloadconfig.patch
56
57 # on amd64, get the correct path to NX 32bit libsA
58 if has_multilib_profile; then
59 sed -i "/PATH_LIB=/s/lib/$(get_abi_LIBDIR x86)/g" nxloadconfig || die
60 sed -i "/REAL_PATH_BIN=/s/lib/$(get_abi_LIBDIR x86)/g" nxloadconfig || die
61 fi
62
63 # Change the defaults in nxloadconfig to meet the users needs.
64 if use arts ; then
65 einfo "Enabling arts support."
66 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die
67 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' node.conf || die
68 fi
69 if use esd ; then
70 einfo "Enabling esd support."
71 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die
72 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf || die
73 fi
74 if use cups ; then
75 einfo "Enabling cups support."
76 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' nxloadconfig || die
77 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf || die
78 fi
79 }
80
81 src_compile() {
82 einfo "Nothing to compile"
83 }
84
85 src_install() {
86 NX_ETC_DIR=/etc/nxserver
87 NX_SESS_DIR=/var/lib/nxserver/db
88
89 dobin nxserver
90 dobin nxnode
91 dobin nxnode-login
92 dobin nxkeygen
93 dobin nxloadconfig
94 dobin nxsetup
95 use nxclient || dobin nxprint
96 use nxclient || dobin nxclient
97
98 dodir ${NX_ETC_DIR}
99 for x in passwords passwords.orig ; do
100 touch ${D}${NX_ETC_DIR}/$x
101 chmod 600 ${D}${NX_ETC_DIR}/$x
102 done
103
104 insinto ${NX_ETC_DIR}
105 doins node.conf
106
107 dodir ${NX_HOME_DIR}
108
109 for x in closed running failed ; do
110 keepdir ${NX_SESS_DIR}/$x
111 fperms 0700 ${NX_SESS_DIR}/$x
112 done
113 }
114
115 pkg_postinst () {
116 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
117 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
118
119 elog "To complete the installation, run:"
120 elog " nxsetup --install --setup-nomachine-key --clean --purge"
121 elog "This will use the default Nomachine SSH key"
122 }

  ViewVC Help
Powered by ViewVC 1.1.20