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

Contents of /net-misc/nxserver-freenx/nxserver-freenx-0.5.0-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Mar 21 12:18:15 2007 UTC (12 years, 7 months ago) by voyageur
Branch: MAIN
freenx 0.5 support for NX 2.x clients
(Portage version: 2.1.2.2)

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.5.0-r1.ebuild,v 1.1 2006/11/08 21:46:59 stuart Exp $
4
5 inherit multilib eutils rpm
6
7 DESCRIPTION="An X11/RDP/VNC proxy server especially well suited to low bandwidth links such as wireless, WANS, and worse"
8 HOMEPAGE="http://freenx.berlios.de/"
9 SRC_URI="ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/extras/5/i386/freenx-0.5.0-5.fc5.i386.rpm"
10 LICENSE="GPL-2"
11 SLOT="0"
12 KEYWORDS="~x86"
13 RESTRICT="strip"
14 IUSE="arts cups esd nxclient"
15 DEPEND="virtual/ssh
16 dev-tcltk/expect
17 sys-apps/gawk
18 net-analyzer/gnu-netcat
19 x86? ( nxclient? ( =net-misc/nxclient-1.5* )
20 !nxclient? ( !net-misc/nxclient ) )
21 amd64? ( nxclient? ( =net-misc/nxclient-1.5* )
22 !nxclient? ( !net-misc/nxclient ) )
23 !x86? ( !amd64? ( !net-misc/nxclient ) )
24 =net-misc/nx-1.5*
25 arts? ( kde-base/arts )
26 cups? ( net-print/cups )
27 esd? ( media-sound/esound )
28 !net-misc/nxserver-personal
29 !net-misc/nxserver-business
30 !net-misc/nxserver-enterprise"
31
32 RDEPEND="${DEPEND}"
33
34 S=${WORKDIR}
35
36 export NX_HOME_DIR=/var/lib/nxserver/home
37
38 pkg_setup () {
39 enewuser nx -1 -1 ${NX_HOME_DIR}
40 }
41
42 src_unpack() {
43 rpm_unpack ${DISTDIR}/${A}
44 cd ${S}
45
46 # fix the start commands
47 epatch ${FILESDIR}/freenx-0.5.0-startup.patch
48 # fix fullscreen support; see bug 150200
49 epatch ${FILESDIR}/freenx-0.5.0-fullscreen.patch
50 # fix newer clients support; bug 155063
51 epatch ${FILESDIR}/freenx-0.5.0-backingstore.patch
52
53 mv etc/nxserver/node.conf.sample etc/nxserver/node.conf || die
54
55 sed -e 's|^PATH_LIB=.*$|PATH_LIB=$NX_DIR/lib/NX/lib|;' -i usr/bin/nxloadconfig || die
56
57 # Change the defaults in nxloadconfig to meet the users needs.
58 if use arts ; then
59 einfo "Enabling arts support."
60 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' usr/bin/nxloadconfig || die
61 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' etc/nxserver/node.conf || die
62 fi
63 if use esd ; then
64 einfo "Enabling esd support."
65 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' usr/bin/nxloadconfig || die
66 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' etc/nxserver/node.conf || die
67 fi
68 if use cups ; then
69 einfo "Enabling cups support."
70 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' usr/bin/nxloadconfig || die
71 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' etc/nxserver/node.conf || die
72 fi
73 }
74
75 src_compile() {
76 einfo "Nothing to compile"
77 }
78
79 src_install() {
80 NX_ETC_DIR=/etc/nxserver
81 NX_SESS_DIR=/var/lib/nxserver/db
82
83 dobin usr/bin/nxserver
84 dobin usr/bin/nxnode
85 dobin usr/bin/nxnode-login
86 dobin usr/bin/nxkeygen
87 dobin usr/bin/nxloadconfig
88 dobin usr/bin/nxsetup
89 ( ( use x86 || use amd64 ) && use nxclient ) || dobin usr/bin/nxprint
90 ( ( use x86 || use amd64 ) && use nxclient ) || dobin usr/bin/nxclient
91
92 dodir ${NX_ETC_DIR}
93 for x in passwords passwords.orig ; do
94 touch ${D}${NX_ETC_DIR}/$x
95 chmod 600 ${D}${NX_ETC_DIR}/$x
96 done
97
98 insinto ${NX_ETC_DIR}
99 doins etc/nxserver/node.conf
100
101 dodir ${NX_HOME_DIR}
102
103 for x in closed running failed ; do
104 keepdir ${NX_SESS_DIR}/$x
105 fperms 0700 ${NX_SESS_DIR}/$x
106 done
107 }
108
109 pkg_postinst () {
110 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
111 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
112
113 elog "Run nxsetup --override --install to complete the installation"
114 }

  ViewVC Help
Powered by ViewVC 1.1.20