From 7473da6ec1575842f0e7199316fb5e55d7992744 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 8 Dec 2009 21:37:29 +0100 Subject: [PATCH] Add www-client/google-chrome-bin. --- www-client/google-chrome-bin/Manifest | 3 + .../google-chrome-bin-4.0.223.11.ebuild | 118 +++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 www-client/google-chrome-bin/Manifest create mode 100644 www-client/google-chrome-bin/google-chrome-bin-4.0.223.11.ebuild diff --git a/www-client/google-chrome-bin/Manifest b/www-client/google-chrome-bin/Manifest new file mode 100644 index 0000000..27b19d0 --- /dev/null +++ b/www-client/google-chrome-bin/Manifest @@ -0,0 +1,3 @@ +DIST google-chrome-unstable_4.0.223.11-r29900_i386.deb 11948542 RMD160 e19cf858ee37cf2053cffdfa39777f35ae4ad430 SHA1 215a2ecb7f2e926d21e97c930587d81fa5c268ec SHA256 10ac2c7670dd3a02b39a97a9390531ade64d2a2338d8322338b13ed089c64b7a +DIST google-chrome-unstable_4.0.223.11-r29916_amd64.deb 12698488 RMD160 40c33cd7aeb60031a1aaca0785e05141ea196a20 SHA1 d13eb95a1c97ea310b56b5b60f96b6dfb437b49d SHA256 67dacbf64aeb8edf4a3d1365ecdede333ef423d284162078ddaf7d9e8a534f00 +EBUILD google-chrome-bin-4.0.223.11.ebuild 3286 RMD160 4ad16b9e616ad8b16900124908d64ca6c709bdc0 SHA1 72f21b6acd2934a32a561919e1f00ae162bacd49 SHA256 fa8357e1921897e07c5bf51b635de9319ffa99db7f533bb0400c4fc641f73631 diff --git a/www-client/google-chrome-bin/google-chrome-bin-4.0.223.11.ebuild b/www-client/google-chrome-bin/google-chrome-bin-4.0.223.11.ebuild new file mode 100644 index 0000000..bfc4539 --- /dev/null +++ b/www-client/google-chrome-bin/google-chrome-bin-4.0.223.11.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils toolchain-funcs versionator + +MY_PN="${PN%-bin}-unstable" +MY_P="${MY_PN}_${PV/_p/-r}" +SRC_BASE="http://dl.google.com/linux/deb/pool/main/${MY_PN:0:1}/${MY_PN}/" +DESCRIPTION="A browser that combines a minimal design with sophisticated technology" +HOMEPAGE="http://www.google.com/chrome" +SRC_URI=" + x86? ( ${SRC_BASE}${MY_P}-r29900_i386.deb ) + amd64? ( ${SRC_BASE}${MY_P}-r29916_amd64.deb )" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="|| ( app-arch/xz-utils app-arch/lzma-utils )" +RDEPEND=" + || ( media-fonts/liberation-fonts media-fonts/corefonts ) + dev-libs/atk + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + gnome-base/gconf + media-libs/fontconfig + media-libs/freetype + >=sys-devel/gcc-4.2[-nocxx] + x11-libs/cairo + x11-libs/gtk+:2 + x11-libs/pango + x11-misc/xdg-utils" + +RESTRICT="mirror" + +QA_EXECSTACK="opt/google/chrome/chrome" +QA_PRESTRIPPED=" + opt/google/chrome/chrome + opt/google/chrome/chrome-sandbox + opt/google/chrome/libavutil.so.50 + opt/google/chrome/libavformat.so.52 + opt/google/chrome/libavcodec.so.52" +QA_TEXTRELS="opt/google/chrome/libavcodec.so.52" + +pkg_nofetch() { + elog "Please download" + for i in ${A}; do + [[ ${i} = ${MY_PN}_* ]] && elog "${SRC_BASE}${i}" + done + elog "and save to ${DISTDIR}" +} + +src_unpack() { + for i in ${A}; do + ar x "${DISTDIR}"/${i} + if [[ ${i} = *.deb ]]; then + if [[ -e "${WORKDIR}"/data.tar.lzma ]]; then + mv "${WORKDIR}"/data.tar.lzma "${WORKDIR}"/${i%%_*}.tar.lzma + elif [[ -e "${WORKDIR}"/data.tar.gz ]]; then + mv "${WORKDIR}"/data.tar.gz "${WORKDIR}"/${i%%_*}.tar.gz + else + die "Can't find data from ${i}" + fi + fi + done +} + +src_install() { + declare CHROME_HOME="/opt/google/chrome" + + cd "${D}" + lzma -cd "${WORKDIR}"/${MY_PN}.tar.lzma | tar xvf - || die "Couldn't extract" + rm -r "${D}"/{etc,usr/bin/google-chrome} + + sed -i "s|Exec=${CHROME_HOME//\//\\/}\/|Exec=|g" "${D}"${CHROME_HOME}/${PN%-bin}.desktop + domenu "${D}"${CHROME_HOME}/${PN%-bin}.desktop + rm "${D}"${CHROME_HOME}/${PN%-bin}.desktop + + for i in nss/lib{nss{,util},smime,ssl}3.so.1d \ + nspr/lib{pl{ds,c},nspr}4.so.0d ; do + dosym ../../../../usr/$(get_libdir)/${i%.*} \ + ${CHROME_HOME}/${i##*/} + done + + cat <"${D}"/usr/bin/google-chrome +#!/bin/sh +exec ${CHROME_HOME}/google-chrome \ + --enable-greasemonkey \ + --enable-user-scripts \ + --enable-extensions "\$@" +EOF + fperms 0755 /usr/bin/google-chrome + + dosym /usr/$(get_libdir)/nsbrowser/plugins ${CHROME_HOME}/plugins +} + +pkg_postinst() { + elog "This Chrome binary package is from the developer preview channel. It is" + elog "not guaranteed to be stable or even usable." + elog "" + elog "Chrome's auto-update mechanism is only available for Debian-based" + elog "distributions, and has been disabled." + elog "" + elog "Please see" + elog " http://dev.chromium.org/for-testers/bug-reporting-guidlines-for-the-mac-linux-builds" + elog "before filing any bugs." + if ! version_is_at_least 4.2 "$(gcc-version)" || [[ -z $(tc-getCXX) ]]; then + einfo "" + ewarn "This Chrome binary package depends on C++ libraries from >=sys-devel/gcc-4.2," + ewarn "which do not appear to be available. Google Chrome may not run." + ebeep + fi +} -- 2.7.4