From 0cd9eb394c27d51ab176b09d2042ce3749e52f62 Mon Sep 17 00:00:00 2001 From: Mateusz Sylwestrzak <401237-mattz7@users.noreply.gitlab.com> Date: Tue, 23 Jan 2024 14:31:12 +0100 Subject: [PATCH] simplify template based on google-chrome template and remove the redundant INSTALL and REMOVE scripts --- srcpkgs/chromium-widevine/INSTALL | 43 ------------------------------ srcpkgs/chromium-widevine/REMOVE | 9 ------- srcpkgs/chromium-widevine/template | 18 ++++++++----- 3 files changed, 11 insertions(+), 59 deletions(-) delete mode 100644 srcpkgs/chromium-widevine/INSTALL delete mode 100644 srcpkgs/chromium-widevine/REMOVE diff --git a/srcpkgs/chromium-widevine/INSTALL b/srcpkgs/chromium-widevine/INSTALL deleted file mode 100644 index f81bb6aeb9dd96..00000000000000 --- a/srcpkgs/chromium-widevine/INSTALL +++ /dev/null @@ -1,43 +0,0 @@ -# INSTALL - -checksum=b429124b27f9b5ff3a63229823af0d4200020698eb58b75027897ba5b5e327eb -_baseUrl="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable" -_filename="google-chrome-stable_${VERSION%_*}-1_amd64.deb" -DISTFILE="${_baseUrl}/${_filename}" -BUILD_DIR="$(mktemp -d "${TMPDIR:-/tmp}/$PKGNAME.XXXXXX")" - -case "$ACTION" in -post) - # Actions to execute before the package files are unpacked. - mkdir -p "${BUILD_DIR}" - xbps-uhelper fetch "${DISTFILE}>${BUILD_DIR}/${PKGNAME}.deb" - - # Verify that the archive is as expected - if [ "$(xbps-digest "${BUILD_DIR}/${PKGNAME}.deb")" != "${checksum}" ]; then - echo "broken file: $_filename" - exit 1 - fi - - # Attempt to unpack the archive - ( - cd "${BUILD_DIR}" && \ - ar x "${PKGNAME}.deb" && \ - tar xf data.tar.xz --wildcards './opt/google/chrome/WidevineCdm/' - ) || exit 1 - - # Remove previous components - mkdir -p usr/lib/chromium - rm -rf usr/lib/chromium/WidevineCdm - rm -f usr/lib/chromium-dev/WidevineCdm usr/lib/chromium/libwidevinecdm.so - - # Install new components - mv "${BUILD_DIR}/opt/google/chrome/WidevineCdm" usr/lib/chromium - ln -Ts WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so usr/lib/chromium/libwidevinecdm.so - - mkdir -p usr/lib/chromium-dev - ln -Ts ../chromium/WidevineCdm usr/lib/chromium-dev/WidevineCdm - - # Cleanup - rm -r "${BUILD_DIR}" - ;; -esac diff --git a/srcpkgs/chromium-widevine/REMOVE b/srcpkgs/chromium-widevine/REMOVE deleted file mode 100644 index 8a10ac08e86547..00000000000000 --- a/srcpkgs/chromium-widevine/REMOVE +++ /dev/null @@ -1,9 +0,0 @@ -case "$ACTION" in -pre) - rm -rf usr/lib/chromium/WidevineCdm - rm -f usr/lib/chromium-dev/WidevineCdm usr/lib/chromium/libwidevinecdm.so - - rmdir usr/lib/chromium || true - rmdir usr/lib/chromium-dev || true - ;; -esac diff --git a/srcpkgs/chromium-widevine/template b/srcpkgs/chromium-widevine/template index 1c7dda6e4f4fb2..d747de664b82a8 100644 --- a/srcpkgs/chromium-widevine/template +++ b/srcpkgs/chromium-widevine/template @@ -1,18 +1,22 @@ -# Template file for 'chromium-widevine' -# -# Keep in sync with 'chromium'! +# Template file for 'pkgname=chromium-widevine' pkgname=chromium-widevine -version=116.0.5845.96 +version=120.0.6099.129 revision=1 +_channel=stable archs="x86_64" -create_wrksrc=yes depends="chromium binutils xz" short_desc="Browser plugin designed for the viewing of premium video content" maintainer="Orphaned " license="custom:chrome" -homepage="https://www.google.com/chrome" +homepage="https://www.google.com/chrome/" +distfiles="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-${_channel}_${version}-1_amd64.deb" +checksum=d050758136ec8ea151cb4a1c134c39002b43f64489e40327c60faa071a82ba57 repository=nonfree +restricted=yes +nostrip=yes do_install() { - vlicense ${FILESDIR}/LICENSE + vmkdir /usr/lib/chromium + vcopy opt/google/chrome/WidevineCdm/ /usr/lib/chromium + vlicense "${FILESDIR}"/LICENSE }