summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKnut Ahlers2018-11-24 14:38:46 +0100
committerKnut Ahlers2018-11-24 14:38:46 +0100
commit8b61985df200c0388b8d55d768d264310c474efd (patch)
tree997b4872e4e7b903c7eb11dd794cc9260d99f4b0
parent8ecd95fc8811c10ce0cc1fd30bb808e5fd8a92b5 (diff)
downloadaur-8b61985df200c0388b8d55d768d264310c474efd.tar.gz
Change maintainer, add update-script, switch to sha512
Signed-off-by: Knut Ahlers <knut@ahlers.me>
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD11
-rwxr-xr-xupdate_version.sh28
3 files changed, 37 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 20f4567b898..1b50cfdd4d3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -25,9 +25,9 @@ pkgbase = google-chrome-dev
source = google-chrome-unstable_72.0.3610.2_amd64.deb::https://dl.google.com/linux/direct/google-chrome-unstable_current_amd64.deb
source = eula_text.html
source = google-chrome-unstable.sh
- md5sums = 4c7edfd2121ab7e7db361d9b9efc6ecb
- md5sums = d50d8f0a6940791eabc41c4f64e6a3cf
- md5sums = 11b55a3fec7279db32b63e3a0b97dc01
+ sha512sums = 1f60573f4b535e8d0488781424ace6ada48d9eb51ce2588acb34431e1c2cf22757af4aaf139f350deb3ca0bf878c865da3015df6d7ab9023e7d15fdd4ddeebe8
+ sha512sums = a225555c06b7c32f9f2657004558e3f996c981481dbb0d3cd79b1d59fa3f05d591af88399422d3ab29d9446c103e98d567aeafe061d9550817ab6e7eb0498396
+ sha512sums = 5f716219456ec8de9df4e7ee5f94bc35cdc1b079d9d1d5dab0df8d4b6e6d0fd8775bb64d0c8ce9339837d7277614c55aa05adced6e8ad49931989823ed97863b
pkgname = google-chrome-dev
diff --git a/PKGBUILD b/PKGBUILD
index f6f20a992ec..081c070612e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: Det <nimetonmaili g-mail>
+# Maintainer: Knut Ahlers <knut at ahlers dot me>
+# Contributor: Det <nimetonmaili g-mail>
# Contributors: t3ddy, Lex Rivera aka x-demon, ruario
# Check for new Linux releases in: http://googlechromereleases.blogspot.com/search/label/Dev%20updates
@@ -26,9 +27,9 @@ _channel=unstable
source=("google-chrome-${_channel}_${pkgver}_amd64.deb::https://dl.google.com/linux/direct/google-chrome-${_channel}_current_amd64.deb"
'eula_text.html'
"google-chrome-$_channel.sh")
-md5sums=('4c7edfd2121ab7e7db361d9b9efc6ecb'
- 'd50d8f0a6940791eabc41c4f64e6a3cf'
- '11b55a3fec7279db32b63e3a0b97dc01')
+sha512sums=('1f60573f4b535e8d0488781424ace6ada48d9eb51ce2588acb34431e1c2cf22757af4aaf139f350deb3ca0bf878c865da3015df6d7ab9023e7d15fdd4ddeebe8'
+ 'a225555c06b7c32f9f2657004558e3f996c981481dbb0d3cd79b1d59fa3f05d591af88399422d3ab29d9446c103e98d567aeafe061d9550817ab6e7eb0498396'
+ '5f716219456ec8de9df4e7ee5f94bc35cdc1b079d9d1d5dab0df8d4b6e6d0fd8775bb64d0c8ce9339837d7277614c55aa05adced6e8ad49931989823ed97863b')
## Previous build (also see: /var/cache/pacman/pkg/google-chrome-dev-*):
#source[0]="https://dl.google.com/linux/deb/pool/main/g/google-chrome-${_channel}/google-chrome-${_channel}_72.0.3608.4-1_amd64.deb"
@@ -57,4 +58,4 @@ package() {
msg2 "Removing Debian Cron job and duplicate product logos..."
rm -r "$pkgdir"/etc/cron.daily/ "$pkgdir"/opt/google/chrome-$_channel/cron/
rm "$pkgdir"/opt/google/chrome-$_channel/product_logo_*.png
-} \ No newline at end of file
+}
diff --git a/update_version.sh b/update_version.sh
new file mode 100755
index 00000000000..a51aa96b2db
--- /dev/null
+++ b/update_version.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -euxo pipefail
+
+# Get channel
+CHANNEL=$(awk -F '=' '/^_channel/{ print $2 }' PKGBUILD)
+PKG="google-chrome-${CHANNEL}"
+
+# Get latest version
+VER=$(curl -sL "https://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/other.xml.gz" | gzip -df |
+ tr ' ' '\n' | grep -e name= -e ver= | cut -d '"' -f2 | sed 'N;s/\n/ /' |
+ grep "${PKG}" | cut -d ' ' -f 2)
+
+# Insert latest version into PKGBUILD and update hashes
+sed -i "s/^pkgver=.*/pkgver=${VER}/" PKGBUILD
+updpkgsums
+
+# Check whether this changed anything
+if (git diff --exit-code PKGBUILD); then
+ echo "Package ${PKG} has most recent version ${VER}"
+ exit 0
+fi
+
+# Update .SRCINFO
+makepkg --printsrcinfo >.SRCINFO
+
+# Commit changes
+git add PKGBUILD .SRCINFO
+git commit -m "${PKG} v${VER}"