summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ce140c6cc79ffc26f13e296854c4426b7a72a526 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Jouni Rinne <l33tmmx swirlything gmail dot com>
# Contributor: akaessens

pkgname=google-keep-nativefier
pkgver=2024.08.21
pkgrel=1
pkgdesc='Google Keep in shared Electron runtime'
arch=('x86_64')
url='https://keep.google.com'
license=('MIT')
depends=('electron30')
makedepends=(
  'gendesk'
  'nodejs-nativefier'
)

source=(
    "${pkgname}.png"
    "${pkgname}.profile"
)
sha256sums=(
    '30bf408abb4d6639864c05a6c829fba7624bbec254eeab52a72ce0d8b91fbb1f'
    '83e01a5c3687ace17bfb73cd9cba4f13bb6b16922f1e822b42697f1878b77d97'
)

_name='Google Keep'

prepare() {
  cat > "${pkgname}" <<EOF
#!/usr/bin/env bash
exec electron30 /usr/share/${pkgname}
EOF
  gendesk \
    --pkgname "${pkgname}" \
    --pkgdesc "${pkgdesc}" \
    --name "${_name}" \
    --categories "Network;Office;Notes;" \
    -n \
    -f
}

build() {
  cd "${srcdir}"
  
  nativefier \
    --name "${_name}" \
    --icon "${pkgname}.png" \
    --width "800px" \
    --height "600px" \
    --browserwindow-options '{ "webPreferences": { "defaultFontFamily": { "standard": "Open Sans", "serif": "Open Sans", "sansSerif": "Open Sans" } } }' \
    --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0" \
    --single-instance \
    --zoom "0.8" \
    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"
  install -Dm 644 -t "${pkgdir}/etc/firejail/" "${pkgname}.profile"
}