diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2009-03-12 19:08:24 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2009-03-12 19:08:24 +0000 |
commit | d3022f6fdc479f5636e96d34cb28697078d874bc (patch) | |
tree | ba1ac0e4db56cc370c4eecb9a23b4fb3dc36eb4c /net-misc | |
parent | Marked ~hppa (bug #260777). (diff) | |
download | gentoo-2-d3022f6fdc479f5636e96d34cb28697078d874bc.tar.gz gentoo-2-d3022f6fdc479f5636e96d34cb28697078d874bc.tar.bz2 gentoo-2-d3022f6fdc479f5636e96d34cb28697078d874bc.zip |
Update to use freenx-team tarballs, includes some interesting patches and fixes (including fixing keyboard keys for some people, and shadow sessions)
(Portage version: 2.2_rc25/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
4 files changed, 219 insertions, 1 deletions
diff --git a/net-misc/nxserver-freenx/ChangeLog b/net-misc/nxserver-freenx/ChangeLog index 77fae0157bea..175113acf462 100644 --- a/net-misc/nxserver-freenx/ChangeLog +++ b/net-misc/nxserver-freenx/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-misc/nxserver-freenx # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freenx/ChangeLog,v 1.58 2009/03/08 15:30:37 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freenx/ChangeLog,v 1.59 2009/03/12 19:08:23 voyageur Exp $ + +*nxserver-freenx-0.7.3_p102 (12 Mar 2009) + + 12 Mar 2009; Bernard Cafarelli <voyageur@gentoo.org> + +files/nxserver-freenx-0.7.3_p102-cflags.patch, + +files/nxserver-freenx-0.7.3_p102-nxloadconfig.patch, + +nxserver-freenx-0.7.3_p102.ebuild: + Update to use freenx-team tarballs, includes some interesting patches and + fixes (including fixing keyboard keys for some people, and shadow + sessions) 08 Mar 2009; Markus Meier <maekke@gentoo.org> nxserver-freenx-0.7.3-r2.ebuild: diff --git a/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p102-cflags.patch b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p102-cflags.patch new file mode 100644 index 000000000000..e57cf841accb --- /dev/null +++ b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p102-cflags.patch @@ -0,0 +1,33 @@ +--- nx-session-launcher/Makefile.orig 2008-12-19 16:34:02.000000000 +0100 ++++ nx-session-launcher/Makefile 2008-12-19 16:34:55.000000000 +0100 +@@ -1,7 +1,6 @@ + .PHONY: all install + +-CC=gcc +-CFLAGS=-g -O2 -Wall -fPIC ++CFLAGS+=-fPIC + + SOURCES = nx-session-launcher-suid.c + PROGRAMS = nx-session-launcher-suid +--- nxredir/Makefile.orig 2008-12-19 16:33:53.000000000 +0100 ++++ nxredir/Makefile 2008-12-19 16:34:48.000000000 +0100 +@@ -1,7 +1,6 @@ + all: libnxredir.so + +-CC=gcc +-CFLAGS=-g -O2 -Wall -fPIC ++CFLAGS+=-fPIC + LIBNAME=libnxredir.so + VERSION=0 + +@@ -14,8 +13,8 @@ + rm -f *.o + + ifneq ($(NX_VERSION),) +-install: all +- install -m755 $(LIBNAME) $(DESTDIR)/$$PATH_LIB/ ++install: ++ install -m755 $(LIBNAME).$(VERSION) $(DESTDIR)/$$PATH_LIB/ + install -m755 nxredir $(DESTDIR)/$$PATH_BIN/ + install -m755 nxsmb $(DESTDIR)/$$CUPS_BACKEND/ + perl -pi -e "s,PATH_LIB=.*,PATH_LIB=\"$$PATH_LIB\",g" $(DESTDIR)/$$PATH_BIN/nxredir diff --git a/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p102-nxloadconfig.patch b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p102-nxloadconfig.patch new file mode 100644 index 000000000000..21a33260351c --- /dev/null +++ b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p102-nxloadconfig.patch @@ -0,0 +1,43 @@ +--- nxloadconfig.orig 2009-03-12 18:29:22.000000000 +0100 ++++ nxloadconfig 2009-03-12 18:29:53.000000000 +0100 +@@ -58,7 +58,7 @@ + # Where can different nx components be found + NX_DIR=/usr + PATH_BIN=$NX_DIR/bin # if you change that, be sure to also change the public keys +-PATH_LIB=$NX_DIR/lib ++PATH_LIB=$NX_DIR/lib/NX/lib + NX_ETC_DIR=/etc/nxserver + NX_SESS_DIR=/var/lib/nxserver/db + NX_HOME_DIR=/var/lib/nxserver/home +@@ -194,11 +194,11 @@ + KILL_DEFAULT_X_WM="1" + BOOTSTRAP_X_SESSION="0" + USER_X_STARTUP_SCRIPT=.Xclients +-DEFAULT_X_SESSION=/etc/X11/xdm/Xsession ++DEFAULT_X_SESSION=/etc/X11/Sessions/Xsession + COMMAND_GDM_X_SESSION="/etc/gdm/Xsession custom" + if [ ! -x "$COMMAND_GDM_X_SESSION" ] + then +- COMMAND_GDM_X_SESSION="/etc/X11/Xsession" ++ COMMAND_GDM_X_SESSION="/etc/X11/Sessions/Xsession" + fi + COMMAND_START_KDE=startkde + COMMAND_START_GNOME=gnome-session +@@ -224,7 +224,7 @@ + COMMAND_NXSHADOWACL="$PATH_BIN/nxshadowacl" + COMMAND_NXACL="$PATH_BIN/nxacl" + COMMAND_NXCHECKLOAD="$PATH_BIN/nxcheckload" +-COMMAND_NXAGENT="$PATH_BIN/nxagent" ++COMMAND_NXAGENT="REAL_PATH_LIB/nxagent" + + # Guest directives + ENABLE_GUEST_LOGIN="0" +@@ -357,7 +357,7 @@ + [ -z "$AGENT_LIBRARY_PATH" ] && AGENT_LIBRARY_PATH=$PATH_LIB + [ -z "$PROXY_LIBRARY_PATH" ] && PROXY_LIBRARY_PATH=$PATH_LIB + [ -z "$APPLICATION_LIBRARY_PATH" ] && APPLICATION_LIBRARY_PATH=$PATH_LIB +-[ -z "$APPLICATION_LIBRARY_PRELOAD" ] && APPLICATION_LIBRARY_PRELOAD="$APPLICATION_LIBRARY_PATH/libX11.so.6.2:$APPLICATION_LIBRARY_PATH/libXext.so.6.4:$APPLICATION_LIBRARY_PATH/libXcomp.so:$APPLICATION_LIBRARY_PATH/libXcompext.so:$APPLICATION_LIBRARY_PATH/libXrender.so.1.2" ++[ -z "$APPLICATION_LIBRARY_PRELOAD" ] && APPLICATION_LIBRARY_PRELOAD="$APPLICATION_LIBRARY_PATH/libX11.so:$APPLICATION_LIBRARY_PATH/libXext.so:$APPLICATION_LIBRARY_PATH/libXcomp.so:$APPLICATION_LIBRARY_PATH/libXcompext.so:$APPLICATION_LIBRARY_PATH/libXrender.so" + + NX_BACKEND_VERSION=$(strings $COMMAND_NXAGENT 2>/dev/null | egrep 'NXAGENT - Version' | sed 's/.*Version //g') + diff --git a/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p102.ebuild b/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p102.ebuild new file mode 100644 index 000000000000..491f8df3f10c --- /dev/null +++ b/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p102.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p102.ebuild,v 1.1 2009/03/12 19:08:23 voyageur Exp $ + +EAPI=1 + +inherit multilib eutils toolchain-funcs versionator + +MAJOR_PV="$(get_version_component_range 1-3)" +PATCH_VER="$(get_version_component_range 4)" +MY_PN="freenx-server" + +DESCRIPTION="Free Software Implementation of the NX Server" +HOMEPAGE="http://freenx.berlios.de/ https://launchpad.net/~freenx-team" +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" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +RESTRICT="strip" +IUSE="arts cups esd +nxclient" + +DEPEND="x11-misc/gccmakedep + x11-misc/imake" +RDEPEND="dev-tcltk/expect + media-fonts/font-misc-misc + media-fonts/font-cursor-misc + net-analyzer/gnu-netcat + >=net-misc/nx-2.1.0 + sys-apps/gawk + virtual/ssh + x11-apps/xauth + x11-apps/xrdb + x11-apps/sessreg + arts? ( kde-base/arts ) + cups? ( net-print/cups ) + esd? ( media-sound/esound ) + nxclient? ( net-misc/nxclient ) + !nxclient? ( !net-misc/nxclient + || ( x11-misc/xdialog + x11-apps/xmessage ) ) + !net-misc/nxserver-freeedition + !net-misc/nxserver-2xterminalserver" + +S=${WORKDIR}/${MY_PN} + +export NX_HOME_DIR=/var/lib/nxserver/home + +pkg_setup () { + enewuser nx -1 -1 ${NX_HOME_DIR} +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-nxloadconfig.patch + epatch "${FILESDIR}"/${P}-cflags.patch + epatch "${FILESDIR}"/${PN}-0.7.2-cups.patch + + sed -e "/PATH_LIB=/s/lib/$(get_libdir)/g" \ + -e "s#REAL_PATH_LIB#/usr/$(get_libdir)/NX/bin#" \ + -i nxloadconfig || die "nxloadconfig sed failed" + + # Change the defaults in nxloadconfig to meet the users needs. + if use arts ; then + einfo "Enabling arts support." + sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die + sed -i '/ENABLE_ARTSD_PRELOAD=/s/"0"/"1"/' node.conf.sample || die + fi + if use esd ; then + einfo "Enabling esd support." + sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' nxloadconfig || die + sed -i '/ENABLE_ESD_PRELOAD=/s/"0"/"1"/' node.conf.sample || die + fi + if use cups ; then + einfo "Enabling cups support." + sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' nxloadconfig || die + sed -i '/ENABLE_KDE_CUPS=/s/"0"/"1"/' node.conf.sample || die + fi +} + +src_compile() { + emake CC=$(tc-getCC) CDEBUGFLAGS="${CFLAGS}" || die "compilation failed" +} + +src_install() { + export NX_ETC_DIR=/etc/nxserver + export NX_SESS_DIR=/var/lib/nxserver/db + + emake DESTDIR="${D}" install || die "install failed" + + # This should be renamed to remove the blocker on net-misc/nxclient + use nxclient && rm "${D}"/usr/bin/nxprint + + mv "${D}"/etc/nxserver/node.conf.sample "${D}"/etc/nxserver/node.conf || + die "cannot find default configuration file" + + dodir ${NX_ETC_DIR} + for x in passwords passwords.orig ; do + touch "${D}"${NX_ETC_DIR}/$x + chmod 600 "${D}"${NX_ETC_DIR}/$x + done + + dodir ${NX_HOME_DIR} + + for x in closed running failed ; do + keepdir ${NX_SESS_DIR}/$x + fperms 0700 ${NX_SESS_DIR}/$x + done + + newinitd "${FILESDIR}"/nxserver.init nxserver +} + +pkg_postinst () { + # 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/bin/nxserver 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!!" + usermod -G utmp nx || die "Unable to add nx user to utmp group!!" + 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/bin/nxserver" + elog " * home directory: ${NX_HOME_DIR}" + elog " * supplementary groups: utmp" + fi + + elog "To complete the installation, run:" + elog " nxsetup --install --setup-nomachine-key --clean --purge" + elog "This will use the default Nomachine SSH key" +} |