summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlango Rajagopal2020-06-09 15:43:31 +0530
committerIlango Rajagopal2020-06-09 15:43:31 +0530
commit29c5f25601f628a8b6f61331f1b2a8862460c8d9 (patch)
tree867e808eef46fd8203e2622a3e593d1bd7f08d9a
downloadaur-29c5f25601f628a8b6f61331f1b2a8862460c8d9.tar.gz
Endpoint Verification Helper published
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD45
-rw-r--r--endpoint-verification.service10
-rwxr-xr-xupdater.sh25
5 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f9b42245e85
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = endpoint-verification
+ pkgdesc = Google Endpoint Verification Helper for Chromium
+ pkgver = 2019.10.07.c273328186_00
+ pkgrel = 1
+ url = https://chrome.google.com/webstore/detail/endpoint-verification/callobklhcbilhphinckomhgkigmfocg
+ arch = x86_64
+ license = unknown
+ depends = chromium
+ source = endpoint-verification.deb::https://packages.cloud.google.com/apt/pool/endpoint-verification_2019.10.07.c273328186-00_amd64_466d329b82384574a5b062adcd6312623918ac27c5ea3999985856366735bdca.deb
+ source = endpoint-verification.service
+ sha256sums = 466d329b82384574a5b062adcd6312623918ac27c5ea3999985856366735bdca
+ sha256sums = SKIP
+
+pkgname = endpoint-verification
+
+pkgname = endpoint-verification-chrome
+ pkgdesc = Endpoint verification Helper for Google Chrome
+ depends = google-chrome
+ provides = endpoint-verification
+ conflicts = endpoint-verification
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..789ae7a5aaa
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.pkg.tar.*
+*.deb
+Packages
+pkg
+src
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ef8e3c0407d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Ilango Rajagopal <ilangokul@gmail.com>
+
+pkgbase=endpoint-verification
+pkgname=(endpoint-verification endpoint-verification-chrome)
+_pkgver=2019.10.07.c273328186-00
+pkgver=2019.10.07.c273328186_00
+pkgrel=1
+pkgdesc="Google Endpoint Verification Helper for Chromium"
+arch=(x86_64)
+url="https://chrome.google.com/webstore/detail/endpoint-verification/callobklhcbilhphinckomhgkigmfocg"
+license=(unknown)
+depends=(chromium)
+sha256sums=("466d329b82384574a5b062adcd6312623918ac27c5ea3999985856366735bdca" "SKIP")
+source=("${pkgbase}.deb::https://packages.cloud.google.com/apt/pool/${pkgbase}_${_pkgver}_amd64_${sha256sums[0]}.deb"
+ "endpoint-verification.service")
+
+prepare() {
+ mkdir -p data
+ tar -C data -xf data.tar.gz
+ mv data/etc/init.d/endpoint_verification.sh data/opt/google/endpoint_verification
+ rmdir data/etc/init.d
+}
+
+package_endpoint-verification() {
+ cp -a "$srcdir/data/opt" "$pkgdir"
+ cp -a "$srcdir/data/usr" "$pkgdir"
+ cp -a "$srcdir/data/etc" "$pkgdir"
+ install -D -m0644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/endpoint-verification.service"
+
+ mv "$pkgdir/etc/opt/chrome" "$pkgdir/etc/chromium"
+ rmdir "$pkgdir/etc/opt"
+}
+
+package_endpoint-verification-chrome() {
+ pkgdesc="Endpoint verification Helper for Google Chrome"
+ depends=(google-chrome)
+ provides=(endpoint-verification)
+ conflicts=(endpoint-verification)
+
+ cp -a "$srcdir/data/opt" "$pkgdir"
+ cp -a "$srcdir/data/usr" "$pkgdir"
+ cp -a "$srcdir/data/etc" "$pkgdir"
+ install -D -m0644 -t "$pkgdir/usr/lib/systemd/system" "$srcdir/endpoint-verification.service"
+}
+
diff --git a/endpoint-verification.service b/endpoint-verification.service
new file mode 100644
index 00000000000..9d9eff58d0f
--- /dev/null
+++ b/endpoint-verification.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Endpoint Verification Service
+
+[Service]
+Type=oneshot
+ExecStart=/opt/google/endpoint_verification/endpoint_verification.sh
+
+[Install]
+WantedBy=graphical.target
+
diff --git a/updater.sh b/updater.sh
new file mode 100755
index 00000000000..48e895bb4e7
--- /dev/null
+++ b/updater.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+echo "Getting latest version information"
+resp=$(curl -s https://packages.cloud.google.com/apt/dists/endpoint-verification/main/binary-amd64/Packages)
+
+filename=$(grep Filename <<< $resp | cut -d' ' -f2)
+version=$(grep Version <<< $resp | cut -d' ' -f2)
+sha256sum=$(grep SHA256 <<< $resp | cut -d' ' -f2)
+
+pkgversion=$(grep '_pkgver=' PKGBUILD | cut -d= -f2)
+
+if [ $version = $pkgversion ]; then
+ echo "Current version $version up to date"
+ exit
+else
+ echo "Update found: $version"
+fi
+
+echo "Patching PKGBUILD"
+sed -i.bak -e "s/^sha256sums=.*$/sha256sums=(\"$sha256sum\")/" -e "s/^_pkgver=.*$/_pkgver=$version/" -e "s/^pkgver=.*$/pkgver=${version//-/_}/" PKGBUILD
+
+echo "Install now with makepkg -si"
+