summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/x2goserver
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/x2goserver')
-rw-r--r--net-misc/x2goserver/Manifest6
-rw-r--r--net-misc/x2goserver/files/x2gocleansessions.service10
-rw-r--r--net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch19
-rw-r--r--net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch27
-rw-r--r--net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch58
-rw-r--r--net-misc/x2goserver/files/x2goserver.init21
-rw-r--r--net-misc/x2goserver/metadata.xml9
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.12.ebuild83
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.15.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.16.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.17.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild85
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild90
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.18.ebuild82
-rw-r--r--net-misc/x2goserver/x2goserver-4.0.1.19.ebuild85
15 files changed, 821 insertions, 0 deletions
diff --git a/net-misc/x2goserver/Manifest b/net-misc/x2goserver/Manifest
new file mode 100644
index 000000000000..e1e83f9ed7fe
--- /dev/null
+++ b/net-misc/x2goserver/Manifest
@@ -0,0 +1,6 @@
+DIST x2goserver-4.0.1.12.tar.gz 78958 SHA256 447c5e7b47e6b2bc087731ed26c827020130cc8530ca020a03f7f3ecadc308cc SHA512 30ce6c20cf0bf67ee162cda5d0cbbfd994ac47aa140e3c4cd6118b594ed8fbf83dbc961f2323694206c705f647f32dba8a7fc7bde4ef22be2d4936642865a3d3 WHIRLPOOL 9d4887a1dd701d361311850a8e936d7f22ecf76e1b4ee78b11feca6ec25d02419221b0fb2e72c440394f81e63ffa73762b33bd58123e7bd441e32446ce40814e
+DIST x2goserver-4.0.1.15.tar.gz 76128 SHA256 46c0fc2303014db99b138a352a7f3df89c4f7cfabc11dc0aeea4cdc76253bdfb SHA512 ca806c39d2536e7962540733e85199fefea54e80695c6f1ca736cc1998b411524afa8d9cf29c26855fc3373105277daa4ddd69cbcd05c2bbecb01ca5172ba05c WHIRLPOOL b06ace09acf14a0b82b0b5b8f795823d7997c99a4a78bd120ecadedf3bbb8c0b6ad371e8bacf1c080e5d6b45d9760cef8c04f69b9a86a1b2dceb3ebaa450bde0
+DIST x2goserver-4.0.1.16.tar.gz 81836 SHA256 c13dde4f6755f6c42fdc32a5a6167a5e2765eb5077a43e74ffdb50a36be7f8f8 SHA512 f66da1e4b1b29021951f3ebdd93ff7be08b20b6322b7cbae66f5792336b54f23d39273fb9e4956dc6b01620488d7b869269a0fe1e7491147650f6232330236ea WHIRLPOOL c79db32e632a6db876529eed0cd1dc0bf13d0ec82c2f2939e595f9e0b9828a0cdf8553eedec483da413ca0cc041627093addb18682f6aa197e84d61001bced6a
+DIST x2goserver-4.0.1.17.tar.gz 82298 SHA256 364d4f3152a4b4a4b04742a125f5b1c6fd0c82ad9e17a8363d56d926998b213b SHA512 3ffcc8678a5ed380b7820042fa0f8c19d017777cd13e6eed84689636ae49aa0733b4ed4e496e37a64939bbc1fafead19671c919f713f86db5e47ce02e1a73cc1 WHIRLPOOL fddffe5e86f355f46cacd9158387b9859c0c8dfe6f32bf02a7e1bac3a1ea643127e0355d9813a1592bd4b19764861eee3f1d522653bdba11187442f039d9261d
+DIST x2goserver-4.0.1.18.tar.gz 82452 SHA256 4a1e7eb9cf309c126fdab1f97bd55cd036b0a02a04cda1d317b193d8ab9b0612 SHA512 e0f439301cbb2acc09e14a101bebbbac3e436383de51b7ae029117eaa95c6181045335c83125615e0f0ed191ae39d5abb120c1f6b20fa5b78fe94288248d6fd8 WHIRLPOOL fe0ad6b5a0a1a124d62ebcee152a84dd7b34ebe83f04440ff5dac471b1f5e19339dfa340631cd2df10398d38c4ed34c875a52337a394281b2976d9059d6f1bbd
+DIST x2goserver-4.0.1.19.tar.gz 89434 SHA256 3dd5c1464a7992a38760fd6b08f5f8d37646f939f4f7834a7cd96bf4950623cc SHA512 dbd054a6bf781d843a48fcea3449037b991aaa38a52705d48dd5fa8d7fe85c56d4ff31b9a10189a9043a3e5cc0c69475947aea5a5fb78e3c076c0e56079b747d WHIRLPOOL f44fadfda6e1ff165ff989f0c10116c8318f5915764b9bfc663e4658190934eb5155e17e072f131842a98cc02908366b0f91c7b0b9b9e73d4e2a729f00ba0d31
diff --git a/net-misc/x2goserver/files/x2gocleansessions.service b/net-misc/x2goserver/files/x2gocleansessions.service
new file mode 100644
index 000000000000..393d841c5acd
--- /dev/null
+++ b/net-misc/x2goserver/files/x2gocleansessions.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=x2go - remote desktop server
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/sbin/x2gocleansessions
+PIDFile=/run/x2goserver.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch b/net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch
new file mode 100644
index 000000000000..11cef863be06
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver-4.0.1.18-fix_local_desktop_sharing.patch
@@ -0,0 +1,19 @@
+diff -Naur x2goserver-4.0.1.18.orig/x2goserver/bin/x2golistdesktops x2goserver-4.0.1.18/x2goserver/bin/x2golistdesktops
+--- x2goserver-4.0.1.18.orig/x2goserver/bin/x2golistdesktops 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/x2goserver/bin/x2golistdesktops 2015-01-14 10:52:55.044479499 +0100
+@@ -60,7 +60,15 @@
+ $rdisp="I${rdisp}I";
+
+ my $uname=$ENV{'USER'};
++
++# on Debian the ss command is in /usr/bin, on Fedora, it is in /usr/sbin...
++# -> so we need to tweak the PATH env var a little here...
++my $old_PATH=$ENV{'PATH'};
++$ENV{'PATH'}="$ENV{'PATH'}:/usr/sbin:/sbin";
+ my $lines=`ss -lxu`;
++$ENV{'PATH'}=$old_PATH;
++undef $old_PATH;
++
+ my @lines=split("\n", "$lines");
+
+ my @outp = grep ( /(@| )\/tmp\/.X11-unix\/X.*/, @lines);
diff --git a/net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch b/net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch
new file mode 100644
index 000000000000..868c52a0564e
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver-4.0.1.18-prevent_bash_failures_xsession.patch
@@ -0,0 +1,27 @@
+diff --git a/x2goserver-xsession/etc/Xsession b/x2goserver-xsession/etc/Xsession
+index b9ef15e..94692db 100755
+--- a/x2goserver-xsession/etc/Xsession
++++ b/x2goserver-xsession/etc/Xsession
+@@ -139,7 +139,9 @@ elif [ -f /etc/redhat-release ] || [ -f /etc/gentoo-release ]; then
+
+ # Set up i18n environment
+ if [ -r /etc/profile.d/lang.sh ]; then
++ set +e
+ . /etc/profile.d/lang.sh
++ set -e
+ fi
+
+ # merge in defaults
+@@ -177,7 +179,9 @@ elif [ -f /etc/redhat-release ] || [ -f /etc/gentoo-release ]; then
+
+ # run all system xinitrc shell scripts.
+ for file in /etc/x2go/xinitrc.d/* ; do
++ set +e
+ [ -r "$file" ] && . $file
++ set -e
+ done
+
+ # Prefix launch of session with ssh-agent if available and not already running.
+--
+1.7.9.5
+
diff --git a/net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch b/net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch
new file mode 100644
index 000000000000..434deb6daa5e
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver-4.0.1.18-use_printf.patch
@@ -0,0 +1,58 @@
+diff -Naur x2goserver-4.0.1.18.orig/rpm/x2goserver.init x2goserver-4.0.1.18/rpm/x2goserver.init
+--- x2goserver-4.0.1.18.orig/rpm/x2goserver.init 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/rpm/x2goserver.init 2015-01-14 11:23:42.840796430 +0100
+@@ -35,7 +35,7 @@
+ mkdir $XSOCKDIR
+ chmod 1777 $XSOCKDIR
+ fi
+- echo -n $"Starting $prog: "
++ printf '%s' $"Starting $prog: "
+ daemon $exec $OPTS
+ retval=$?
+ echo
+@@ -43,7 +43,7 @@
+ }
+
+ stop() {
+- echo -n $"Stopping $prog: "
++ printf '%s' $"Stopping $prog: "
+ killproc $exec
+ retval=$?
+ echo
+diff -Naur x2goserver-4.0.1.18.orig/x2goserver/bin/x2gopath x2goserver-4.0.1.18/x2goserver/bin/x2gopath
+--- x2goserver-4.0.1.18.orig/x2goserver/bin/x2gopath 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/x2goserver/bin/x2gopath 2015-01-14 11:25:57.105755690 +0100
+@@ -32,12 +32,12 @@
+
+ # The following section is subject to substitution by distro packaging tools.
+ case "$1" in
+- base) echo -n "$base";;
+- lib) echo -n "$base/lib/x2go";;
+- libexec) echo -n "$base/lib/x2go";;
+- share) echo -n "$base/share/x2go";;
+- nx-x11) echo -n "$base/lib/nx/X11";;
+- xinerama) echo -n "$base/lib/nx/X11/Xinerama";;
++ base) printf '%s' "$base";;
++ lib) printf '%s' "$base/lib/x2go";;
++ libexec) printf '%s' "$base/lib/x2go";;
++ share) printf '%s' "$base/share/x2go";;
++ nx-x11) printf '%s' "$base/lib/nx/X11";;
++ xinerama) printf '%s' "$base/lib/nx/X11/Xinerama";;
+ *) exit 1;;
+ esac;
+
+diff -Naur x2goserver-4.0.1.18.orig/x2goserver-xsession/etc/Xsession x2goserver-4.0.1.18/x2goserver-xsession/etc/Xsession
+--- x2goserver-4.0.1.18.orig/x2goserver-xsession/etc/Xsession 2014-10-06 23:23:27.000000000 +0200
++++ x2goserver-4.0.1.18/x2goserver-xsession/etc/Xsession 2015-01-14 11:23:42.840796430 +0100
+@@ -26,9 +26,9 @@
+ # pretty-print messages of arbitrary length (no trailing newline); use
+ # xmessage if it is available and $DISPLAY is set
+ MESSAGE="$PROGNAME: $*"
+- echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
++ printf '%s' "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
+ if [ -n "$DISPLAY" ] && which xmessage 1> /dev/null 2>&1; then
+- echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
++ printf '%s' "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
+ fi
+ }
+
diff --git a/net-misc/x2goserver/files/x2goserver.init b/net-misc/x2goserver/files/x2goserver.init
new file mode 100644
index 000000000000..a6b7a66f7889
--- /dev/null
+++ b/net-misc/x2goserver/files/x2goserver.init
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON=/usr/sbin/x2gocleansessions
+PIDFILE=/var/run/x2goserver.pid
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
+ --exec ${DAEMON} -- $DAEMON_OPTS
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend $?
+}
diff --git a/net-misc/x2goserver/metadata.xml b/net-misc/x2goserver/metadata.xml
new file mode 100644
index 000000000000..b85de2f29ab3
--- /dev/null
+++ b/net-misc/x2goserver/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>nx</herd>
+ <longdescription>The X2Go server</longdescription>
+ <use>
+ <flag name="fuse">Use <pkg>sys-fs/sshfs-fuse</pkg> to allow shared folders</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.12.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.12.ebuild
new file mode 100644
index 000000000000..9afea863698d
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.12.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+doc +fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+# Requires man2html, only provided by sys-apps/man
+DEPEND="doc? ( sys-apps/man )"
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ net-misc/nx
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build if needed
+ if ! use doc; then
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ fi
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.15.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.15.ebuild
new file mode 100644
index 000000000000..fa090b2b79b3
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.15.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ net-misc/nx
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.16.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.16.ebuild
new file mode 100644
index 000000000000..cb09ae2abc15
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.16.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.17.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.17.ebuild
new file mode 100644
index 000000000000..cb09ae2abc15
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.17.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild
new file mode 100644
index 000000000000..463eaf9c5391
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.18-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Bug #524350
+ epatch "${FILESDIR}"/${P}-prevent_bash_failures_xsession.patch
+
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild
new file mode 100644
index 000000000000..9a23e81a01e4
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.18-r2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Bug #524350
+ epatch "${FILESDIR}"/${P}-prevent_bash_failures_xsession.patch
+ epatch "${FILESDIR}"/${P}-fix_local_desktop_sharing.patch
+ # Bug #524350
+ epatch "${FILESDIR}"/${P}-use_printf.patch
+
+ # Do not install Xresources symlink (#521126)
+ sed -e '\#$(INSTALL_SYMLINK) /etc/X11/Xresources# s/^/#/' -i x2goserver-xsession/Makefile || die "Xresources symlink sed failed"
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.18.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.18.ebuild
new file mode 100644
index 000000000000..cb09ae2abc15
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.18.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}
diff --git a/net-misc/x2goserver/x2goserver-4.0.1.19.ebuild b/net-misc/x2goserver/x2goserver-4.0.1.19.ebuild
new file mode 100644
index 000000000000..827c64d8a68f
--- /dev/null
+++ b/net-misc/x2goserver/x2goserver-4.0.1.19.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils multilib systemd toolchain-funcs user
+
+DESCRIPTION="The X2Go server"
+HOMEPAGE="http://www.x2go.org"
+SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~x86"
+IUSE="+fuse postgres +sqlite"
+
+REQUIRED_USE="|| ( postgres sqlite )"
+
+DEPEND=""
+RDEPEND="dev-perl/Capture-Tiny
+ dev-perl/Config-Simple
+ dev-perl/File-BaseDir
+ dev-perl/File-ReadBackwards
+ dev-perl/File-Which
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=net-misc/nx-3.5.0.25
+ net-misc/openssh
+ x11-apps/xauth
+ x11-apps/xhost
+ x11-apps/xwininfo
+ fuse? ( sys-fs/sshfs-fuse )
+ postgres? ( dev-perl/DBD-Pg )
+ sqlite? ( dev-perl/DBD-SQLite )"
+
+pkg_setup() {
+ # Force the group creation, #479650
+ enewgroup x2gouser
+ enewgroup x2goprint
+ enewuser x2gouser -1 -1 /var/lib/x2go x2gouser
+ enewuser x2goprint -1 -1 /var/spool/x2goprint x2goprint
+}
+
+src_prepare() {
+ # Do not install Xresources symlink (#521126)
+ sed -e '\#$(INSTALL_SYMLINK) /etc/X11/Xresources# s/^/#/' -i x2goserver-xsession/Makefile || die "Xresources symlink sed failed"
+ # Multilib clean
+ sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
+ # Skip man2html build
+ sed -e "s/build-indep: build_man2html/build-indep:/" -i Makefile */Makefile || die "man2html sed failed"
+ # Use nxagent directly
+ sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" PREFIX=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+
+ fowners root:x2goprint /usr/bin/x2goprint
+ fperms 2755 /usr/bin/x2goprint
+ fperms 0750 /etc/sudoers.d
+ fperms 0440 /etc/sudoers.d/x2goserver
+ dosym /usr/share/applications /etc/x2go/applications
+
+ newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
+ systemd_dounit "${FILESDIR}"/x2gocleansessions.service
+}
+
+pkg_postinst() {
+ if use sqlite ; then
+ elog "To use sqlite and create the initial database, run:"
+ elog " # x2godbadmin --createdb"
+ fi
+ if use postgres ; then
+ elog "To use a PostgreSQL databse, more information is availabe here:"
+ elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
+ fi
+
+ elog "For password authentication, you need to enable PasswordAuthentication"
+ elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
+ elog "An init script was installed for x2gocleansessions"
+}