summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-22 20:19:45 +0000
committerMike Frysinger <vapier@gentoo.org>2011-11-22 20:19:45 +0000
commit6bd277c665a3c115a6d3aea9fcb0c490507a3880 (patch)
tree0db1b7a4cfef0437bbf60d970645b3ee280f43c4 /net-misc/gsutil
parentfix up documentation (diff)
downloadgentoo-2-6bd277c665a3c115a6d3aea9fcb0c490507a3880.tar.gz
gentoo-2-6bd277c665a3c115a6d3aea9fcb0c490507a3880.tar.bz2
gentoo-2-6bd277c665a3c115a6d3aea9fcb0c490507a3880.zip
Initial import by me.
(Portage version: 2.2.0_alpha75/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/gsutil')
-rw-r--r--net-misc/gsutil/ChangeLog9
-rw-r--r--net-misc/gsutil/files/gsutil-system-boto.patch23
-rw-r--r--net-misc/gsutil/gsutil-2011.21.11.ebuild59
-rw-r--r--net-misc/gsutil/metadata.xml7
4 files changed, 98 insertions, 0 deletions
diff --git a/net-misc/gsutil/ChangeLog b/net-misc/gsutil/ChangeLog
new file mode 100644
index 000000000000..37bf04a40f55
--- /dev/null
+++ b/net-misc/gsutil/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for net-misc/gsutil
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/gsutil/ChangeLog,v 1.1 2011/11/22 20:19:45 vapier Exp $
+
+*gsutil-2011.21.11 (22 Nov 2011)
+
+ 22 Nov 2011; Mike Frysinger <vapier@gentoo.org> +gsutil-2011.21.11.ebuild,
+ +files/gsutil-system-boto.patch, +metadata.xml:
+ Initial import by me.
diff --git a/net-misc/gsutil/files/gsutil-system-boto.patch b/net-misc/gsutil/files/gsutil-system-boto.patch
new file mode 100644
index 000000000000..88cb49c0f0ab
--- /dev/null
+++ b/net-misc/gsutil/files/gsutil-system-boto.patch
@@ -0,0 +1,23 @@
+http://code.google.com/p/gsutil/issues/detail?id=71
+
+--- a/gsutil
++++ b/gsutil
+@@ -41,13 +41,15 @@
+ _OutputAndExit('Unable to determine where gsutil is installed. Sorry, '
+ 'cannot run correctly without this.\n')
+ boto_lib_dir = os.path.join(gsutil_bin_dir, 'boto')
+-if not os.path.isdir(boto_lib_dir):
++if os.path.isdir(boto_lib_dir):
++ sys.path.insert(0, boto_lib_dir)
++try:
++ import boto
++except:
+ _OutputAndExit('There is no boto library under the gsutil install directory '
+ '(%s).\nThe gsutil command cannot work properly when installed '
+ 'this way.\nPlease re-install gsutil per the installation '
+ 'instructions.' % gsutil_bin_dir)
+-sys.path.insert(0, boto_lib_dir)
+-import boto
+ from boto.exception import BotoClientError
+ from boto.exception import InvalidAclError
+ from boto.exception import InvalidUriError
diff --git a/net-misc/gsutil/gsutil-2011.21.11.ebuild b/net-misc/gsutil/gsutil-2011.21.11.ebuild
new file mode 100644
index 000000000000..f873a468bee7
--- /dev/null
+++ b/net-misc/gsutil/gsutil-2011.21.11.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/gsutil/gsutil-2011.21.11.ebuild,v 1.1 2011/11/22 20:19:45 vapier Exp $
+
+EAPI="3"
+
+inherit versionator eutils python multilib
+
+MY_P=$(version_format_string '${PN}_$3-$2-$1')
+
+DESCRIPTION="command line tool for interacting with cloud storage services"
+HOMEPAGE="http://code.google.com/p/gsutil/"
+SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ dev-python/boto"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ # use system boto
+ rm -rf boto
+ epatch "${FILESDIR}"/${PN}-system-boto.patch
+
+ # use the custom internal path to avoid polluting python system
+ sed -i \
+ -e "/^gsutil_bin_dir =/s:=.*:= '/usr/$(get_libdir)/${PN}';sys.path.insert(0, gsutil_bin_dir);:" \
+ gsutil || die
+
+ # trim some cruft
+ find gslib third_party -name README -delete
+}
+
+src_install() {
+ dobin gsutil || die
+
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r gslib oauth2_plugin third_party || die
+
+ dodoc README
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r cloud{auth,reader}
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/$(get_libdir)/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/$(get_libdir)/${PN}
+}
diff --git a/net-misc/gsutil/metadata.xml b/net-misc/gsutil/metadata.xml
new file mode 100644
index 000000000000..7123fa8f9ece
--- /dev/null
+++ b/net-misc/gsutil/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+</maintainer>
+</pkgmetadata>