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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Apr 7 09:40:10 2010 UTC (9 years, 5 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Version bump, bug #308737
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 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-r2.ebuild,v 1.1 2010/01/05 14:39:32 voyageur 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 -e "s#/lib/neatx#/neatx#" \
37 -e "/^docdir/s#\$(PACKAGE)#${PF}#" \
38 -i Makefile.am \
39 || die "Makefile.am sed failed"
40 sed -e "/DATA_DIR =/s#/lib/neatx#/neatx#" \
41 -i lib/constants.py || die "constants.py sed failed"
42
43 eautoreconf
44 }
45
46 pkg_setup () {
47 if [ -z "${NX_HOME_DIR}" ];
48 then
49 export NX_HOME_DIR=/var/lib/neatx/home
50 fi
51 enewuser nx -1 -1 ${NX_HOME_DIR}
52 }
53
54 src_compile() {
55 default_src_compile
56 }
57
58 src_install() {
59 emake install DESTDIR="${D}" || die "Failed to install"
60 fperms 777 /var/lib/neatx/sessions
61 dodir ${NX_HOME_DIR}/.ssh
62 fowners nx:nx ${NX_HOME_DIR}
63 fowners nx:nx ${NX_HOME_DIR}/.ssh
64
65 insinto /etc
66 newins doc/neatx.conf.example neatx.conf
67
68 # nc or netcat6 or netcat?
69 if has_version net-analyzer/gnu-netcat; then
70 nc_path="/usr/bin/netcat"
71 elif has_version net-analyzer/netcat6; then
72 nc_path="/usr/bin/nc6"
73 else
74 nc_path="/usr/bin/nc"
75 fi
76 cat >> "${D}"/etc/neatx.conf << EOF
77
78 netcat-path = ${nc_path}
79 use-xsession = false
80 start-gnome-command = /etc/X11/Sessions/Gnome
81 EOF
82
83 insinto ${NX_HOME_DIR}/.ssh
84 insopts -m 600 -o nx
85 newins extras/authorized_keys.nomachine authorized_keys
86 }
87
88 pkg_postinst () {
89 distutils_pkg_postinst
90
91 # Other NX servers ebuilds may have already created the nx account
92 # However they use different login shell/home directory paths
93 if [[ ${ROOT} == "/" ]]; then
94 usermod -s /usr/$(get_libdir)/neatx/nxserver-login nx || die "Unable to set login shell of nx user!!"
95 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
96 else
97 elog "If you had another NX server installed before, please make sure"
98 elog "the nx user account is correctly set to:"
99 elog " * login shell: /usr/$(get_libdir)/neatx/nxserver-login"
100 elog " * home directory: ${NX_HOME_DIR}"
101 fi
102
103 if ! built_with_use net-misc/openssh pam; then
104 elog ""
105 elog "net-misc/openssh was not built with PAM support"
106 elog "You will need to unlock the nx account by setting a password for it"
107 fi
108
109 elog "If you want to use the default su authentication (rather than ssh)"
110 elog "you must ensure that the nx user is a member of the wheel group."
111 elog "You can add it via \"usermod -a -G wheel nx\""
112 }

  ViewVC Help
Powered by ViewVC 1.1.20