You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
2.3 KiB
94 lines
2.3 KiB
11 years ago
|
# Copyright 1999-2014 Gentoo Foundation
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
10 years ago
|
# $Header: /var/cvsroot/gentoo-x86/www-plugins/chrome-binary-plugins/chrome-binary-plugins-38.0.2125.77_beta1.ebuild,v 1.1 2014/09/24 22:28:23 floppym Exp $
|
||
12 years ago
|
|
||
10 years ago
|
EAPI=5
|
||
12 years ago
|
|
||
|
inherit multilib unpacker
|
||
|
|
||
10 years ago
|
DESCRIPTION="Binary plugins from Google Chrome for use in Chromium"
|
||
12 years ago
|
HOMEPAGE="http://www.google.com/chrome"
|
||
12 years ago
|
|
||
|
case ${PV} in
|
||
10 years ago
|
*_alpha*|9999*)
|
||
12 years ago
|
SLOT="unstable"
|
||
10 years ago
|
CHROMEDIR="opt/google/chrome-${SLOT}"
|
||
11 years ago
|
MY_PV=${PV/_alpha/-}
|
||
12 years ago
|
;;
|
||
|
*_beta*)
|
||
|
SLOT="beta"
|
||
10 years ago
|
CHROMEDIR="opt/google/chrome-${SLOT}"
|
||
11 years ago
|
MY_PV=${PV/_beta/-}
|
||
12 years ago
|
;;
|
||
|
*_p*)
|
||
|
SLOT="stable"
|
||
10 years ago
|
CHROMEDIR="opt/google/chrome"
|
||
11 years ago
|
MY_PV=${PV/_p/-}
|
||
12 years ago
|
;;
|
||
|
*)
|
||
|
die "Invalid value for \${PV}: ${PV}"
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
MY_PN="google-chrome-${SLOT}"
|
||
|
MY_P="${MY_PN}_${MY_PV}"
|
||
|
|
||
10 years ago
|
if [[ ${PV} != 9999* ]]; then
|
||
12 years ago
|
SRC_URI="
|
||
|
amd64? (
|
||
10 years ago
|
https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_amd64.deb
|
||
12 years ago
|
)
|
||
|
x86? (
|
||
10 years ago
|
https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_i386.deb
|
||
12 years ago
|
)
|
||
|
"
|
||
10 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
|
fi
|
||
12 years ago
|
|
||
|
LICENSE="google-chrome"
|
||
10 years ago
|
IUSE="+flash"
|
||
12 years ago
|
RESTRICT="bindist mirror strip"
|
||
12 years ago
|
|
||
|
for x in 0 beta stable unstable; do
|
||
|
if [[ ${SLOT} != ${x} ]]; then
|
||
|
RDEPEND+=" !${CATEGORY}/${PN}:${x}"
|
||
|
fi
|
||
|
done
|
||
|
|
||
10 years ago
|
S="${WORKDIR}/${CHROMEDIR}"
|
||
12 years ago
|
QA_PREBUILT="*"
|
||
12 years ago
|
|
||
11 years ago
|
pkg_nofetch() {
|
||
|
eerror "Please wait 24 hours and sync your portage tree before reporting fetch failures."
|
||
|
}
|
||
|
|
||
10 years ago
|
if [[ ${PV} == 9999* ]]; then
|
||
|
src_unpack() {
|
||
|
local base="https://dl.google.com/linux/direct"
|
||
|
local debarch=${ARCH/x86/i386}
|
||
|
wget -O google-chrome.deb "${base}/google-chrome-${SLOT}_current_${debarch}.deb" || die
|
||
|
unpack_deb ./google-chrome.deb
|
||
|
}
|
||
|
fi
|
||
|
|
||
12 years ago
|
src_install() {
|
||
|
local version flapper
|
||
|
|
||
|
insinto /usr/$(get_libdir)/chromium-browser/
|
||
|
|
||
|
if use flash; then
|
||
|
doins -r PepperFlash
|
||
|
|
||
|
# Since this is a live ebuild, we're forced to, unfortuantely,
|
||
|
# dynamically construct the command line args for Chromium.
|
||
|
version=$(sed -n 's/.*"version": "\(.*\)",.*/\1/p' PepperFlash/manifest.json)
|
||
|
flapper="${ROOT}usr/$(get_libdir)/chromium-browser/PepperFlash/libpepflashplayer.so"
|
||
|
echo -n "CHROMIUM_FLAGS=\"\${CHROMIUM_FLAGS} " > pepper-flash
|
||
|
echo -n "--ppapi-flash-path=$flapper " >> pepper-flash
|
||
|
echo "--ppapi-flash-version=$version\"" >> pepper-flash
|
||
|
|
||
|
insinto /etc/chromium/
|
||
|
doins pepper-flash
|
||
|
fi
|
||
|
}
|