/[gentoo-x86]/net-misc/neatx/neatx-0.3.1_p43-r1.ebuild
Gentoo

Contents of /net-misc/neatx/neatx-0.3.1_p43-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Apr 5 18:19:55 2011 UTC (8 years, 8 months ago) by arfrever
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Delete older ebuilds.

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/neatx/neatx-0.3.1_p43-r1.ebuild,v 1.5 2009/11/25 13:58:58 maekke Exp $
4
5 EAPI="2"
6
7 inherit eutils autotools distutils
8
9 DESCRIPTION="Google implementation of NX server"
10 HOMEPAGE="http://code.google.com/p/neatx/"
11 SRC_URI="mirror://gentoo/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE=""
17
18 DEPEND="dev-python/docutils"
19 RDEPEND="dev-python/pexpect
20 dev-python/simplejson
21 >=dev-python/pygtk-2.14
22 >=dev-python/pygobject-2.14
23 app-portage/portage-utils
24 media-fonts/font-misc-misc
25 media-fonts/font-cursor-misc
26 || ( net-analyzer/gnu-netcat
27 net-analyzer/netcat
28 net-analyzer/netcat6 )
29 net-misc/nx"
30
31 S=${WORKDIR}/${PN}
32
33 src_prepare() {
34 sed -i -e "s/rst2html]/rst2html.py]/" configure.ac \
35 || die "configure.ac sed failed"
36 sed -i -e "s#/lib/neatx#/neatx#" Makefile.am \
37 || die "Makefile.am sed failed"
38 sed -e "/DATA_DIR =/s#/lib/neatx#/neatx#" \
39 -i lib/constants.py || die "constants.py sed failed"
40
41 eautoreconf
42 }
43
44 pkg_setup () {
45 if [ -z "${NX_HOME_DIR}" ];
46 then
47 export NX_HOME_DIR=/var/lib/neatx/home
48 fi
49 enewuser nx -1 -1 ${NX_HOME_DIR}
50 }
51
52 src_compile() {
53 default_src_compile
54 }
55
56 src_install() {
57 emake install DESTDIR="${D}" || die "Failed to install"
58 fperms 777 /var/lib/neatx/sessions
59 dodir ${NX_HOME_DIR}/.ssh
60 fowners nx:nx ${NX_HOME_DIR}
61 fowners nx:nx ${NX_HOME_DIR}/.ssh
62
63 insinto /etc
64 newins doc/neatx.conf.example neatx.conf
65
66 # nc or netcat6 or netcat?
67 if has_version net-analyzer/gnu-netcat; then
68 nc_path="/usr/bin/netcat"
69 elif has_version net-analyzer/netcat6; then
70 nc_path="/usr/bin/nc6"
71 else
72 nc_path="/usr/bin/nc"
73 fi
74 cat >> "${D}"/etc/neatx.conf << EOF
75
76 netcat-path = ${nc_path}
77 use-xsession = false
78 start-gnome-command = /etc/X11/Sessions/Gnome
79 EOF
80
81 insinto ${NX_HOME_DIR}/.ssh
82 insopts -m 600 -o nx
83 newins extras/authorized_keys.nomachine authorized_keys
84 }
85
86 pkg_postinst () {
87 distutils_pkg_postinst
88
89 # Other NX servers ebuilds may have already created the nx account
90 # However they use different login shell/home directory paths
91 if [[ ${ROOT} == "/" ]]; then
92 usermod -s /usr/$(get_libdir)/neatx/nxserver-login nx || die "Unable to set login shell of nx user!!"
93 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
94 else
95 elog "If you had another NX server installed before, please make sure"
96 elog "the nx user account is correctly set to:"
97 elog " * login shell: /usr/$(get_libdir)/neatx/nxserver-login"
98 elog " * home directory: ${NX_HOME_DIR}"
99 fi
100
101 if ! built_with_use net-misc/openssh pam; then
102 elog ""
103 elog "net-misc/openssh was not built with PAM support"
104 elog "You will need to unlock the nx account by setting a password for it"
105 fi
106
107 elog "If you want to use the default su authentication (rather than ssh)"
108 elog "you must ensure that the nx user is a member of the wheel group."
109 elog "You can add it via \"usermod -a -G wheel nx\""
110 }

  ViewVC Help
Powered by ViewVC 1.1.20