diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2012-08-21 13:34:00 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2012-08-21 13:34:00 +0000 |
commit | fec4f9e19fb08a20393a63a9935cc59d34d48f74 (patch) | |
tree | 23babb7c4ff9ea67a60c5d81d90a6d35c149934c /net-misc/neatx | |
parent | Sort out the dependency over py2/3 wrt bug#426330. Stabilise 0.3.8 on all arc... (diff) | |
download | gentoo-2-fec4f9e19fb08a20393a63a9935cc59d34d48f74.tar.gz gentoo-2-fec4f9e19fb08a20393a63a9935cc59d34d48f74.tar.bz2 gentoo-2-fec4f9e19fb08a20393a63a9935cc59d34d48f74.zip |
Use libexecdir instead of libdir (error in newer automake), bug #428626. Inherit user eclass
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/neatx')
-rw-r--r-- | net-misc/neatx/ChangeLog | 10 | ||||
-rw-r--r-- | net-misc/neatx/files/neatx-0.3.1_p59-use_libexecdir.patch | 82 | ||||
-rw-r--r-- | net-misc/neatx/neatx-0.3.1_p59-r1.ebuild | 4 | ||||
-rw-r--r-- | net-misc/neatx/neatx-0.3.1_p59-r2.ebuild | 4 | ||||
-rw-r--r-- | net-misc/neatx/neatx-0.3.1_p59-r3.ebuild | 148 |
5 files changed, 243 insertions, 5 deletions
diff --git a/net-misc/neatx/ChangeLog b/net-misc/neatx/ChangeLog index baf0b82814d1..58db5681cd1e 100644 --- a/net-misc/neatx/ChangeLog +++ b/net-misc/neatx/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/neatx # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/ChangeLog,v 1.17 2012/02/05 01:53:02 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/ChangeLog,v 1.18 2012/08/21 13:34:00 voyageur Exp $ + +*neatx-0.3.1_p59-r3 (21 Aug 2012) + + 21 Aug 2012; Bernard Cafarelli <voyageur@gentoo.org> + neatx-0.3.1_p59-r1.ebuild, neatx-0.3.1_p59-r2.ebuild, + +neatx-0.3.1_p59-r3.ebuild, +files/neatx-0.3.1_p59-use_libexecdir.patch: + Use libexecdir instead of libdir (error in newer automake), bug #428626. + Inherit user eclass 05 Feb 2012; Mike Gilbert <floppym@gentoo.org> neatx-0.3.1_p59-r1.ebuild, neatx-0.3.1_p59-r2.ebuild: diff --git a/net-misc/neatx/files/neatx-0.3.1_p59-use_libexecdir.patch b/net-misc/neatx/files/neatx-0.3.1_p59-use_libexecdir.patch new file mode 100644 index 000000000000..9deed572beef --- /dev/null +++ b/net-misc/neatx/files/neatx-0.3.1_p59-use_libexecdir.patch @@ -0,0 +1,82 @@ +diff -Naur neatx.orig/Makefile.am neatx/Makefile.am +--- neatx.orig/Makefile.am 2012-08-21 12:09:25.504181479 +0200 ++++ neatx/Makefile.am 2012-08-21 12:11:55.254498131 +0200 +@@ -16,7 +16,7 @@ + appdir = $(pkgpythondir)/app + docdir = $(datadir)/doc/$(PACKAGE) + +-AM_CFLAGS = -Wall -Werror -DPKGLIBDIR=\"$(pkglibdir)\" ++AM_CFLAGS = -Wall -Werror -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" + + DIRS = \ + autotools \ +@@ -70,14 +70,14 @@ + lib/app/nxserver.py \ + lib/app/nxserver_login.py + +-dist_pkglib_SCRIPTS = \ ++dist_pkglibexec_SCRIPTS = \ + src/ttysetup + +-nodist_pkglib_SCRIPTS = \ ++nodist_pkglibexec_SCRIPTS = \ + $(LOG_WRAPPER) \ + $(PYTHON_BOOTSTRAP) + +-pkglib_PROGRAMS = \ ++pkglibexec_PROGRAMS = \ + src/fdcopy + + dist_pkgdata_DATA = \ +@@ -173,7 +173,7 @@ + echo "VERSION_FULL = '$(VERSION_FULL)'"; \ + echo "LOCALSTATEDIR = '$(localstatedir)'"; \ + echo "SYSCONFDIR = '$(sysconfdir)'"; \ +- echo "PKGLIBDIR = '$(pkglibdir)'"; \ ++ echo "PKGLIBEXECDIR = '$(pkglibexecdir)'"; \ + } > $@ + + $(REPLACE_VARS_SED): Makefile stamp-directories +@@ -182,7 +182,7 @@ + echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \ + echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \ + echo 's#@SBINDIR@#$(sbindir)#g'; \ +- echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \ ++ echo 's#@PKGLIBEXECDIR@#$(pkglibexecdir)#g'; \ + echo 's#@PKGPYTHONDIR@#$(pkgpythondir)#g'; \ + } > $@ + +@@ -206,7 +206,7 @@ + # files when building. + srclinks: stamp-directories + set -e; \ +- for i in $(pkgpython_PYTHON) $(app_PYTHON) $(dist_pkglib_SCRIPTS); do \ ++ for i in $(pkgpython_PYTHON) $(app_PYTHON) $(dist_pkglibexec_SCRIPTS); do \ + if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \ + $(LN_S) $(abs_top_srcdir)/$$i $$i; \ + fi; \ +diff -Naur neatx.orig/lib/constants.py neatx/lib/constants.py +--- neatx.orig/lib/constants.py 2012-08-21 12:09:25.504181479 +0200 ++++ neatx/lib/constants.py 2012-08-21 12:12:46.964539145 +0200 +@@ -40,14 +40,14 @@ + START_GNOME_COMMAND = "gnome-session" + + NXUSER = "nx" +-NXSERVER = _autoconf.PKGLIBDIR + "/nxserver" +-NXNODE = _autoconf.PKGLIBDIR + "/nxnode" +-NXNODE_WRAPPER = _autoconf.PKGLIBDIR + "/nxnode-wrapper" +-NXNC = _autoconf.PKGLIBDIR + "/nxnc" +-NXDIALOG = _autoconf.PKGLIBDIR + "/nxdialog" ++NXSERVER = _autoconf.PKGLIBEXECDIR + "/nxserver" ++NXNODE = _autoconf.PKGLIBEXECDIR + "/nxnode" ++NXNODE_WRAPPER = _autoconf.PKGLIBEXECDIR + "/nxnode-wrapper" ++NXNC = _autoconf.PKGLIBEXECDIR + "/nxnc" ++NXDIALOG = _autoconf.PKGLIBEXECDIR + "/nxdialog" + NXAGENT_PKGNAME = "nxagent" +-FDCOPY = _autoconf.PKGLIBDIR + "/fdcopy" +-TTYSETUP = _autoconf.PKGLIBDIR + "/ttysetup" ++FDCOPY = _autoconf.PKGLIBEXECDIR + "/fdcopy" ++TTYSETUP = _autoconf.PKGLIBEXECDIR + "/ttysetup" + + NXAGENT_VERSION_SEP = ".-~" + diff --git a/net-misc/neatx/neatx-0.3.1_p59-r1.ebuild b/net-misc/neatx/neatx-0.3.1_p59-r1.ebuild index 5a5d843c3ce1..9aaed3da488f 100644 --- a/net-misc/neatx/neatx-0.3.1_p59-r1.ebuild +++ b/net-misc/neatx/neatx-0.3.1_p59-r1.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r1.ebuild,v 1.7 2012/02/05 01:53:02 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r1.ebuild,v 1.8 2012/08/21 13:34:00 voyageur Exp $ EAPI="3" PYTHON_DEPEND="2" -inherit eutils autotools python multilib +inherit eutils autotools python multilib user DESCRIPTION="Google implementation of NX server" HOMEPAGE="http://code.google.com/p/neatx/" diff --git a/net-misc/neatx/neatx-0.3.1_p59-r2.ebuild b/net-misc/neatx/neatx-0.3.1_p59-r2.ebuild index 13dd0ced7b96..072846fb685d 100644 --- a/net-misc/neatx/neatx-0.3.1_p59-r2.ebuild +++ b/net-misc/neatx/neatx-0.3.1_p59-r2.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r2.ebuild,v 1.6 2012/02/05 01:53:02 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r2.ebuild,v 1.7 2012/08/21 13:34:00 voyageur Exp $ EAPI="3" PYTHON_DEPEND="2" -inherit eutils autotools python multilib +inherit eutils autotools python multilib user DESCRIPTION="Google implementation of NX server" HOMEPAGE="http://code.google.com/p/neatx/" diff --git a/net-misc/neatx/neatx-0.3.1_p59-r3.ebuild b/net-misc/neatx/neatx-0.3.1_p59-r3.ebuild new file mode 100644 index 000000000000..6807b8497748 --- /dev/null +++ b/net-misc/neatx/neatx-0.3.1_p59-r3.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r3.ebuild,v 1.1 2012/08/21 13:34:00 voyageur Exp $ + +EAPI=4 + +PYTHON_DEPEND="2" +inherit eutils autotools python multilib user + +DESCRIPTION="Google implementation of NX server" +HOMEPAGE="http://code.google.com/p/neatx/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND="dev-python/docutils" +RDEPEND="dev-python/pexpect + dev-python/simplejson + >=dev-python/pygtk-2.14 + >=dev-python/pygobject-2.14:2 + app-portage/portage-utils + media-fonts/font-misc-misc + media-fonts/font-cursor-misc + || ( net-analyzer/gnu-netcat + net-analyzer/netcat + net-analyzer/netcat6 ) + net-misc/nx" + +S=${WORKDIR}/${PN} + +pkg_setup () { + # configure script looks for latest python2 only, + # no multiple versions support + python_set_active_version 2 + python_pkg_setup + + if [ -z "${NX_HOME_DIR}" ]; + then + export NX_HOME_DIR=/var/lib/neatx/home + fi + enewuser nx -1 -1 ${NX_HOME_DIR} +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-use_libexecdir.patch + + sed -i -e "s/rst2html]/rst2html.py]/" configure.ac \ + || die "configure.ac sed failed" + sed -e "s#/lib/neatx#/neatx#" \ + -e "/^docdir/s#\$(PACKAGE)#${PF}#" \ + -i Makefile.am \ + || die "Makefile.am sed failed" + sed -e "/DATA_DIR =/s#/lib/neatx#/neatx#" \ + -i lib/constants.py || die "constants.py sed failed" + + eautoreconf + + echo "#!/bin/sh" > autotools/py-compile +} + +src_compile() { + default_src_compile + # Scripts are automatically generated, fix them here + python_convert_shebangs 2 src/nx* +} + +src_install() { + emake install DESTDIR="${D}" + fperms 777 /var/lib/neatx/sessions + dodir ${NX_HOME_DIR}/.ssh + fowners nx:nx ${NX_HOME_DIR} + fowners nx:nx ${NX_HOME_DIR}/.ssh + + insinto /etc + newins doc/neatx.conf.example neatx.conf + + # nc or netcat6 or netcat? + if has_version net-analyzer/gnu-netcat; then + nc_path="/usr/bin/netcat" + elif has_version net-analyzer/netcat6; then + nc_path="/usr/bin/nc6" + else + nc_path="/usr/bin/nc" + fi + cat >> "${D}"/etc/neatx.conf << EOF + +netcat-path = ${nc_path} +use-xsession = false +start-gnome-command = /etc/X11/Sessions/Gnome +EOF + + insinto /usr/share/neatx + insopts -m 600 -o nx + newins extras/authorized_keys.nomachine authorized_keys.nomachine + + insinto ${NX_HOME_DIR}/.ssh + insopts -m 600 -o nx + newins extras/authorized_keys.nomachine authorized_keys + + # protect ssh key from getting clobbered by future upgrade (bug #339366) + echo "CONFIG_PROTECT=\"${NX_HOME_DIR}\"" > "${T}/60${PN}" + doenvd "${T}/60${PN}" +} + +pkg_preinst () { + # preserve custom ssh key if present (bug #339366) + # CONFIG_PROTECT entry created above will only work for future emerges, + # not the current one (until bug #276345 gets fixed) + if [ -e "${ROOT}/${NX_HOME_DIR}/.ssh/authorized_keys" ] ; then + einfo "Preserving existing ssh key: ${NX_HOME_DIR}/.ssh/authorized_keys" + insinto ${NX_HOME_DIR}/.ssh + insopts -m 600 -o nx + newins "${ROOT}/${NX_HOME_DIR}/.ssh/authorized_keys" authorized_keys + fi +} + +pkg_postinst () { + python_mod_optimize neatx + + # Other NX servers ebuilds may have already created the nx account + # However they use different login shell/home directory paths + if [[ ${ROOT} == "/" ]]; then + usermod -s /usr/$(get_libdir)/neatx/nxserver-login nx || die "Unable to set login shell of nx user!!" + usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!" + else + elog "If you had another NX server installed before, please make sure" + elog "the nx user account is correctly set to:" + elog " * login shell: /usr/$(get_libdir)/neatx/nxserver-login" + elog " * home directory: ${NX_HOME_DIR}" + fi + + if has_version net-misc/openssh[-pam]; then + elog "" + elog "net-misc/openssh was not built with PAM support" + elog "You will need to unlock the nx account by setting a password for it" + fi + + elog "If you want to use the default su authentication (rather than ssh)" + elog "you must ensure that the nx user is a member of the wheel group." + elog "You can add it via \"usermod -a -G wheel nx\"" +} + +pkg_postrm() { + python_mod_cleanup neatx +} |