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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Apr 10 09:58:01 2008 UTC (11 years, 5 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Add NX 3.2 libs support, remove previous 0.7.2 ebuilds
(Portage version: 2.1.5_rc2)

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.2-r1.ebuild,v 1.1 2008/04/02 08:46:47 voyageur Exp $
4
5 inherit multilib eutils
6
7 MY_PN="freenx-server"
8 DESCRIPTION="Free Software Implementation of the NX Server"
9 HOMEPAGE="http://freenx.berlios.de/"
10 SRC_URI="http://download.berlios.de/freenx/${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 epatch "${FILESDIR}"/${P}-nxloadconfig.patch
51 epatch "${FILESDIR}"/${P}-cups.patch
52 epatch "${FILESDIR}"/${P}-nolistentcp.patch
53
54 sed -i "/PATH_LIB=/s/lib/$(get_libdir)/g" nxloadconfig || die
55 sed -i "/REAL_PATH_BIN=/s/lib/$(get_libdir)/g" 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"/' nxloadconfig || die
61 sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' node.conf.sample || die
62 fi
63 if use esd ; then
64 einfo "Enabling esd support."
65 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die
66 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf.sample || die
67 fi
68 if use cups ; then
69 einfo "Enabling cups support."
70 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' nxloadconfig || die
71 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf.sample || die
72 fi
73 }
74
75 src_install() {
76 NX_ETC_DIR=/etc/nxserver
77 NX_SESS_DIR=/var/lib/nxserver/db
78
79 emake DESTDIR="${D}" install || die "install failed"
80
81 # This should be renamed to remove the blocker on net-misc/nxclient
82 use nxclient && rm "${D}"/usr/bin/nxprint
83
84 mv "${D}"/etc/nxserver/node.conf.sample "${D}"/etc/nxserver/node.conf ||
85 die "cannot find default configuration file"
86
87 dodir ${NX_ETC_DIR}
88 for x in passwords passwords.orig ; do
89 touch "${D}"${NX_ETC_DIR}/$x
90 chmod 600 "${D}"${NX_ETC_DIR}/$x
91 done
92
93 dodir ${NX_HOME_DIR}
94
95 for x in closed running failed ; do
96 keepdir ${NX_SESS_DIR}/$x
97 fperms 0700 ${NX_SESS_DIR}/$x
98 done
99
100 newinitd "${FILESDIR}"/nxserver.init nxserver
101 }
102
103 pkg_postinst () {
104 # Other NX servers ebuilds may have already created the nx account
105 # However they use different login shell/home directory paths
106 if [[ ${ROOT} == "/" ]]; then
107 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
108 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
109 usermod -G utmp nx || die "Unable to add nx user to utmp group!!"
110 else
111 elog "If you had another NX server installed before, please make sure"
112 elog "the nx user account is correctly set to:"
113 elog " * login shell: /usr/bin/nxserver"
114 elog " * home directory: ${NX_HOME_DIR}"
115 elog " * supplementary groups: utmp"
116 fi
117
118 elog "To complete the installation, run:"
119 elog " nxsetup --install --setup-nomachine-key --clean --purge"
120 elog "This will use the default Nomachine SSH key"
121 }

  ViewVC Help
Powered by ViewVC 1.1.20