/[gentoo-x86]/net-misc/x2goserver/x2goserver-4.0.0.2.ebuild
Gentoo

Contents of /net-misc/x2goserver/x2goserver-4.0.0.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Jun 7 14:12:26 2013 UTC (6 years, 7 months ago) by voyageur
Branch: MAIN
Version bump, fixes arbitrary code execution as uid x2gouser

(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key C74525F2)

1 voyageur 1.1 # Copyright 1999-2013 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/net-misc/x2goserver/x2goserver-4.0.0.0.ebuild,v 1.3 2013/03/21 13:55:35 voyageur Exp $
4    
5     EAPI=4
6     inherit eutils multilib toolchain-funcs user
7    
8     DESCRIPTION="The X2Go server"
9     HOMEPAGE="http://www.x2go.org"
10     SRC_URI="http://code.x2go.org/releases/source/${PN}/${P}.tar.gz"
11    
12     LICENSE="GPL-2"
13     SLOT="0"
14     KEYWORDS="~amd64 ~x86"
15     IUSE="+fuse postgres +sqlite"
16    
17     REQUIRED_USE="|| ( postgres sqlite )"
18    
19     # Requires man2html, only provided by sys-apps/man
20     DEPEND="sys-apps/man"
21     RDEPEND="dev-perl/Config-Simple
22     media-fonts/font-cursor-misc
23     media-fonts/font-misc-misc
24     net-misc/nx
25     virtual/ssh
26     x11-apps/xauth
27     fuse? ( sys-fs/sshfs-fuse )
28     postgres? ( dev-perl/DBD-Pg )
29     sqlite? ( dev-perl/DBD-SQLite )"
30    
31     pkg_setup() {
32     enewuser x2gouser -1 -1 /var/lib/x2go
33     enewuser x2goprint -1 -1 /var/spool/x2goprint
34     }
35    
36     src_prepare() {
37     # Multilib clean
38     sed -e "/^LIBDIR=/s/lib/$(get_libdir)/" -i Makefile */Makefile || die "multilib sed failed"
39     # Use nxagent directly
40     sed -i -e "/NX_TEMP=/s/x2goagent/nxagent/" x2goserver/bin/x2gostartagent || die "sed failed"
41     }
42    
43     src_compile() {
44     emake CC="$(tc-getCC)" PREFIX=/usr
45     }
46    
47     src_install() {
48     emake DESTDIR="${D}" PREFIX=/usr install
49    
50     fowners root:x2goprint /usr/bin/x2goprint
51     fperms 2755 /usr/bin/x2goprint
52     dosym /usr/share/applications /etc/x2go/applications
53    
54     newinitd "${FILESDIR}"/${PN}.init x2gocleansessions
55     }
56    
57     pkg_postinst() {
58     if use sqlite ; then
59     elog "To use sqlite and create the initial database, run:"
60     elog " # x2godbadmin --createdb"
61     fi
62     if use postgres ; then
63     elog "To use a PostgreSQL databse, more information is availabe here:"
64     elog "http://www.x2go.org/doku.php/wiki:advanced:multi-node:x2goserver-pgsql"
65     fi
66    
67     elog "For password authentication, you need to enable PasswordAuthentication"
68     elog "in /etc/ssh/sshd_config (disabled by default in Gentoo)"
69     elog "An init script was installed for x2gocleansessions"
70     }

  ViewVC Help
Powered by ViewVC 1.1.20