/[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.2 - (show annotations) (download)
Mon Apr 2 09:47:31 2007 UTC (12 years, 6 months ago) by voyageur
Branch: MAIN
Changes since 1.1: +2 -4 lines
Updated blockers
(Portage version: 2.1.2.3)

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-r2.ebuild,v 1.1 2007/03/21 12:18:15 voyageur 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-freeedition"
29
30 RDEPEND="${DEPEND}"
31
32 S=${WORKDIR}
33
34 export NX_HOME_DIR=/var/lib/nxserver/home
35
36 pkg_setup () {
37 enewuser nx -1 -1 ${NX_HOME_DIR}
38 }
39
40 src_unpack() {
41 rpm_unpack ${DISTDIR}/${A}
42 cd ${S}
43
44 # fix the start commands
45 epatch ${FILESDIR}/freenx-0.5.0-startup.patch
46 # fix fullscreen support; see bug 150200
47 epatch ${FILESDIR}/freenx-0.5.0-fullscreen.patch
48 # fix newer clients support; bug 155063
49 epatch ${FILESDIR}/freenx-0.5.0-backingstore.patch
50
51 mv etc/nxserver/node.conf.sample etc/nxserver/node.conf || die
52
53 sed -e 's|^PATH_LIB=.*$|PATH_LIB=$NX_DIR/lib/NX/lib|;' -i usr/bin/nxloadconfig || die
54
55 # Change the defaults in nxloadconfig to meet the users needs.
56 if use arts ; then
57 einfo "Enabling arts support."
58 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' usr/bin/nxloadconfig || die
59 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' etc/nxserver/node.conf || die
60 fi
61 if use esd ; then
62 einfo "Enabling esd support."
63 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' usr/bin/nxloadconfig || die
64 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' etc/nxserver/node.conf || die
65 fi
66 if use cups ; then
67 einfo "Enabling cups support."
68 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' usr/bin/nxloadconfig || die
69 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' etc/nxserver/node.conf || die
70 fi
71 }
72
73 src_compile() {
74 einfo "Nothing to compile"
75 }
76
77 src_install() {
78 NX_ETC_DIR=/etc/nxserver
79 NX_SESS_DIR=/var/lib/nxserver/db
80
81 dobin usr/bin/nxserver
82 dobin usr/bin/nxnode
83 dobin usr/bin/nxnode-login
84 dobin usr/bin/nxkeygen
85 dobin usr/bin/nxloadconfig
86 dobin usr/bin/nxsetup
87 ( ( use x86 || use amd64 ) && use nxclient ) || dobin usr/bin/nxprint
88 ( ( use x86 || use amd64 ) && use nxclient ) || dobin usr/bin/nxclient
89
90 dodir ${NX_ETC_DIR}
91 for x in passwords passwords.orig ; do
92 touch ${D}${NX_ETC_DIR}/$x
93 chmod 600 ${D}${NX_ETC_DIR}/$x
94 done
95
96 insinto ${NX_ETC_DIR}
97 doins etc/nxserver/node.conf
98
99 dodir ${NX_HOME_DIR}
100
101 for x in closed running failed ; do
102 keepdir ${NX_SESS_DIR}/$x
103 fperms 0700 ${NX_SESS_DIR}/$x
104 done
105 }
106
107 pkg_postinst () {
108 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
109 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
110
111 elog "Run nxsetup --override --install to complete the installation"
112 }

  ViewVC Help
Powered by ViewVC 1.1.20