summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormrxx2021-07-13 16:19:43 +0200
committermrxx2021-07-13 16:19:43 +0200
commitff5edc8b2d8a15f057f428bfb69141c0c7ef412d (patch)
treeda1f80b9d348b4dacf0bb24e0668d5ba87d88656
parent2cf080ec0af9906acd6b65f07eb2091e73034741 (diff)
downloadaur-ff5edc8b2d8a15f057f428bfb69141c0c7ef412d.tar.gz
Download from GDrive
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD28
2 files changed, 24 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 56d6e0425485..55ca230c74f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mynotex
pkgdesc = A free note-taking, document file and activity manager for GNU/Linux
pkgver = 1.4.1.0
- pkgrel = 2
+ pkgrel = 3
url = https://sites.google.com/site/mynotex
arch = i686
arch = x86_64
@@ -9,10 +9,5 @@ pkgbase = mynotex
depends = sqlite3
depends = gtk2
optdepends = gnupg: for notes encryption
- source_i686 = https://sites.google.com/site/mynotex/files/mynotex_1.4.1.0_i386.deb
- sha256sums_i686 = 7a2b049d166609bec364e34ddf9899ff218c2fea410014f0af78472ee0fb4b90
- source_x86_64 = https://sites.google.com/site/mynotex/files/mynotex_1.4.1.0_amd64.deb
- sha256sums_x86_64 = 0026f7182fd0f9c38b6c220a3ea82642d93241f78ba33360f0d66270bf9f8673
pkgname = mynotex
-
diff --git a/PKGBUILD b/PKGBUILD
index 2aaab974710a..5e9f162b03fa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,17 +5,35 @@
pkgname=mynotex
pkgver=1.4.1.0
-pkgrel=2
+pkgrel=3
pkgdesc="A free note-taking, document file and activity manager for GNU/Linux"
url="https://sites.google.com/site/mynotex"
license=('GPL')
arch=('i686' 'x86_64')
depends=('sqlite3' 'gtk2')
optdepends=('gnupg: for notes encryption')
-source_i686=("https://sites.google.com/site/${pkgname}/files/${pkgname}_${pkgver}_i386.deb")
-source_x86_64=("https://sites.google.com/site/${pkgname}/files/${pkgname}_${pkgver}_amd64.deb")
-sha256sums_i686=('7a2b049d166609bec364e34ddf9899ff218c2fea410014f0af78472ee0fb4b90')
-sha256sums_x86_64=('0026f7182fd0f9c38b6c220a3ea82642d93241f78ba33360f0d66270bf9f8673')
+
+gdrive_download() {
+ gUrl=https://drive.google.com/uc?export=download
+ curl -sc gc "${gUrl}&id=${1}" >/dev/null
+ gc="$(awk '/_warning_/ {print $NF}' gc)"
+ curl -k -C - -LOJb gc "${gUrl}&confirm=${gc}&id=${1}"
+}
+
+prepare() {
+ if [ "$(uname -m | grep '64')" = "x86_64" ]; then
+ file=mynotex_1.4.1.0_amd64.deb
+ sha256=0026f7182fd0f9c38b6c220a3ea82642d93241f78ba33360f0d66270bf9f8673
+ gdrive_download 1emkXcCopQJkgpI2ehYpF1smz4vlsLz7L
+ else
+ file=mynotex_1.4.1.0_i386.deb
+ sha256=7a2b049d166609bec364e34ddf9899ff218c2fea410014f0af78472ee0fb4b90
+ gdrive_download 1qlwYZ2rLrvbzMp1ap6NfPzZGpbwqZk6K
+ fi
+
+ echo "$sha256 $file"|sha256sum -c
+ bsdtar xf $file
+}
package() {
tar -axf data.tar.xz -C "$pkgdir"