summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2005-12-19 22:13:07 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2005-12-19 22:13:07 +0000
commitd000ca69d4f0000d05147c7d22fe468959134241 (patch)
treea0bc56821285487ab249e27f942474d2c6374bdc /sys-apps/gli
parentNew upstream version; Removed old ebuilds. (diff)
downloadgentoo-2-d000ca69d4f0000d05147c7d22fe468959134241.tar.gz
gentoo-2-d000ca69d4f0000d05147c7d22fe468959134241.tar.bz2
gentoo-2-d000ca69d4f0000d05147c7d22fe468959134241.zip
Initial import. Ebuild by Andrew Gaffney <agaffney@gentoo.org> originally and modified by me. This is mostly for development work and isn't considered safe for general use yet.
(Portage version: 2.1_pre1)
Diffstat (limited to 'sys-apps/gli')
-rw-r--r--sys-apps/gli/ChangeLog13
-rw-r--r--sys-apps/gli/Manifest7
-rw-r--r--sys-apps/gli/files/digest-gli-0.21
-rw-r--r--sys-apps/gli/files/gli-dialog.pngbin0 -> 3784 bytes
-rw-r--r--sys-apps/gli/files/gli.pngbin0 -> 3267 bytes
-rwxr-xr-xsys-apps/gli/files/installer108
-rwxr-xr-xsys-apps/gli/files/installer-dialog8
-rwxr-xr-xsys-apps/gli/files/installer-gtk9
-rw-r--r--sys-apps/gli/gli-0.2.ebuild50
9 files changed, 196 insertions, 0 deletions
diff --git a/sys-apps/gli/ChangeLog b/sys-apps/gli/ChangeLog
new file mode 100644
index 000000000000..7a0b413965fd
--- /dev/null
+++ b/sys-apps/gli/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for sys-apps/gli
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gli/ChangeLog,v 1.1 2005/12/19 22:13:06 wolf31o2 Exp $
+
+*gli-0.2 (19 Dec 2005)
+
+ 19 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org> +files/gli.png,
+ +files/gli-dialog.png, +files/installer, +files/installer-dialog,
+ +files/installer-gtk, +gli-0.2.ebuild:
+ Initial import. Ebuild by Andrew Gaffney <agaffney@gentoo.org> originally
+ and modified by me. This is mostly for development work and isn't considered
+ safe for general use yet.
+
diff --git a/sys-apps/gli/Manifest b/sys-apps/gli/Manifest
new file mode 100644
index 000000000000..fa8206623104
--- /dev/null
+++ b/sys-apps/gli/Manifest
@@ -0,0 +1,7 @@
+MD5 a9bce3789092bd1a6d5d55cce1f478c1 gli-0.2.ebuild 1403
+MD5 0a56b52ef225619f925a691fc5dcc867 files/gli.png 3267
+MD5 c71b1e70bafdc3eda6ed2947211a0c30 files/gli-dialog.png 3784
+MD5 f533352d962fe012f5afc114e23fc3b0 files/installer-dialog 121
+MD5 8773747a9dc2897983f5ecfefcb0cf26 files/installer 2921
+MD5 7463cd31bbfffb0bcb5144f153e425e2 files/installer-gtk 114
+MD5 fe2f8a4c16bd7e40988ca58393222444 files/digest-gli-0.2 66
diff --git a/sys-apps/gli/files/digest-gli-0.2 b/sys-apps/gli/files/digest-gli-0.2
new file mode 100644
index 000000000000..74c243733d6e
--- /dev/null
+++ b/sys-apps/gli/files/digest-gli-0.2
@@ -0,0 +1 @@
+MD5 f1c8321896df2bca6a9bc41d889c74c4 installer-0.2.tar.bz2 476765
diff --git a/sys-apps/gli/files/gli-dialog.png b/sys-apps/gli/files/gli-dialog.png
new file mode 100644
index 000000000000..be31199510b0
--- /dev/null
+++ b/sys-apps/gli/files/gli-dialog.png
Binary files differ
diff --git a/sys-apps/gli/files/gli.png b/sys-apps/gli/files/gli.png
new file mode 100644
index 000000000000..0bb1841de43e
--- /dev/null
+++ b/sys-apps/gli/files/gli.png
Binary files differ
diff --git a/sys-apps/gli/files/installer b/sys-apps/gli/files/installer
new file mode 100755
index 000000000000..cc2ac1fce53c
--- /dev/null
+++ b/sys-apps/gli/files/installer
@@ -0,0 +1,108 @@
+#!/bin/bash
+#
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gli/files/installer,v 1.1 2005/12/19 22:13:07 wolf31o2 Exp $
+#
+# This is the installer script that we will use to determine whether or not
+# we are running in X or as root. A good portion of this script was ripped
+# from the loki_setup setup.sh script, as it already did most of what I was
+# looking to do.
+
+installer_root=/opt/installer
+
+# Allow X
+xhost + 2>/dev/null
+
+# patching utf-8 locales
+if test ! ${UTF8FIX} ; then
+LANG=`echo ${LANG} | sed 's/[\@\.].*$//'`
+fi
+
+# Go to the proper setup directory (if not already there)
+#cd `dirname $0`
+cd $installer_root/bin
+
+# call installer with -auth when ran through su/xsu/sudo
+auth=0
+if [ "$1" = "-auth" ]; then
+ auth=1
+ shift
+fi
+
+# Find the installation program
+# try_run INSTALLER_NAME [PARAMETERS_PASSED]
+# INSTALLER_NAME: installer-gtk or installer-dialog
+# PARAMETERS_PASSED: additional arguments passed to the setup script
+try_run() {
+ setup=$1
+ shift
+
+ failed=0
+ "$setup" "$@" 2>/dev/null
+ failed="$?"
+ return "$failed"
+}
+
+if [ "$auth" -eq 0 ]; then
+ GOT_ROOT=`id -u`
+ if [ "$GOT_ROOT" != "0" ]; then
+ # first we try sudo
+ try_run /usr/bin/sudo env DISPLAY=":0.0" su -c "$installer_root/bin/installer -auth"
+ status="$?"
+ if [ "$status" -eq 0 ]; then
+ exit 0
+ elif [ "$status" -eq 1 ]; then
+ try_run /usr/bin/gnomesu -u root -c "sh $installer_root/bin/installer -auth"
+ status="$?"
+ # If try_run successfully executed gnomesu, it will return gnomesu's
+ # exit code.
+ if [ "$status" -eq 0 ]; then
+ exit 0
+ elif [ "$status" -eq 1 ]; then
+ try_run /usr/bin/xsu -e -a -u root -c "sh $installer_root/bin/installer -auth"
+ status="$?"
+ # xsu returns 2 if ran and cancelled (i.e. the user 'doesn't
+ # want' to auth). it will return 0 if the command was executed
+ # correctly
+ # summing up, if we get 1, something failed
+ if [ "$status" -eq 0 ]; then
+ exit 0
+ elif [ "$status" -eq 1 ]; then
+ # xsu wasn't found, or failed to run
+ # if xsu actually ran and the auth was cancelled,
+ # $status is 2
+ echo "You need to run this installation as the super user."
+ echo "Please enter the root password."
+ try_run /bin/su root -c "export DISPLAY=$DISPLAY;sh $installer_root/bin/installer -auth"
+ status="$?"
+ if [ "$status" -eq 0 ]; then
+ # the auth command was properly executed
+ exit 0
+ else
+ exit 1
+ fi
+ elif [ "$status" -eq 3 ]; then
+ # the auth failed or was canceled
+ # we don't want to even start the setup if not root
+ echo "Please run this installation as the super user"
+ exit 1
+ fi
+ elif [ "$status" -eq 3 ]; then
+ echo "Please run this installation as the super user"
+ exit 1
+ fi
+ fi
+ fi
+fi
+
+# Try to run the installer
+try_run /usr/bin/installer-gtk $args $*
+status=$?
+if [ $status -eq 1 ]; then
+ try_run /usr/bin/installer-dialog $args $* || {
+ if [ $status -ne 2 ]; then
+ echo "The setup program seems to have failed"
+ fi
+ status=1
+ }
+fi
+exit $status
diff --git a/sys-apps/gli/files/installer-dialog b/sys-apps/gli/files/installer-dialog
new file mode 100755
index 000000000000..e6bbc7d3f433
--- /dev/null
+++ b/sys-apps/gli/files/installer-dialog
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+INSTALL_DIR=/opt/installer
+export PYTHONPATH="${INSTALL_DIR}"
+
+cd ${INSTALL_DIR}/fe/dialog
+./gli-dialog.py
+
diff --git a/sys-apps/gli/files/installer-gtk b/sys-apps/gli/files/installer-gtk
new file mode 100755
index 000000000000..8c1ce2512c8d
--- /dev/null
+++ b/sys-apps/gli/files/installer-gtk
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+INSTALL_DIR=/opt/installer
+export PYTHONPATH="${INSTALL_DIR}"
+
+cd ${INSTALL_DIR}/fe/gtk
+./gtkfe.py
+
+
diff --git a/sys-apps/gli/gli-0.2.ebuild b/sys-apps/gli/gli-0.2.ebuild
new file mode 100644
index 000000000000..df9c2e79a5ca
--- /dev/null
+++ b/sys-apps/gli/gli-0.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/gli/gli-0.2.ebuild,v 1.1 2005/12/19 22:13:06 wolf31o2 Exp $
+
+inherit eutils
+
+DESCRIPTION="Gentoo Linux Installer"
+HOMEPAGE="http://www.gentoo.org/proj/en/releng/installer/"
+#SRC_URI="http://dev.gentoo.org/~agaffney/gli/snapshots/installer-${PV}.tar.bz2"
+SRC_URI="http://dev.gentoo.org/~agaffney/${PN}/releases/installer-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gtk"
+
+RDEPEND=">=dev-python/pyparted-1.6.6
+ gtk? ( >=dev-python/pygtk-2.4.0 )
+ =dev-python/pythondialog-2.7*
+ sys-fs/e2fsprogs
+ sys-fs/ntfsprogs
+ sys-fs/reiserfsprogs
+ sys-fs/dosfstools"
+
+S=${WORKDIR}/installer/src
+
+dir=/opt/installer
+Ddir=${D}/${dir}
+
+src_install() {
+ dodir ${dir}
+ exeinto ${dir}/bin
+ use !gtk && rm -rf ${S}/fe/gtk
+ cp -a ${S}/* ${Ddir}
+ doexe ${FILESDIR}/installer-dialog ${FILESDIR}/installer \
+ || die "copying dialog/installer scripts"
+ chown -R root:root ${Ddir}
+ dodir /usr/sbin
+ dodir /usr/bin
+ if use gtk; then
+ doexe ${FILESDIR}/installer-gtk || die "copying gtk script"
+ make_wrapper installer-gtk ./installer-gtk ${dir}/bin
+ fi
+ make_wrapper installer-dialog ./installer-dialog ${dir}/bin
+ make_wrapper installer ./installer ${dir}/bin
+ doicon ${FILESDIR}/gli.png
+ doicon ${FILESDIR}/gli-dialog.png
+ make_desktop_entry installer "Gentoo Linux Installer" gli.png
+ "Gentoo Linux Installer (Command Line)" gli-dialog.png
+}