1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit multilib systemd toolchain-funcs xdg
7 DESCRIPTION="The X2Go server"
8 HOMEPAGE="http://www.x2go.org"
9 SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="+fuse postgres +sqlite"
16 REQUIRED_USE="|| ( postgres sqlite )"
18 DEPEND="virtual/perl-ExtUtils-MakeMaker"
19 RDEPEND="acct-user/x2gouser
23 dev-perl/Config-Simple
25 dev-perl/File-ReadBackwards
29 media-fonts/font-cursor-misc
30 media-fonts/font-misc-misc[nls]
31 >=net-misc/nx-3.5.99.14
33 >=sys-apps/iproute2-4.3.0
37 fuse? ( net-fs/sshfs )
38 postgres? ( dev-perl/DBD-Pg )
39 sqlite? ( dev-perl/DBD-SQLite )"
42 "${FILESDIR}"/${PN}-4.1.0.0-Xresources.patch
43 "${FILESDIR}"/${PN}-4.1.0.0-skip_man2html.patch
49 sed -e "s#/lib/#/$(get_libdir)/#" -i x2goserver/bin/x2gopath || die
51 # Do not compress man pages by default
52 sed '/^[[:space:]]*gzip.*man/d' -i */Makefile || die
58 LIBDIR="/usr/$(get_libdir)/x2go" \
65 LIBDIR="/usr/$(get_libdir)/x2go" \
66 NXLIBDIR="/usr/$(get_libdir)/nx" \
70 fowners root:x2goprint /usr/bin/x2goprint
71 fperms 2755 /usr/bin/x2goprint
72 fperms 0750 /etc/sudoers.d
73 fperms 0440 /etc/sudoers.d/x2goserver
74 dosym ../../usr/share/applications /etc/x2go/applications
76 newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
77 systemd_dounit "${FILESDIR}"/x2gocleansessions.service
83 if [[ -f "${EROOT}"/var/lib/x2go/x2go_sessions ]] ; then
84 elog "To use sqlite and update your existing database, run:"
85 elog " # x2godbadmin --updatedb"
87 elog "To use sqlite and create the initial database, run:"
88 elog " # x2godbadmin --createdb"
92 if use postgres ; then
93 elog "To use a PostgreSQL database, more information is availabe here:"
94 elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
97 elog "For password authentication, you need to enable PasswordAuthentication"
98 elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
99 elog "An init script was installed for x2gocleansessions"