diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2010-07-01 13:22:10 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2010-07-01 13:22:10 +0000 |
commit | 1bf48190c8ac0229b5ce5660b3a8c018e40eb172 (patch) | |
tree | d4afe35923b4b666a9236d034b0675a963379af8 /net-misc/x2goserver | |
parent | Additional python.eclass fixes (Bug #326045) (diff) | |
download | gentoo-2-1bf48190c8ac0229b5ce5660b3a8c018e40eb172.tar.gz gentoo-2-1bf48190c8ac0229b5ce5660b3a8c018e40eb172.tar.bz2 gentoo-2-1bf48190c8ac0229b5ce5660b3a8c018e40eb172.zip |
Handle both sqlite/postgres USE flags disabled/enabled
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/x2goserver')
-rw-r--r-- | net-misc/x2goserver/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/x2goserver/x2goserver-3.0.1.5-r1.ebuild | 102 |
2 files changed, 109 insertions, 1 deletions
diff --git a/net-misc/x2goserver/ChangeLog b/net-misc/x2goserver/ChangeLog index 3da1afa01bec..e1d0ca3d998f 100644 --- a/net-misc/x2goserver/ChangeLog +++ b/net-misc/x2goserver/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/x2goserver # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/x2goserver/ChangeLog,v 1.6 2010/06/17 21:57:27 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/x2goserver/ChangeLog,v 1.7 2010/07/01 13:22:10 voyageur Exp $ + +*x2goserver-3.0.1.5-r1 (01 Jul 2010) + + 01 Jul 2010; Bernard Cafarelli <voyageur@gentoo.org> + +x2goserver-3.0.1.5-r1.ebuild: + Handle both sqlite/postgres USE flags disabled/enabled 17 Jun 2010; Patrick Lauer <patrick@gentoo.org> x2goserver-3.0.1.5.ebuild: Migrating away from deprecated postgres virtuals diff --git a/net-misc/x2goserver/x2goserver-3.0.1.5-r1.ebuild b/net-misc/x2goserver/x2goserver-3.0.1.5-r1.ebuild new file mode 100644 index 000000000000..8cb978cb994f --- /dev/null +++ b/net-misc/x2goserver/x2goserver-3.0.1.5-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/x2goserver/x2goserver-3.0.1.5-r1.ebuild,v 1.1 2010/07/01 13:22:10 voyageur Exp $ + +EAPI=3 +inherit eutils versionator + +MAJOR_PV="$(get_version_component_range 1-3)" +FULL_PV="${MAJOR_PV}-$(get_version_component_range 4)" +DESCRIPTION="The X2Go server" +HOMEPAGE="http://x2go.berlios.de" +SRC_URI="http://x2go.obviously-nice.de/deb/pool-lenny/${PN}/${PN}_${FULL_PV}_all.deb" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+fuse postgres sqlite" + +DEPEND="" +RDEPEND="app-admin/sudo + dev-perl/Config-Simple + net-misc/nx + virtual/ssh + fuse? ( sys-fs/sshfs-fuse ) + postgres? ( dev-db/postgresql-server ) + sqlite? ( dev-db/sqlite )" +# Still in the NX overlay for now +# ldap? ( net-misc/x2goldaptools )" + +S=${WORKDIR} + +pkg_setup() { + if ! use postgres && ! use sqlite; then + echo + eerror "Either the 'postgres' or the 'sqlite' USE flag is required." + eerror "Please add it to '/etc/make.conf' or '/etc/portage/package.use'." + eerror "Use 'man 5 portage' for more info on '/etc/portage/package.use'." + echo + die "Required USE flag missing." + fi +} + +src_prepare() { + tar xozf data.tar.gz || die "failure unpacking data.tar.gz" + + # Use nxagent directly + sed -i -e "s/x2goagent/nxagent/" usr/bin/x2gostartagent || die "sed failed" + + if use sqlite ; then + echo sqlite > etc/x2go/sql + fi + + epatch "${FILESDIR}"/${PN}-mountdirs_no_desktop_icon.patch +} + +src_install() { + dobin usr/bin/* + dosbin usr/sbin/* + + exeinto /usr/share/x2go/script + doexe usr/lib/x2go/script/x2gocreatebase.sh + doexe usr/lib/x2go/script/x2gosqlite.sh + + insinto /etc/x2go + doins etc/x2go/sql + doins etc/x2go/x2goserver.conf + + if use sqlite ; then + einfo "creating x2go sqlite database directory /var/db/x2go" + dodir /var/db/x2go + fi + + if use postgres ; then + newinitd "${FILESDIR}"/${PN}.init ${PN} + fi +} + +pkg_postinst() { + if use postgres && use sqlite; then + elog "You have enabled both postgreSQL and sqlite (enabled by default) database support" + elog "To use a postgreSQL database, run:" + elog " echo -n local > /etc/x2go/sql" + elog "To switch back to sqlite, run:" + elog " echo -n sqlite > /etc/x2go/sql" + fi + if use postgres ; then + elog "To work with postgreSQL, x2goserver needs a configured database" + elog "Sample script to create the database can be found here:" + elog " /usr/share/x2go/script/x2gocreatebase.sh" + fi + if use sqlite ; then + elog "To work with sqlite, x2goserver needs a configured database" + elog "Sample script to create the database can be found here:" + elog " /usr/share/x2go/script/x2gosqlite.sh" + fi + einfo "" + elog "You also need to give sudo rights on x2gopgwrapper to your users" + elog "A sudoers example for all members of the group users:" + elog " %users ALL=(ALL) NOPASSWD: /usr/bin/x2gopgwrapper" + elog "To give only a special group access to the x2goserver, " + elog "change %users to any other group" +} |