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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Nov 24 21:00:12 2011 UTC (2 years, 11 months ago) by voyageur
Branch: MAIN
Changes since 1.3: +2 -2 lines
Remove old net-misc/vnc dep, spotted by ago. Also remove previous stable ebuild

(Portage version: 2.2.0_alpha77/cvs/Linux x86_64)

1 # Copyright 1999-2011 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-r6.ebuild,v 1.3 2011/11/13 14:59:02 maekke Exp $
4
5 EAPI=2
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 media-fonts/font-cursor-misc
25 media-fonts/font-misc-misc
26 net-analyzer/gnu-netcat
27 >=net-misc/nx-2.1.0
28 sys-apps/gawk
29 virtual/ssh
30 x11-apps/xauth
31 x11-apps/xrdb
32 x11-apps/sessreg
33 nxclient? ( net-misc/nxclient )
34 !nxclient? ( !net-misc/nxclient
35 || ( x11-misc/xdialog
36 x11-apps/xmessage ) )
37 rdesktop? ( net-misc/rdesktop )
38 vnc? ( x11-misc/x11vnc
39 net-misc/tightvnc )"
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_prepare() {
50 epatch "${FILESDIR}"/${P}-pam_ssh.patch
51 epatch "${FILESDIR}"/${P}-nxnode_setup_samba.patch
52 epatch "${FILESDIR}"/${P}-nxloadconfig.patch
53 epatch "${FILESDIR}"/${PN}-0.7.3_p102-cflags.patch
54 epatch "${FILESDIR}"/${PN}-0.7.2-cups.patch
55 epatch "${FILESDIR}"/${P}-jobserver_fix.patch
56 epatch "${FILESDIR}"/${P}-md5sum.patch
57
58 # Path to net-misc/nx files, support for nx >= 3.4.0
59 sed -e "/PATH_LIB=/s/lib/$(get_libdir)/g" \
60 -e "s#REAL_PATH_LIB#/usr/$(get_libdir)/NX/bin#" \
61 -e "s#3.\[0123\].0#3.\[012345\].0#g" \
62 -i nxloadconfig || die "nxloadconfig sed failed"
63 }
64
65 src_compile() {
66 emake CC=$(tc-getCC) CDEBUGFLAGS="${CFLAGS}" || die "compilation failed"
67 }
68
69 src_install() {
70 export NX_ETC_DIR=/etc/nxserver
71 export NX_SESS_DIR=/var/lib/nxserver/db
72
73 emake DESTDIR="${D}" install || die "install failed"
74
75 # This should be renamed to remove the blocker on net-misc/nxclient
76 use nxclient && rm "${D}"/usr/bin/nxprint
77
78 mv "${D}"/etc/nxserver/node.conf.sample "${D}"/etc/nxserver/node.conf ||
79 die "cannot find default configuration file"
80
81 dodir ${NX_ETC_DIR}
82 for x in passwords passwords.orig ; do
83 touch "${D}"${NX_ETC_DIR}/$x
84 chmod 600 "${D}"${NX_ETC_DIR}/$x
85 done
86
87 dodir ${NX_HOME_DIR}
88
89 for x in closed running failed ; do
90 keepdir ${NX_SESS_DIR}/$x
91 fperms 0700 ${NX_SESS_DIR}/$x
92 done
93
94 newinitd "${FILESDIR}"/nxserver.init nxserver
95 }
96
97 pkg_postinst () {
98 # Other NX servers ebuilds may have already created the nx account
99 # However they use different login shell/home directory paths
100 if [[ ${ROOT} == "/" ]]; then
101 usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!"
102 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
103 usermod -a -G utmp nx || die "Unable to add nx user to utmp group!!"
104 else
105 elog "If you had another NX server installed before, please make sure"
106 elog "the nx user account is correctly set to:"
107 elog " * login shell: /usr/bin/nxserver"
108 elog " * home directory: ${NX_HOME_DIR}"
109 elog " * supplementary groups: utmp"
110 fi
111
112 elog "To complete the installation, run:"
113 elog " nxsetup --install --setup-nomachine-key"
114 elog "This will use the default Nomachine SSH key"
115 elog "If you had older NX servers installed, you may need to add \"--clean --purge\" to the nxsetup command"
116
117 if has_version net-misc/openssh[-pam]; then
118 elog ""
119 elog "net-misc/openssh was not built with PAM support"
120 elog "You will need to unlock the nx account by setting a password for it"
121 fi
122 }

  ViewVC Help
Powered by ViewVC 1.1.20