summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d1f6d4e8e8a7812780f85f4bc1236409574a9cd6 (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
pkgname=brfares-nativefier
pkgver=0.0.1
pkgrel=1


pkgdesc="Electron wrapper for the website brfares.com built with Nativefier"
arch=(x86_64)
license=(MIT)
url=http://www.brfares.com
source=($pkgname.png
        $pkgname.desktop)
makedepends=(nodejs nodejs-nativefier npm)
sha256sums=('4a25333b2243f22f7f18fe3bb962e12e49b7aa3fbba7e829db5bde593b774921'
            '638737c8b0915e541dffe491efec14deac0718943fb1e31f0a9a79c604049195')

_instname=brfares

build() {
    nativefier "http://www.brfares.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" \
      --single-instance
}

package() {
    install -d "$pkgdir"/opt "$pkgdir"/usr/{bin,share/pixmaps}
    install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$_instname.desktop

    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

    chmod 666 "$pkgdir"/opt/$pkgname/resources/app/nativefier.json
}