/[gentoo-x86]/www-plugins/chrome-binary-plugins/chrome-binary-plugins-45.0.2454.26_beta1.ebuild
Gentoo

Contents of /www-plugins/chrome-binary-plugins/chrome-binary-plugins-45.0.2454.26_beta1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Aug 7 20:46:39 2015 UTC (3 years, 1 month ago) by floppym
Branch: MAIN
CVS Tags: HEAD
Automated update.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-plugins/chrome-binary-plugins/chrome-binary-plugins-45.0.2454.15_beta1.ebuild,v 1.1 2015/07/28 01:44:21 floppym Exp $
4
5 EAPI=5
6
7 inherit multilib unpacker
8
9 DESCRIPTION="Binary plugins from Google Chrome for use in Chromium"
10 HOMEPAGE="http://www.google.com/chrome"
11
12 case ${PV} in
13 *_alpha*|9999*)
14 SLOT="unstable"
15 CHROMEDIR="opt/google/chrome-${SLOT}"
16 MY_PV=${PV/_alpha/-}
17 ;;
18 *_beta*)
19 SLOT="beta"
20 CHROMEDIR="opt/google/chrome-${SLOT}"
21 MY_PV=${PV/_beta/-}
22 ;;
23 *_p*)
24 SLOT="stable"
25 CHROMEDIR="opt/google/chrome"
26 MY_PV=${PV/_p/-}
27 ;;
28 *)
29 die "Invalid value for \${PV}: ${PV}"
30 ;;
31 esac
32
33 MY_PN="google-chrome-${SLOT}"
34 MY_P="${MY_PN}_${MY_PV}"
35
36 if [[ ${PV} != 9999* ]]; then
37 SRC_URI="
38 amd64? (
39 https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_amd64.deb
40 )
41 x86? (
42 https://dl.google.com/linux/chrome/deb/pool/main/g/${MY_PN}/${MY_P}_i386.deb
43 )
44 "
45 KEYWORDS="~amd64 ~x86"
46 fi
47
48 LICENSE="google-chrome"
49 IUSE="+flash +widevine"
50 RESTRICT="bindist mirror strip"
51
52 for x in 0 beta stable unstable; do
53 if [[ ${SLOT} != ${x} ]]; then
54 RDEPEND+=" !${CATEGORY}/${PN}:${x}"
55 fi
56 done
57
58 S="${WORKDIR}/${CHROMEDIR}"
59 QA_PREBUILT="*"
60
61 pkg_nofetch() {
62 eerror "Please wait 24 hours and sync your portage tree before reporting fetch failures."
63 }
64
65 if [[ ${PV} == 9999* ]]; then
66 src_unpack() {
67 local base="https://dl.google.com/linux/direct"
68 local debarch=${ARCH/x86/i386}
69 wget -O google-chrome.deb "${base}/google-chrome-${SLOT}_current_${debarch}.deb" || die
70 unpack_deb ./google-chrome.deb
71 }
72 fi
73
74 src_install() {
75 local version flapper
76
77 insinto /usr/$(get_libdir)/chromium-browser/
78
79 if use widevine; then
80 doins libwidevinecdm.so
81 strings ./chrome | grep -C 1 " (version:" | tail -1 > widevine.version
82 doins widevine.version
83 einfo "Please note that if you intend to use this with www-clients/chromium,"
84 einfo "you'll need to enable the widevine USE flag there as well, in order to"
85 einfo "utilize the widevine USE flag that's been used here."
86 fi
87
88 if use flash; then
89 doins -r PepperFlash
90
91 # Since this is a live ebuild, we're forced to, unfortuantely,
92 # dynamically construct the command line args for Chromium.
93 version=$(sed -n 's/.*"version": "\(.*\)",.*/\1/p' PepperFlash/manifest.json)
94 flapper="${ROOT}usr/$(get_libdir)/chromium-browser/PepperFlash/libpepflashplayer.so"
95 echo -n "CHROMIUM_FLAGS=\"\${CHROMIUM_FLAGS} " > pepper-flash
96 echo -n "--ppapi-flash-path=$flapper " >> pepper-flash
97 echo "--ppapi-flash-version=$version\"" >> pepper-flash
98
99 insinto /etc/chromium/
100 doins pepper-flash
101 fi
102 }

  ViewVC Help
Powered by ViewVC 1.1.20