summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9d32d5e274a7adc4d519caa734877cc02039dbab (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
# Maintainer: Olegs Jeremejevs <olegs@jeremejevs.com>

pkgname=notion-app-nativefier
pkgver=2020.03.18
pkgrel=1
pkgdesc='The all-in-one workspace for your notes, tasks, wikis, and databases'
arch=('any')
url='https://www.notion.so/'
license=('custom')
depends=('electron')
makedepends=(
  'curl'
  'gendesk'
  'nodejs-nativefier'
)

_name=Notion

prepare() {
  cat > "${pkgname}" <<EOF
#!/usr/bin/env bash
exec electron /usr/share/${pkgname} "\$@"
EOF
  gendesk \
    --pkgname "${pkgname}" \
    --pkgdesc "${pkgdesc}" \
    --name "${_name}" \
    -n \
    -f
  curl https://www.notion.so/images/logo-ios.png > "${pkgname}.png"
}

build() {
  cd "${srcdir}"
  nativefier \
    --name "${_name}" \
    --icon "${pkgname}.png" \
    --maximize \
    --single-instance \
    --verbose \
    www.notion.so
}

package() {
  mkdir -p "${pkgdir}/usr/share"
  cp -r "${_name}-linux-"*"/resources/app" "${pkgdir}/usr/share/${pkgname}"
  install -D -m 755 -t "${pkgdir}/usr/bin/" "${pkgname}"
  install -D -m 644 -t "${pkgdir}/usr/share/applications/" "${pkgname}.desktop"
  install -D -m 644 -t "${pkgdir}/usr/share/pixmaps/" "${pkgname}.png"
}