From 5f2e62d84585bc0205ba48252e557bd2de102520 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 1 Nov 2017 17:09:03 +0000 Subject: chromium-dev-widevine-plugin: updated to 1.4.8.1008 using a download URL which also offers 32bit libraries (for Firefox0 --- .../build/chromium-dev-widevine-plugin.SlackBuild | 56 ++++++++++++---------- 1 file changed, 30 insertions(+), 26 deletions(-) (limited to 'chromium-dev-widevine-plugin') diff --git a/chromium-dev-widevine-plugin/build/chromium-dev-widevine-plugin.SlackBuild b/chromium-dev-widevine-plugin/build/chromium-dev-widevine-plugin.SlackBuild index 96a111bd..3eed4566 100755 --- a/chromium-dev-widevine-plugin/build/chromium-dev-widevine-plugin.SlackBuild +++ b/chromium-dev-widevine-plugin/build/chromium-dev-widevine-plugin.SlackBuild @@ -52,7 +52,10 @@ # 49.0.2593.0-1: # 27/dec/2015 by Eric Hameleers # * Update for the new 49 release. -# +# 1.4.8.1008-1: +# 01/nov/2017 by Eric Hameleers +# * Start using the widevine version number now that we use +# a direct download, no longer extracting from Chrome binaries. # # Run 'sh chromium-dev-widevine-plugin.SlackBuild' to build a Slackware package. # The package (.txz) and .txt file as well as build logs are created in /tmp . @@ -63,21 +66,15 @@ SRCNAM="chromium" SRCEXT="-dev" # "" is stable, "-dev" is development PRGNAM="${SRCNAM}${SRCEXT}-widevine-plugin" + +VERSION=${VERSION:-"1.4.8.1008"} BUILD=${BUILD:-1} TAG=${TAG:-alien} -# What is the Chrome version we extract this from? -# Version of the plugin as reported by the browser is different by the way; -# check "chrome://plugins" -VERSION=${VERSION:-"49.0.2593.0"} - -[ "x$SRCEXT" = "x-dev" ] && RPMCHAN=${RPMCHAN:-"unstable"} || RPMCHAN=${RPMCHAN:-"stable"} -RPMSUB=${RPMSUB:-"-1"} - # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) -DOCS="$SRCDIR/license.html" +DOCS="manifest.json LICENSE.txt" # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/tmp/build} @@ -89,12 +86,10 @@ MARCH=${ARCH:-$( uname -m )} case "$MARCH" in x86_64) LIBDIRSUFFIX="64" - ARCHBITS="64" export ARCH=x86_64 ;; i?86) LIBDIRSUFFIX="" - ARCHBITS="32" export ARCH=i386 ;; *) @@ -103,11 +98,22 @@ case "$MARCH" in ;; esac -SOURCE[0]="$SRCDIR/google-chrome-$RPMCHAN-$VERSION$RPMSUB.$ARCH.rpm" -SRCURL[0]="https://dl.google.com/linux/chrome/rpm/stable/$ARCH/google-chrome-$RPMCHAN-$VERSION$RPMSUB.$ARCH.rpm" - -SOURCE[1]="$SRCDIR/license.html" -SRCURL[1]="http://www.google.com/chrome/intl/en/eula_text.html" +# Each zip contains a CDM binary, manifest.json file, and LICENSE.txt file. +# Current version can be read online: +# https://redirector.gvt1.com/edgedl/widevine-cdm/current.txt +# This is where Mozilla gets it: +# https://github.com/mozilla/gecko-dev/blob/release/toolkit/content/gmp-sources/widevinecdm.json + +SOURCE[0]="$SRCDIR/current.txt" +SRCURL[0]="https://redirector.gvt1.com/edgedl/widevine-cdm/current.txt" + +if [ "$ARCH" = "x86_64" ]; then + SOURCE[1]="$SRCDIR/${VERSION}-linux-x64.zip" + SRCURL[1]="https://redirector.gvt1.com/edgedl/widevine-cdm/${VERSION}-linux-x64.zip" +else + SOURCE[1]="$SRCDIR/${VERSION}-linux-ia32.zip" + SRCURL[1]="https://redirector.gvt1.com/edgedl/widevine-cdm/${VERSION}-linux-ia32.zip" +fi ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -142,7 +148,7 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do if [ -f ${SOURCE[$i]} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL[$i]}" == "x" ]; then echo "Will download file to $(dirname $SOURCE[$i])" - wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true + curl -L -s -k -o "${SOURCE[$i]}" "${SRCURL[$i]}" || true if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then echo "Fail to download '$(basename ${SOURCE[$i]})'. Aborting the build." mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL @@ -157,6 +163,10 @@ done if [ "$P1" == "--download" ]; then echo "Download complete." + echo "Check that the following match your expectations:" + echo ">> Current online version; $(curl -L -s -k -o - ${SRCURL[0]})" + echo ">> Widevine version as reported by downloaded files: $(unzip -p ${SOURCE[1]} manifest.json |grep '\"version\":' |cut -d\" -f4)" + echo ">> Widevine package version: $VERSION" exit 0 fi @@ -164,18 +174,12 @@ fi cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." -[ "x$SRCEXT" = "x-dev" ] && CHROMEDIR="chrome-unstable" || CHROMEDIR="chrome" -rpm2cpio ${SOURCE[0]} | cpio -dimv -R root:root \ - ./opt/google/${CHROMEDIR}/libwidevinecdm.so +unzip ${SOURCE[1]} chmod -R u+w,go+r-w,a+X-s . -echo "++" -echo "Packaging $PRGNAM for $SRCNAM$SRCEXT $VERSION" -echo "++" - # Move the extracted files over to the package location: install -d $PKG/usr/lib${LIBDIRSUFFIX}/$SRCNAM$SRCEXT -install -m0755 opt/google/${CHROMEDIR}/libwidevine* \ +install -m0755 libwidevine* \ $PKG/usr/lib${LIBDIRSUFFIX}/$SRCNAM$SRCEXT/ # Add documentation: -- cgit v1.2.3-65-gdbad