From 7836be6e4271fd1961416ce0c039c8084adc07b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samet=20C=C3=B6mert?= Date: Sat, 28 Dec 2019 00:47:10 +0300 Subject: [PATCH] Add google-chrome-unstable to srcpkgs --- srcpkgs/google-chrome-unstable/template | 49 +++++++++++++++++++++++++ srcpkgs/google-chrome-unstable/update | 7 ++++ 2 files changed, 56 insertions(+) create mode 100644 srcpkgs/google-chrome-unstable/template create mode 100644 srcpkgs/google-chrome-unstable/update diff --git a/srcpkgs/google-chrome-unstable/template b/srcpkgs/google-chrome-unstable/template new file mode 100644 index 00000000000000..401a19417e52fa --- /dev/null +++ b/srcpkgs/google-chrome-unstable/template @@ -0,0 +1,49 @@ +# Template file for 'google-chrome-unstable' +_chromeVersion=81.0.4000.3 +_chromeRevision=1 +_channel=unstable + +pkgname=google-chrome-unstable +version="${_chromeVersion}.${_chromeRevision}" +revision=1 +maintainer="Samet Comert " +homepage="https://www.google.com/chrome/dev" +license="chrome" +short_desc="Attempt at creating a safer, faster, and more stable browser" +archs="x86_64" +repository=nonfree +restricted=yes +nostrip=yes + +_baseUrl="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-unstable" +_filename="google-chrome-${_channel}_${_chromeVersion}-${_chromeRevision}_amd64.deb" +_chromeUrl="${_baseUrl}/${_filename}" + +distfiles="$_chromeUrl" +checksum=b8145334c396406a453dbbf7b5f790e3a093f83a23320ac4d37c13964f1f91fb + +do_extract() { + mkdir -p ${DESTDIR} + ar x ${XBPS_SRCDISTDIR}/google-chrome-unstable-${version}/${_filename} +} + +do_install() { + tar xf data.tar.xz -C ${DESTDIR} + + # Install the icons + for size in 16 24 32 48 64 128 256; do + # Create the google chrome xdg directory + mkdir -p ${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps + + # Copy the google chrome icon + mv ${DESTDIR}/opt/google/chrome-unstable/product_logo_${size}_dev.png \ + ${DESTDIR}/usr/share/icons/hicolor/${size}x${size}/apps/google-chrome-unstable.png + done + + # Remove unused icons + rm ${DESTDIR}/opt/google/chrome-unstable/*.xpm + + # Remove the Debian/Ubuntu crontab + rm -rf ${DESTDIR}/etc + rm -rf ${DESTDIR}/opt/google/chrome-unstable/cron +} diff --git a/srcpkgs/google-chrome-unstable/update b/srcpkgs/google-chrome-unstable/update new file mode 100644 index 00000000000000..1cf53dc1557075 --- /dev/null +++ b/srcpkgs/google-chrome-unstable/update @@ -0,0 +1,7 @@ +# This site is an official source of version numbers, but it is not +# obviously associated as such. We save bytes here and request the +# CSV, and then only the row containing the stable version number for +# the Linux desktop build. As a result the regex can be pretty simple +# to just grab the version number out of the correct column. +site="https://omahaproxy.appspot.com/all?os=linux&channel=dev" +pattern="dev,\K[\d.]+(?=,)"