diff options
author | Eric Hameleers <alien@slackware.com> | 2017-07-10 20:55:22 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2017-07-10 20:55:22 +0000 |
commit | df56f027480a9a33a56aac1a0d22445aafe749c2 (patch) | |
tree | 8c91346a32718fe37bfb905c28777526b3d81380 /chromium-widevine-plugin/build/chromium-widevine-plugin.SlackBuild | |
parent | 2181ee589d5e8eddce91ab778a41630d161573e2 (diff) | |
download | asb-df56f027480a9a33a56aac1a0d22445aafe749c2.tar.gz asb-df56f027480a9a33a56aac1a0d22445aafe749c2.tar.xz |
chromium-widevine-plugin: updated to widevine 1.4.8.1004
Diffstat (limited to 'chromium-widevine-plugin/build/chromium-widevine-plugin.SlackBuild')
-rwxr-xr-x | chromium-widevine-plugin/build/chromium-widevine-plugin.SlackBuild | 78 |
1 files changed, 35 insertions, 43 deletions
diff --git a/chromium-widevine-plugin/build/chromium-widevine-plugin.SlackBuild b/chromium-widevine-plugin/build/chromium-widevine-plugin.SlackBuild index 7f718437..0c220813 100755 --- a/chromium-widevine-plugin/build/chromium-widevine-plugin.SlackBuild +++ b/chromium-widevine-plugin/build/chromium-widevine-plugin.SlackBuild @@ -158,8 +158,12 @@ # 09/may/2017 by Eric Hameleers <alien@slackware.com> # * Update (only 64bit). # 59.0.3071.86-1: -# 07/juy/2017 by Eric Hameleers <alien@slackware.com> +# 07/jun/2017 by Eric Hameleers <alien@slackware.com> # * Update (only 64bit). +# 1.4.8.1004-1: +# 10/jul/2017 by Eric Hameleers <alien@slackware.com> +# * Start using the widevine version number now that we use +# a direct download, no longer extracting from Chrome binaries. # # Run 'sh chromium-widevine-plugin.SlackBuild' to build a Slackware package. # The package (.txz) and .txt file as well as build logs are created in /tmp . @@ -171,23 +175,16 @@ # extracted library file. PRGNAM=chromium-widevine-plugin +WPREF=${WPREF:-"1.4.8"} +VERSION=${VERSION:-"1004"} +PKGVER="${WPREF}.${VERSION}" 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 determined in the -# chromium package. Check "chrome://plugins" -VERSION=${VERSION:-"59.0.3071.86"} -RPMCHAN=${RPMCHAN:-"stable"} -RPMSUB=${RPMSUB:-"-1"} - -# What is the last version of Chrome to contain a 32bit plugin? -VERSION32="48.0.2564.116" - # 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} @@ -199,16 +196,11 @@ 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 - # Hardcode the version to the last 32bit available: - echo "** Pinning Chrome version to the most recent 32bit: '$VERSION32'" - VERSION="$VERSION32" ;; *) echo "Unsupported architecture '$ARCH'" @@ -216,15 +208,20 @@ case "$MARCH" in ;; esac +# 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 + +SOURCE[0]="$SRCDIR/current.txt" +SRCURL[0]="https://redirector.gvt1.com/edgedl/widevine-cdm/current.txt" + if [ "$ARCH" = "x86_64" ]; then - 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/${VERSION}-linux-x64.zip" + SRCURL[1]="https://redirector.gvt1.com/edgedl/widevine-cdm/${VERSION}-linux-x64.zip" else - SOURCE[0]="$SRCDIR/google-chrome-${RPMCHAN}_${VERSION32}${RPMSUB}_${ARCH}.deb" - SRCURL[0]="http://mirror.retrosnub.co.uk/apt/google/pool/main/g/google-chrome-stable/google-chrome-${RPMCHAN}_${VERSION32}${RPMSUB}_${ARCH}.deb" + SOURCE[1]="$SRCDIR/${VERSION}-linux-ia32.zip" + SRCURL[1]="https://redirector.gvt1.com/edgedl/widevine-cdm/${VERSION}-linux-ia32.zip" fi -SOURCE[1]="$SRCDIR/license.html" -SRCURL[1]="http://www.google.com/chrome/intl/en/eula_text.html" ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -259,7 +256,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 @@ -274,6 +271,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: $PKGVER" exit 0 fi @@ -281,28 +282,19 @@ fi cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." -if file ${SOURCE[0]} | grep -q RPM ; then - rpm2cpio ${SOURCE[0]} | cpio -dimv -R root:root \ - ./opt/google/chrome/libwidevinecdm.so -else - ar p ${SOURCE[0]} data.tar.xz | tar xJv ./opt/google/chrome/libwidevinecdm.so -fi +unzip ${SOURCE[1]} chmod -R u+w,go+r-w,a+X-s . -echo "++" -echo "Packaging $PRGNAM for chromium $VERSION" -echo "++" - # Move the extracted files over to the package location: install -d $PKG/usr/lib${LIBDIRSUFFIX}/chromium -install -m0755 opt/google/chrome/libwidevine* \ +install -m0755 libwidevine* \ $PKG/usr/lib${LIBDIRSUFFIX}/chromium/ # Add documentation: -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVER +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$PKGVER || true +cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$PKGVER/$PRGNAM.SlackBuild +chown -R root:root $PKG/usr/doc/$PRGNAM-$PKGVER find $PKG/usr/doc -type f -exec chmod 644 {} \; # Add a package description: @@ -314,12 +306,12 @@ cat $SRCDIR/doinst.sh | sed -e "s/@PRGNAM@/${PRGNAM}/g" \ # Build the package: cd $PKG -makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log +makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PKGVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT -md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5 +md5sum ${PRGNAM}-${PKGVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${PKGVER}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5 cd - -cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt -cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep +cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${PKGVER}-${ARCH}-${BUILD}${TAG}.txt +cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${PKGVER}-${ARCH}-${BUILD}${TAG}.dep # Restore the original umask: umask ${_UMASK_} |