summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorakaessens2021-04-24 21:09:27 +0200
committerakaessens2021-04-24 21:25:58 +0200
commit1803143c918f5983173cc49cd7af657814a9f028 (patch)
tree238d74ca4c9f548cb63cbe7b0e5bdcc5336c2cfa
parent96fcf0149a57ae575a4f2265f45908cd03cdaaa2 (diff)
downloadaur-1803143c918f5983173cc49cd7af657814a9f028.tar.gz
Adapt to changes from google-calendar-nativefier
Thanks to alecmev
-rw-r--r--.SRCINFO12
-rw-r--r--[-rwxr-xr-x]PKGBUILD77
-rw-r--r--google-keep-nativefier.desktop8
3 files changed, 54 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eabf3341a630..dfa056e7d3cc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,15 @@
pkgbase = google-keep-nativefier
- pkgdesc = Electron wrapper for the Google Keep web application
- pkgver = 0.4.1
- pkgrel = 2
+ pkgdesc = Google Keep in shared Electron runtime
+ pkgver = 2021.04.24
+ pkgrel = 1
url = https://keep.google.com
arch = x86_64
license = MIT
- makedepends = nodejs
+ makedepends = gendesk
makedepends = nodejs-nativefier
- makedepends = npm
+ depends = electron
source = google-keep-nativefier.png
- source = google-keep-nativefier.desktop
sha256sums = 30bf408abb4d6639864c05a6c829fba7624bbec254eeab52a72ce0d8b91fbb1f
- sha256sums = 2ef4f9ffb7aa8405083f50413bd4f16bd3856a6146887f68c66589331d4f8193
pkgname = google-keep-nativefier
diff --git a/PKGBUILD b/PKGBUILD
index 38dd3bac1dcf..766af7d04117 100755..100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,56 @@
+# Maintainer: akaessens
+
pkgname=google-keep-nativefier
-pkgver=0.4.1
-pkgrel=2
-pkgdesc="Electron wrapper for the Google Keep web application"
-arch=(x86_64)
-license=(MIT)
-url=https://keep.google.com
-source=($pkgname.png
- $pkgname.desktop)
-makedepends=(nodejs nodejs-nativefier npm)
-sha256sums=('30bf408abb4d6639864c05a6c829fba7624bbec254eeab52a72ce0d8b91fbb1f'
- '2ef4f9ffb7aa8405083f50413bd4f16bd3856a6146887f68c66589331d4f8193')
+pkgver=2021.04.24
+pkgrel=1
+pkgdesc='Google Keep in shared Electron runtime'
+arch=('x86_64')
+url='https://keep.google.com'
+license=('MIT')
+depends=('electron')
+makedepends=(
+ 'gendesk'
+ 'nodejs-nativefier'
+)
-_instname=google-keep
-build() {
- nativefier "https://keep.google.com/" \
- --icon $pkgname.png \
- --maximize \
- --name $_instname \
- --user-agent "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0" \
- --internal-urls "(.*?keep\.google\.com.*?|.*?accounts\.google\.com.*?)" \
- --single-instance
-}
+source=("${pkgname}.png")
+sha256sums=('30bf408abb4d6639864c05a6c829fba7624bbec254eeab52a72ce0d8b91fbb1f')
-package() {
- install -d "$pkgdir"/opt "$pkgdir"/usr/{bin,share/pixmaps}
- install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$_instname.desktop
+_name='Google Keep'
- cp -rL $_instname-linux-* "$pkgdir"/opt/$pkgname
- ln -sf /opt/$pkgname/$_instname "$pkgdir"/usr/bin/$_instname
- ln -sf /opt/$pkgname/resources/app/icon.png "$pkgdir"/usr/share/pixmaps/$_instname.png
+prepare() {
+ cat > "${pkgname}" <<EOF
+#!/usr/bin/env bash
+exec electron /usr/share/${pkgname} "\$@"
+EOF
+ gendesk \
+ --pkgname "${pkgname}" \
+ --pkgdesc "${pkgdesc}" \
+ --name "${_name}" \
+ --categories "Network;Office;Notes;" \
+ -n \
+ -f
+}
- chmod 666 "$pkgdir"/opt/$pkgname/resources/app/nativefier.json
+build() {
+ cd "${srcdir}"
+ # https://github.com/nativefier/nativefier/issues/831
+ nativefier \
+ --name "${_name}" \
+ --icon "${pkgname}.png" \
+ --maximize \
+ --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/87.0" \
+ --single-instance \
+ --verbose \
+ https://keep.google.com
}
+package() {
+ mkdir -p "${pkgdir}/usr/share"
+ local _x=`echo "${_name// /}-linux-"*`
+ cp -r "${_x}/resources/app" "${pkgdir}/usr/share/${pkgname}"
+ install -Dm 755 -t "${pkgdir}/usr/bin/" "${pkgname}"
+ install -Dm 644 -t "${pkgdir}/usr/share/applications/" "${pkgname}.desktop"
+ install -Dm 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${_x}/LICENSE"
+ install -Dm 644 -t "${pkgdir}/usr/share/pixmaps/" "${pkgname}.png"
+}
diff --git a/google-keep-nativefier.desktop b/google-keep-nativefier.desktop
deleted file mode 100644
index b08a0815c882..000000000000
--- a/google-keep-nativefier.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=Google Keep
-Comment=Quickly capture whats on your mind and get a reminder later at the right place or time. Speak a voice memo on the go and have it automatically transcribed.
-Exec=google-keep
-Icon=google-keep
-Terminal=false
-Categories=Productivity;Notes;Google;Nativefier; \ No newline at end of file