Initial commit
authorBernard Cafarelli <voyageur@gentoo.org>
Fri, 30 Mar 2007 16:14:32 +0000 (16:14 +0000)
committerBernard Cafarelli <voyageur@gentoo.org>
Fri, 30 Mar 2007 16:14:32 +0000 (16:14 +0000)
Package-Manager: portage-2.1.2.3

net-misc/nxserver-freeedition/ChangeLog [new file with mode: 0644]
net-misc/nxserver-freeedition/files/digest-nxserver-freeedition-2.1.0 [new file with mode: 0644]
net-misc/nxserver-freeedition/files/nxserver-2.1.0-init [new file with mode: 0644]
net-misc/nxserver-freeedition/files/nxserver-2.1.0-setup.patch [new file with mode: 0644]
net-misc/nxserver-freeedition/metadata.xml [new file with mode: 0644]
net-misc/nxserver-freeedition/nxserver-freeedition-2.1.0.ebuild [new file with mode: 0644]

diff --git a/net-misc/nxserver-freeedition/ChangeLog b/net-misc/nxserver-freeedition/ChangeLog
new file mode 100644 (file)
index 0000000..7e91f36
--- /dev/null
@@ -0,0 +1,11 @@
+# ChangeLog for net-misc/nxserver-freeedition
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freeedition/ChangeLog,v 1.1 2007/03/30 16:14:32 voyageur Exp $
+
+*nxserver-freeedition-2.1.0 (30 Mar 2007)
+
+  30 Mar 2007; Bernard Cafarelli <voyageur@gentoo.org>
+  +files/nxserver-2.1.0-init, +files/nxserver-2.1.0-setup.patch,
+  +metadata.xml, +nxserver-freeedition-2.1.0.ebuild:
+  Initial commit, bug #153866
+
diff --git a/net-misc/nxserver-freeedition/files/digest-nxserver-freeedition-2.1.0 b/net-misc/nxserver-freeedition/files/digest-nxserver-freeedition-2.1.0
new file mode 100644 (file)
index 0000000..62c0839
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 9cbc23a14ffc379a3a5fe184a50719e4 nxserver-2.1.0-22.i386.tar.gz 5037224
+RMD160 fe2544b03c0d0ec5bdfe415fcc15327e7160379b nxserver-2.1.0-22.i386.tar.gz 5037224
+SHA256 a2c807db46249f6c708b5aa9bb4653b0f5f0add12f94d26609abe7f2de146397 nxserver-2.1.0-22.i386.tar.gz 5037224
diff --git a/net-misc/nxserver-freeedition/files/nxserver-2.1.0-init b/net-misc/nxserver-freeedition/files/nxserver-2.1.0-init
new file mode 100644 (file)
index 0000000..f37060d
--- /dev/null
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# opts="${opts} reload configtest"
+
+NX_SERVER_CMD="/usr/NX/bin/nxserver"
+
+depend() 
+{
+       need net
+       use nxsensor
+}
+
+start() {
+       ebegin "Starting nxserver"
+       $NX_SERVER_CMD --start
+       if [ $? = 0 ]; then
+               $NX_SERVER_CMD --statistics start
+               eend $?
+       else
+               eend 1
+       fi
+}
+
+stop() {
+       ebegin "Stopping nxserver"
+       $NX_SERVER_CMD --stop
+       $NX_SERVER_CMD --statistics stop
+       eend 0
+}
+
+restart() {
+       $NX_SERVER_CMD --restart
+       $NX_SERVER_CMD --statistics restart
+       eend 0
+}
diff --git a/net-misc/nxserver-freeedition/files/nxserver-2.1.0-setup.patch b/net-misc/nxserver-freeedition/files/nxserver-2.1.0-setup.patch
new file mode 100644 (file)
index 0000000..7cb8712
--- /dev/null
@@ -0,0 +1,70 @@
+--- scripts/setup/nxserver.orig        2006-11-05 16:43:33.000000000 +0000
++++ scripts/setup/nxserver     2006-11-05 17:29:42.000000000 +0000
+@@ -509,6 +509,10 @@
+ removeNXinit () {
++  if [ "$system" = "gentoo" ]; then
++    return
++  fi
++
+   runCommand "$RMCOMMAND -f /etc/init.d/nxserver" "Unable to remove '/etc/init.d/nxserver'" "warn"
+   if [ "$system" = "solaris" ];
+@@ -655,6 +659,10 @@
+ addNXinit () {
++ if [ "$system" = "gentoo" ]; then
++   return
++ fi
++
+  runCommand "cat /usr/NX/scripts/init/nxserver > /etc/init.d/nxserver" "Unable to create: '/etc/init.d/nxserver'" "warn"
+  runCommand "chmod +x /etc/init.d/nxserver" "Cannot set permissions of '/etc/init.d/nxserver' file" "warn"
+@@ -770,6 +778,11 @@
+ addNXUserLinux () {
++  # does the NX user already exist?
++  if id nx > /dev/null 2>&1 ; then
++    return
++  fi
++
+   if [ "x$system" = "xmandrake" -o "x$system" = "xfedora" ];
+   then
+     runCommand "useradd -p '*' -d '$NODE_ROOT/home/nx' -M nx" "Cannot add user: nx to the system" "error"
+@@ -1914,6 +1927,10 @@
+   system=fedora
+ fi
++if [ -d /usr/portage ]; then
++  system=gentoo
++fi
++
+ if [ "x$system" = "x" -a -f /etc/release ];
+ then
+   system=solaris
+@@ -1948,6 +1965,7 @@
+     "mandrake"           ) ;;
+     "fedora"             ) ;;
+     "debian"             ) ;;
++    "gentoo"             ) ;;
+     "solaris"             ) ;;
+     ""                 ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;;
+     *                  ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;;
+@@ -2104,14 +2122,6 @@
+     return 0
+   fi
+   
+-  result=`id nx 2>&1`
+-  if [ $? = 0 ];
+-  then
+-    printMsg "Cannot add user: nx. User: nx already exists" "error"
+-    printMsg "Please try to fix the problem by reinstalling the server" "error"
+-    exit 1
+-  fi
+-
+   LOGFILE="$INSTALLOG"
+   createLogdirectory
+   startLog
diff --git a/net-misc/nxserver-freeedition/metadata.xml b/net-misc/nxserver-freeedition/metadata.xml
new file mode 100644 (file)
index 0000000..ebf3c9e
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>nx</herd>
+<maintainer>
+  <email>nx@gentoo.org</email>
+</maintainer>
+<longdescription>Free edition NX server from NoMachine</longdescription>
+</pkgmetadata>
+
diff --git a/net-misc/nxserver-freeedition/nxserver-freeedition-2.1.0.ebuild b/net-misc/nxserver-freeedition/nxserver-freeedition-2.1.0.ebuild
new file mode 100644 (file)
index 0000000..3028300
--- /dev/null
@@ -0,0 +1,84 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freeedition/nxserver-freeedition-2.1.0.ebuild,v 1.1 2007/03/30 16:14:32 voyageur Exp $
+
+inherit eutils
+
+DESCRIPTION="Free edition NX server from NoMachine"
+HOMEPAGE="http://www.nomachine.com/"
+SRC_URI="http://64.34.161.181/download/2.1.0/Linux/FE/nxserver-2.1.0-22.i386.tar.gz"
+
+LICENSE="nomachine"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="nostrip"
+
+DEPEND="=net-misc/nxnode-2.1*
+               !net-misc/nxserver-freenx"
+RDEPEND="${DEPEND}"
+QA_TEXTRELS="usr/NX/lib/perl/GD.so"
+
+S="${WORKDIR}/NX"
+
+pkg_preinst()
+{
+       enewuser nx -1 -1 /usr/NX/home/nx
+}
+
+src_unpack()
+{
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/nxserver-2.1.0-setup.patch
+}
+
+src_install()
+{
+       # we install nxserver into /usr/NX, to make sure it doesn't clash
+       # with libraries installed for FreeNX
+
+       into /usr/NX
+       for x in nxserver ; do
+               dobin bin/$x
+       done
+
+       dodir /usr/NX/etc
+       insinto /usr/NX/etc
+       doins etc/administrators.db.sample
+       doins etc/guests.db.sample
+       doins etc/passwords.db.sample
+       doins etc/profiles.db.sample
+       doins etc/users.db.sample
+       doins etc/server.lic.sample
+
+       newins etc/server-debian.cfg.sample server-gentoo.cfg.sample
+
+       cp -R etc/keys ${D}/usr/NX/etc || die
+
+       cp -R home ${D}/usr/NX || die
+       cp -R lib ${D}/usr/NX || die
+       cp -R scripts ${D}/usr/NX || die
+       cp -R share ${D}/usr/NX || die
+       cp -R var ${D}/usr/NX || die
+
+       exeinto /etc/init.d
+       newexe ${FILESDIR}/nxserver-2.1.0-init nxserver
+}
+
+pkg_postinst ()
+{
+       usermod -s /usr/NX/bin/nxserver nx || die "Unable to set login shell of nx user!!"
+       usermod -d /usr/NX/home/nx nx || die "Unable to set home directory of nx user!!"
+
+       # only run install when no configuration file is found
+       if [ -f /usr/NX/etc/server.cfg ]; then
+               einfo "Running NoMachine's update script"
+               ${ROOT}/usr/NX/scripts/setup/nxserver --update
+       else
+               einfo "Running NoMachine's setup script"
+               ${ROOT}/usr/NX/scripts/setup/nxserver --install
+       fi
+
+       elog "Remember to add nxserver to your default runlevel"
+}