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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu May 14 15:15:46 2009 UTC (10 years, 6 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump to restore media-fonts/font-cursor-misc and media-fonts/font-misc-misc dependency, thanks Lum <gentoo-bugzilla@lum.co.uk> in bug #269769
(Portage version: 2.2_rc33/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_p104.ebuild,v 1.1 2009/04/20 15:21:15 voyageur Exp $
4
5 EAPI=1
6
7 inherit multilib eutils toolchain-funcs versionator
8
9 MAJOR_PV="$(get_version_component_range 1-3)"
10 PATCH_VER="$(get_version_component_range 4)"
11 MY_PN="freenx-server"
12
13 DESCRIPTION="Free Software Implementation of the NX Server"
14 HOMEPAGE="http://freenx.berlios.de/ https://launchpad.net/~freenx-team"
15 SRC_URI="http://ppa.launchpad.net/freenx-team/ppa/ubuntu/pool/main/f/${MY_PN}/freenx-server_${MAJOR_PV}+teambzr${PATCH_VER/p}.orig.tar.gz"
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="+nxclient rdesktop vnc"
20
21 DEPEND="x11-misc/gccmakedep
22 x11-misc/imake"
23 RDEPEND="dev-tcltk/expect
24 net-analyzer/gnu-netcat
25 >=net-misc/nx-2.1.0
26 sys-apps/gawk
27 virtual/ssh
28 x11-apps/xauth
29 x11-apps/xrdb
30 x11-apps/sessreg
31 nxclient? ( net-misc/nxclient )
32 !nxclient? ( !net-misc/nxclient
33 || ( x11-misc/xdialog
34 x11-apps/xmessage ) )
35 rdesktop? ( net-misc/rdesktop )
36 vnc? ( x11-misc/x11vnc
37 || ( net-misc/tightvnc net-misc/vnc ) )
38 !net-misc/nxserver-freeedition
39 !net-misc/nxserver-2xterminalserver"
40
41 S=${WORKDIR}/${MY_PN}
42
43 export NX_HOME_DIR=/var/lib/nxserver/home
44
45 pkg_setup () {
46 enewuser nx -1 -1 ${NX_HOME_DIR}
47 }
48
49 src_unpack() {
50 unpack ${A}
51 cd "${S}"
52
53 epatch "${FILESDIR}"/${P}-pam_ssh.patch
54 epatch "${FILESDIR}"/${PN}-0.7.3_p102-nxloadconfig.patch
55 epatch "${FILESDIR}"/${PN}-0.7.3_p102-cflags.patch
56 epatch "${FILESDIR}"/${PN}-0.7.2-cups.patch
57
58 sed -e "/PATH_LIB=/s/lib/$(get_libdir)/g" \
59 -e "s#REAL_PATH_LIB#/usr/$(get_libdir)/NX/bin#" \
60 -i nxloadconfig || die "nxloadconfig sed failed"
61 }
62
63 src_compile() {
64 emake CC=$(tc-getCC) CDEBUGFLAGS="${CFLAGS}" || die "compilation failed"
65 }
66
67 src_install() {
68 export NX_ETC_DIR=/etc/nxserver
69 export NX_SESS_DIR=/var/lib/nxserver/db
70
71 emake DESTDIR="${D}" install || die "install failed"
72
73 # This should be renamed to remove the blocker on net-misc/nxclient
74 use nxclient && rm "${D}"/usr/bin/nxprint
75
76 mv "${D}"/etc/nxserver/node.conf.sample "${D}"/etc/nxserver/node.conf ||
77 die "cannot find default configuration file"
78
79 dodir ${NX_ETC_DIR}
80 for x in passwords passwords.orig ; do
81 touch "${D}"${NX_ETC_DIR}/$x
82 chmod 600 "${D}"${NX_ETC_DIR}/$x
83 done
84
85 dodir ${NX_HOME_DIR}
86
87 for x in closed running failed ; do
88 keepdir ${NX_SESS_DIR}/$x
89 fperms 0700 ${NX_SESS_DIR}/$x
90 done
91
92 newinitd "${FILESDIR}"/nxserver.init nxserver
93 }
94
95 pkg_postinst () {
96 # Other NX servers ebuilds may have already created the nx account
97 # However they use different login shell/home directory paths
98 if [[ ${ROOT} == "/" ]]; then
99 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
100 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
101 usermod -a -G utmp nx || die "Unable to add nx user to utmp group!!"
102 else
103 elog "If you had another NX server installed before, please make sure"
104 elog "the nx user account is correctly set to:"
105 elog " * login shell: /usr/bin/nxserver"
106 elog " * home directory: ${NX_HOME_DIR}"
107 elog " * supplementary groups: utmp"
108 fi
109
110 elog "To complete the installation, run:"
111 elog " nxsetup --install --setup-nomachine-key"
112 elog "This will use the default Nomachine SSH key"
113 elog "If you had older NX servers installed, you may need to add \"--clean --purge\" to the nxsetup command"
114
115 if ! built_with_use net-misc/openssh pam; then
116 elog ""
117 elog "net-misc/openssh was not built with PAM support"
118 elog "You will need to unlock the nx account by setting a password for it"
119 fi
120 }

  ViewVC Help
Powered by ViewVC 1.1.20