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

Contents of /net-misc/nxserver-freenx/nxserver-freenx-0.4.4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Nov 8 21:51:02 2006 UTC (13 years ago) by stuart
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Removed old, buggy versions
(Portage version: 2.1.2_pre2-r9)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 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.4.4-r1.ebuild,v 1.1 2006/04/30 19:38:46 stuart Exp $
4
5 inherit multilib eutils
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="http://debian.tu-bs.de/knoppix/nx/freenx-${PV}.tar.gz"
10 LICENSE="GPL-2"
11 SLOT="0"
12 KEYWORDS="~amd64 ~ppc ~x86"
13 RESTRICT="nomirror 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.4.0 )
20 !nxclient? ( !net-misc/nxclient ) )
21 amd64? ( nxclient? ( >=net-misc/nxclient-1.4.0 )
22 !nxclient? ( !net-misc/nxclient ) )
23 !x86? ( !amd64? ( !net-misc/nxclient ) )
24 >=net-misc/nxproxy-1.4.0
25 || ( >=net-misc/nx-x11-1.4.0
26 >=net-misc/nx-x11-bin-1.4.0 )
27 arts? ( kde-base/arts )
28 cups? ( net-print/cups )
29 esd? ( media-sound/esound )
30 !net-misc/nxserver-personal
31 !net-misc/nxserver-business
32 !net-misc/nxserver-enterprise"
33
34 RDEPEND="${DEPEND}"
35
36 S=${WORKDIR}/freenx-${PV}
37
38 pkg_setup () {
39 enewuser nx -1 -1 /usr/NX/home/nx
40 }
41
42 src_unpack() {
43 unpack ${A}
44 cd ${S}
45 epatch gentoo-nomachine.diff
46 # Patch to fix the adduser error
47 epatch $FILESDIR/freenx-0.4.4-adduser-fix.patch
48 epatch $FILESDIR/nxserver-freenx-0.4.4-xorg7.patch
49
50 # fix to make sure 32 bit libraries are used by nx-x11 on amd64
51 has_multilib_profile && \
52 sed -i "/PATH_LIB=/s/lib/$(get_abi_LIBDIR x86)/" nxloadconfig
53
54 # Change the defaults in nxloadconfig to meet the users needs.
55 if has_version "~net-misc/nx-x11-1.5.0" || has_version "~net-misc/nx-x11-bin-1.5.0" ; then
56 einfo "Enabling the NX 1.5.0 backend support."
57 sed -i '/ENABLE_1_5_0_BACKEND=/s/"0"/"1"/' nxloadconfig
58 sed -i '/ENABLE_1_5_0_BACKEND=/s/"0"/"1"/' node.conf.sample
59 fi
60 if use arts ; then
61 einfo "Enabling arts support."
62 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' nxloadconfig
63 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' node.conf.sample
64 fi
65 if use esd ; then
66 einfo "Enabling esd support."
67 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' nxloadconfig
68 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf.sample
69 fi
70 if use cups ; then
71 einfo "Enabling cups support."
72 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' nxloadconfig
73 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf.sample
74 fi
75 }
76
77 src_compile() {
78 einfo "Nothing to compile"
79 }
80
81 src_install() {
82
83 NX_DIR=/usr/NX
84 NX_ETC_DIR=$NX_DIR/etc
85 NX_SESS_DIR=$NX_DIR/var/db
86 NX_HOME_DIR=$NX_DIR/home/nx
87
88 into ${NX_DIR}
89 dobin nxserver
90 dobin nxnode
91 dobin nxnode-login
92 dobin nxkeygen
93 dobin nxloadconfig
94 dobin nxsetup
95 ( ( use x86 || use amd64 ) && use nxclient ) || dobin nxprint
96 ( ( use x86 || use amd64 ) && 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.sample
106
107 ssh-keygen -f ${D}${NX_ETC_DIR}/users.id_dsa -t dsa -N "" -q
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 dodir ${NX_HOME_DIR}/.ssh
115 fperms 0700 ${NX_HOME_DIR}
116 fperms 0700 ${NX_HOME_DIR}/.ssh
117
118 cat << EOF >${D}${NX_HOME_DIR}/.ssh/server.id_dsa.pub.key
119 ssh-dss AAAAB3NzaC1kc3MAAACBAJe/0DNBePG9dYLWq7cJ0SqyRf1iiZN/IbzrmBvgPTZnBa5FT/0Lcj39sRYt1paAlhchwUmwwIiSZaON5JnJOZ6jKkjWIuJ9MdTGfdvtY1aLwDMpxUVoGwEaKWOyin02IPWYSkDQb6cceuG9NfPulS9iuytdx0zIzqvGqfvudtufAAAAFQCwosRXR2QA8OSgFWSO6+kGrRJKiwAAAIEAjgvVNAYWSrnFD+cghyJbyx60AAjKtxZ0r/Pn9k94Qt2rvQoMnGgt/zU0v/y4hzg+g3JNEmO1PdHh/wDPVOxlZ6Hb5F4IQnENaAZ9uTZiFGqhBO1c8Wwjiq/MFZy3jZaidarLJvVs8EeT4mZcWxwm7nIVD4lRU2wQ2lj4aTPcepMAAACANlgcCuA4wrC+3Cic9CFkqiwO/Rn1vk8dvGuEQqFJ6f6LVfPfRTfaQU7TGVLk2CzY4dasrwxJ1f6FsT8DHTNGnxELPKRuLstGrFY/PR7KeafeFZDf+fJ3mbX5nxrld3wi5titTnX+8s4IKv29HJguPvOK/SI7cjzA+SqNfD7qEo8= root@nettuno
120 EOF
121 fperms 0600 ${NX_HOME_DIR}/.ssh/server.id_dsa.pub.key
122 cp ${D}${NX_HOME_DIR}/.ssh/server.id_dsa.pub.key ${D}${NX_HOME_DIR}/.ssh/authorized_keys2
123 fperms 0600 ${NX_HOME_DIR}/.ssh/authorized_keys2
124
125 echo -n "127.0.0.1" ${D}${NX_HOME_DIR}/.ssh/known_hosts
126
127 chown -R nx:root ${D}${NX_DIR}
128 }
129
130 pkg_postinst () {
131 usermod -s /usr/NX/bin/nxserver nx || die "Unable to set login shell of nx user!!"
132
133 ewarn "NOTE: The commercial use flag was changed to nxclient."
134 }

  ViewVC Help
Powered by ViewVC 1.1.20