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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri May 2 16:54:37 2008 UTC (11 years, 7 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Use mirror:// for SRC_URI, bug #218657. Also remove 0.7.1 versions
(Portage version: 2.1.5_rc6)

1 # Copyright 1999-2008 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-r2.ebuild,v 1.2 2008/03/18 23:49:08 voyageur Exp $
4
5 inherit multilib eutils
6
7 MY_PN="freenx"
8 DESCRIPTION="Free Software Implementation of the NX Server"
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 x11-apps/sessreg"
37
38 S=${WORKDIR}/${MY_PN}-${PV}
39
40 export NX_HOME_DIR=/var/lib/nxserver/home
41
42 pkg_setup () {
43 enewuser nx -1 -1 ${NX_HOME_DIR}
44 }
45
46 src_unpack() {
47 unpack ${A}
48 cd "${S}"
49
50 mv node.conf.sample node.conf || die
51
52 epatch "${FILESDIR}"/${P}-nxloadconfig.patch
53 epatch "${FILESDIR}"/${P}-cups.patch
54 epatch "${FILESDIR}"/${P}-nxdialog.patch
55 epatch "${FILESDIR}"/${P}-nscd.patch
56 epatch "${FILESDIR}"/${P}-usession_fixes.patch
57 epatch "${FILESDIR}"/${P}-nxserver_fixes.patch
58 epatch "${FILESDIR}"/${P}-samba.patch
59
60 sed -i "/PATH_LIB=/s/lib/$(get_libdir)/g" nxloadconfig || die
61 sed -i "/REAL_PATH_BIN=/s/lib/$(get_libdir)/g" nxloadconfig || die
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 dobin nxcups-gethost
96 dobin nxdialog
97 dobin nxdesktop_helper
98 dobin nxviewer_helper
99
100 # This should be renamed to remove the blocker on net-misc/nxclient
101 use nxclient || dobin nxprint
102
103 dodir ${NX_ETC_DIR}
104 for x in passwords passwords.orig ; do
105 touch "${D}"${NX_ETC_DIR}/$x
106 chmod 600 "${D}"${NX_ETC_DIR}/$x
107 done
108
109 insinto ${NX_ETC_DIR}
110 doins node.conf
111
112 dodir ${NX_HOME_DIR}
113
114 for x in closed running failed ; do
115 keepdir ${NX_SESS_DIR}/$x
116 fperms 0700 ${NX_SESS_DIR}/$x
117 done
118
119 newinitd "${FILESDIR}"/nxserver.init nxserver
120 }
121
122 pkg_postinst () {
123 # Other NX servers ebuilds may have already created the nx account
124 # However they use different login shell/home directory paths
125 if [[ ${ROOT} == "/" ]]; then
126 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
127 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
128 usermod -G utmp nx || die "Unable to add nx user to utmp group!!"
129 else
130 elog "If you had another NX server installed before, please make sure"
131 elog "the nx user account is correctly set to:"
132 elog " * login shell: /usr/bin/nxserver"
133 elog " * home directory: ${NX_HOME_DIR}"
134 elog " * supplementary groups: utmp"
135 fi
136
137 elog "To complete the installation, run:"
138 elog " nxsetup --install --setup-nomachine-key --clean --purge"
139 elog "This will use the default Nomachine SSH key"
140 }

  ViewVC Help
Powered by ViewVC 1.1.20