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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Fri Dec 14 14:22:17 2007 UTC (11 years, 11 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Fix mounting smb shares
(Portage version: 2.1.4_rc9)

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.7.1.ebuild,v 1.4 2007/11/07 09:52:51 voyageur 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-2.1.0
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 x11-apps/xrdb"
36
37 S=${WORKDIR}/${MY_PN}-${PV}
38
39 export NX_HOME_DIR=/var/lib/nxserver/home
40
41 pkg_setup () {
42 enewuser nx -1 -1 ${NX_HOME_DIR}
43 }
44
45 src_unpack() {
46 unpack ${A}
47 cd "${S}"
48
49 mv node.conf.sample node.conf || die
50
51 epatch "${FILESDIR}"/${P}-nxloadconfig.patch
52 epatch "${FILESDIR}"/${P}-cups.patch
53 epatch "${FILESDIR}"/${P}-nxdialog.patch
54 epatch "${FILESDIR}"/${P}-nscd.patch
55
56 sed -i "/PATH_LIB=/s/lib/$(get_libdir)/g" nxloadconfig || die
57 sed -i "/REAL_PATH_BIN=/s/lib/$(get_libdir)/g" nxloadconfig || die
58
59 # Change the defaults in nxloadconfig to meet the users needs.
60 if use arts ; then
61 einfo "Enabling arts support."
62 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die
63 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' node.conf || die
64 fi
65 if use esd ; then
66 einfo "Enabling esd support."
67 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die
68 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf || die
69 fi
70 if use cups ; then
71 einfo "Enabling cups support."
72 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' nxloadconfig || die
73 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf || die
74 fi
75 }
76
77 src_compile() {
78 einfo "Nothing to compile"
79 }
80
81 src_install() {
82 NX_ETC_DIR=/etc/nxserver
83 NX_SESS_DIR=/var/lib/nxserver/db
84
85 dobin nxserver
86 dobin nxnode
87 dobin nxnode-login
88 dobin nxkeygen
89 dobin nxloadconfig
90 dobin nxsetup
91 dobin nxcups-gethost
92 dobin nxdialog
93 dobin nxdesktop_helper
94 dobin nxviewer_helper
95
96 # This should be renamed to remove the blocker on net-misc/nxclient
97 use nxclient || dobin nxprint
98
99 dodir ${NX_ETC_DIR}
100 for x in passwords passwords.orig ; do
101 touch "${D}"${NX_ETC_DIR}/$x
102 chmod 600 "${D}"${NX_ETC_DIR}/$x
103 done
104
105 insinto ${NX_ETC_DIR}
106 doins node.conf
107
108 dodir ${NX_HOME_DIR}
109
110 for x in closed running failed ; do
111 keepdir ${NX_SESS_DIR}/$x
112 fperms 0700 ${NX_SESS_DIR}/$x
113 done
114 }
115
116 pkg_postinst () {
117 # Other NX servers ebuilds may have already created the nx account
118 # However they use different login shell/home directory paths
119 if [[ ${ROOT} == "/" ]]; then
120 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
121 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
122 else
123 elog "If you had another NX server installed before, please make sure"
124 elog "the nx user account is correctly set to:"
125 elog " * login shell: /usr/bin/nxserver"
126 elog " * home directory: ${NX_HOME_DIR}"
127 fi
128
129 elog "To complete the installation, run:"
130 elog " nxsetup --install --setup-nomachine-key --clean --purge"
131 elog "This will use the default Nomachine SSH key"
132 }

  ViewVC Help
Powered by ViewVC 1.1.20