summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 18ffd26aa0a36e20f0d69a22fefd9b9f0dd0ed7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
pkgname="google-keep-nativefier"
pkgver="0.1"
pkgrel="3"
pkgdesc="Quickly capture what's 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."
arch=("x86_64")
license=("MIT")
url="https://keep.google.com/"
source=("${pkgname}.png" "${pkgname}.desktop")
makedepends=("nodejs" "npm" "nodejs-nativefier")
sha256sums=("SKIP" "SKIP")

instname="google-keep"

build() {
    cd "${srcdir}"

    nativefier "https://keep.google.com/" \
      --icon "${pkgname}.png" \
      --maximize \
      --internal-urls ".*" \
      --name "Google Keep"
}

package() {
  install -dm755 "${pkgdir}/opt/"
  install -dm755 "${pkgdir}/usr/bin"
  install -dm755 "${pkgdir}/usr/share/pixmaps"
  install -dm755 "${pkgdir}/usr/share/applications"

  cp -f "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${instname}.desktop"
  cp -f "${srcdir}/${instname}-linux-x64" "${pkgdir}/opt/"

  ln -sf "/opt/${instname}-linux-x64/${instname}" "${pkgdir}/usr/bin/${instname}"
  ln -sf "/opt/${instname}-linux-x64/resources/app/icon.png" "${pkgdir}/usr/share/pixmaps/${instname}.png"

  chmod 777 "${pkgdir}/opt/${instname}-linux-x64/resources/app/nativefier.json"
}