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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Dec 15 20:35:41 2009 UTC (10 years ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Clean some versions, EAPI2, fix Gnome start command for bug #292480
(Portage version: 2.2_rc59/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.3-r2.ebuild,v 1.3 2009/11/10 23:17:34 cla Exp $
4
5 inherit multilib eutils toolchain-funcs
6
7 MY_PN="freenx-server"
8 DESCRIPTION="Free Software Implementation of the NX Server"
9 HOMEPAGE="http://freenx.berlios.de/"
10 SRC_URI="mirror://berlios/freenx/${MY_PN}-${PV}.tar.gz"
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="amd64 x86"
14 RESTRICT="strip"
15 IUSE="cups esd nxclient"
16
17 DEPEND="x11-misc/gccmakedep
18 x11-misc/imake"
19 RDEPEND="dev-tcltk/expect
20 media-fonts/font-misc-misc
21 media-fonts/font-cursor-misc
22 net-analyzer/gnu-netcat
23 >=net-misc/nx-2.1.0
24 sys-apps/gawk
25 virtual/ssh
26 x11-apps/xauth
27 x11-apps/xrdb
28 x11-apps/sessreg
29 cups? ( net-print/cups )
30 esd? ( media-sound/esound )
31 nxclient? ( net-misc/nxclient )
32 !nxclient? ( !net-misc/nxclient
33 || ( x11-misc/xdialog
34 x11-apps/xmessage ) )
35 !net-misc/nxserver-freeedition
36 !net-misc/nxserver-2xterminalserver"
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}-roundrobin.patch
52 epatch "${FILESDIR}"/${P}-cflags.patch
53 epatch "${FILESDIR}"/${PN}-0.7.2-cups.patch
54
55 sed -e "s/3\.\[012\]/3.[0123]/g" \
56 -e "/PATH_LIB=/s/lib/$(get_libdir)/g" \
57 -e "/REAL_PATH_BIN=/s/lib/$(get_libdir)/g" \
58 -i nxloadconfig || die "nxloadconfig sed failed"
59
60 # Change the defaults in nxloadconfig to meet the users needs.
61 if use esd ; then
62 einfo "Enabling esd support."
63 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die
64 sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf.sample || die
65 fi
66 if use cups ; then
67 einfo "Enabling cups support."
68 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' nxloadconfig || die
69 sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf.sample || die
70 fi
71 }
72
73 src_compile() {
74 emake CC=$(tc-getCC) CDEBUGFLAGS="${CFLAGS}" || die "compilation failed"
75 }
76
77 src_install() {
78 export NX_ETC_DIR=/etc/nxserver
79 export NX_SESS_DIR=/var/lib/nxserver/db
80
81 emake DESTDIR="${D}" install || die "install failed"
82
83 # This should be renamed to remove the blocker on net-misc/nxclient
84 use nxclient && rm "${D}"/usr/bin/nxprint
85
86 mv "${D}"/etc/nxserver/node.conf.sample "${D}"/etc/nxserver/node.conf ||
87 die "cannot find default configuration file"
88
89 dodir ${NX_ETC_DIR}
90 for x in passwords passwords.orig ; do
91 touch "${D}"${NX_ETC_DIR}/$x
92 chmod 600 "${D}"${NX_ETC_DIR}/$x
93 done
94
95 dodir ${NX_HOME_DIR}
96
97 for x in closed running failed ; do
98 keepdir ${NX_SESS_DIR}/$x
99 fperms 0700 ${NX_SESS_DIR}/$x
100 done
101
102 newinitd "${FILESDIR}"/nxserver.init nxserver
103 }
104
105 pkg_postinst () {
106 # Other NX servers ebuilds may have already created the nx account
107 # However they use different login shell/home directory paths
108 if [[ ${ROOT} == "/" ]]; then
109 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
110 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
111 usermod -G utmp nx || die "Unable to add nx user to utmp group!!"
112 else
113 elog "If you had another NX server installed before, please make sure"
114 elog "the nx user account is correctly set to:"
115 elog " * login shell: /usr/bin/nxserver"
116 elog " * home directory: ${NX_HOME_DIR}"
117 elog " * supplementary groups: utmp"
118 fi
119
120 elog "To complete the installation, run:"
121 elog " nxsetup --install --setup-nomachine-key --clean --purge"
122 elog "This will use the default Nomachine SSH key"
123 }

  ViewVC Help
Powered by ViewVC 1.1.20