diff --git a/srcpkgs/chromium-widevine/INSTALL b/srcpkgs/chromium-widevine/INSTALL index 02c6c79b20..d967f40519 100644 --- a/srcpkgs/chromium-widevine/INSTALL +++ b/srcpkgs/chromium-widevine/INSTALL @@ -1,34 +1,29 @@ -# -# This script will install the actual plugin, advise the user to read the -# license for Chrome and to re-login to have environment variables set -# properly. -# - -BUILD_DIR="./var/tmp/${PKGNAME}.build" - -case "${ACTION}" in +# INSTALL +DISTFILE="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" +BUILD_DIR="./var/tmp/$PKGNAME.build" +case "$ACTION" in +pre) + # Actions to execute before the package files are unpacked. + mkdir -p $BUILD_DIR + xbps-uhelper fetch "${DISTFILE}>$BUILD_DIR/$PKGNAME.deb" + ;; post) - . usr/lib/${PKGNAME}/${PKGNAME}-vars.sh + # Things that have to happen no matter what + ar x "$BUILD_DIR/$PKGNAME.deb" + tar xf data.tar.xz + mv $BUILD_DIR/opt/google/chrome/libwidevinecdm.so usr/lib/${PKGNAME} + mv $BUILD_DIR/opt/google/chrome/libwidevinecdmadapter.so usr/lib/${PKGNAME} - mkdir -p "$BUILD_DIR" - ( - cd "$BUILD_DIR" - xbps-uhelper fetch "${CHROME_URL}>$PKGNAME.deb" - echo "$CHROME_CHECKSUM $PKGNAME.deb" > chksum - sha256sum -c chksum || exit 1 - - ar x "$PKGNAME.deb" - tar xf data.tar.xz - ) || { - echo Error while extracting; - rm -r $BUILD_DIR; - exit 1; - } - mv $BUILD_DIR/opt/google/chrome/libwidevinecdm.so usr/lib/${PKGNAME} - mv $BUILD_DIR/opt/google/chrome/libwidevinecdmadapter.so usr/lib/${PKGNAME} - ln -s /usr/lib/${PKGNAME}/libwidevinecdm.so usr/lib/chromium - ln -s /usr/lib/${PKGNAME}/libwidevinecdmadapter.so usr/lib/chromium - rm -r $BUILD_DIR + if [ "$UPDATE" = "yes" ]; then + # actions to execute if package is being updated. + ... + else + # actions to execute if package is being installed. + ln -s usr/lib/$PKGNAME/libwidevinecdm.so usr/lib/chromium + ln -s usr/lib/$PKGNAME/libwidevinecdmadapter.so usr/lib/chromium + fi + rm -r $BUILD_DIR + chmod 775 usr/lib/$PKGNAME/libwidevinecdm.so + chmod 775 usr/lib/$PKGNAME/libwidevinecdmadapter.so ;; esac - diff --git a/srcpkgs/chromium-widevine/files/chromium-widevine-vars.sh.in b/srcpkgs/chromium-widevine/files/chromium-widevine-vars.sh.in deleted file mode 100644 index 1e2df84dbc..0000000000 --- a/srcpkgs/chromium-widevine/files/chromium-widevine-vars.sh.in +++ /dev/null @@ -1 +0,0 @@ -export CHROME_URL="%CHROME_URL%" CHROME_CHECKSUM="%CHROME_CHECKSUM%" diff --git a/srcpkgs/chromium-widevine/template b/srcpkgs/chromium-widevine/template index cb1c58b8f9..3e9806e4d1 100644 --- a/srcpkgs/chromium-widevine/template +++ b/srcpkgs/chromium-widevine/template @@ -1,43 +1,24 @@ # Template file for 'chromium-widevine' -_chromeVersion="48.0.2564.116" -_chromeRevision="1" +_chromeVersion="current" _channel="stable" -_baseUrl="http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable" pkgname=chromium-widevine -version=${_chromeVersion} -revision=1 +version=49.0.2623.110 +revision=2 short_desc="A browser plugin designed for the viewing of premium video content" maintainer="Benjamin Hoffmeyer " homepage="http://www.google.com/chrome" license="chrome" -only_for_archs="i686 x86_64" +only_for_archs="x86_64" depends="chromium binutils xz" repository=nonfree create_wrksrc=yes - -case "${XBPS_TARGET_MACHINE}" in -x86_64) - _filename=google-chrome-${_channel}_${_chromeVersion}-${_chromeRevision}_amd64.deb - _chromeChecksum="201e3b32c9c3d647f9bc071b5fe9faa45e0f2ab52127380052f2338c5465d70c" - ;; -i686) - _filename=google-chrome-${_channel}_${_chromeVersion}-${_chromeRevision}_i386.deb - _chromeChecksum="7401ad3698a28bf2b45e350fd2b941c44cb51dbb3f87b0e7dd1a2da72c42f594" - ;; -esac -_chromeUrl="${_baseUrl}/${_filename}" -distfiles="${_chromeUrl}" -checksum="$_chromeChecksum" +distfiles="https://dl.google.com/linux/direct/google-chrome-${_channel}_${_chromeVersion}_amd64.deb" +checksum="232842e316e17c254de430562ebc057f057a96546e93ed146aa17a7853144db6" do_extract() { : } do_install() { - sed \ - -e "s|%CHROME_URL%|${_chromeUrl}|" \ - -e "s|%CHROME_CHECKSUM%|${_chromeChecksum}|" \ - ${FILESDIR}/chromium-widevine-vars.sh.in > chromium-widevine-vars.sh - vinstall chromium-widevine-vars.sh 644 usr/lib/$pkgname vlicense ${FILESDIR}/LICENSE }