--- /dev/null
+# 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.
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX gsutil-system-boto.patch 890 RMD160 907a34160d8895d6bb5ac4d2ba8968426ab7eb7a SHA1 29f4f1f523655616f975edb483c85e5f74a35039 SHA256 c1451a3e04fe0039001e8db4b9fb6c9bdae2cfe1eec4f2020950165c75c6ccb6
+DIST gsutil_11-21-2011.tar.gz 492520 RMD160 3a549598d873004a6492bc3b50c6d1630955d812 SHA1 226e653663eac7233721e0e6c2a02ef492cf826e SHA256 3db6dfb5493e52de8157a57c43ac23db8f97fd0399cf37a088953df3a5b33529
+EBUILD gsutil-2011.21.11.ebuild 1363 RMD160 6e84ae653292c2d6cd736718831c92c8273e3d5d SHA1 429acf06cd4212ee036e7d3e8af72ff79bedc870 SHA256 138a1a1fdaf2d26cd5cd1992eaa16c8e858402079f9280a29969abcf13179eb9
+MISC ChangeLog 388 RMD160 a071fe300a16bb3de8a84d0b54dc475f39ed90af SHA1 8e313d90a6af3117a21ccc2938a42cfc77d509c3 SHA256 04fee6a36e53904c629799c599a24a96dad81009c6748aac9bd1e3dcdb82a5ca
+MISC metadata.xml 200 RMD160 e618972986cf2dd6c8d0cdf2248299f3a5bd2dc9 SHA1 289d5d94a8c473ae8e9d0c671becbbfbf336c55f SHA256 eb63f2affd0b8e3f5149df2f2f964910eb2127b650919a9e7892fae011e2b22b
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iF4EAREIAAYFAk7MA+sACgkQaC/OocHi7JYJEgD9EppLDGLl2WvlUp2n/4w3+5Im
+YeOOL4UOAf+YX4SNIy4A/3CrnV8JIMHkvpxRZB3vu+VVyrhcPimvr2vGpsCfVi1/
+=lSIH
+-----END PGP SIGNATURE-----
--- /dev/null
+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
--- /dev/null
+# 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}
+}
--- /dev/null
+<?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>