summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 08e41cac9117135a56fb0cd0a8e1b8c89be8ee94 (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
# Maintainer: Tuure Piitulainen <tuure.piitulainen@gmail.com>

pkgname="vivify"
pkgver="0.1.6"
pkgrel=1
pkgdesc="Markdown preview tool which can be used standalone or plug into an editor like (Neo)Vim"
arch=("x86_64")
url="https://github.com/jannis-baum/vivify"
license=("GPL3")
depends=("jq" "gcc-libs" "sh")
makedepends=("yarn")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/jannis-baum/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
md5sums=("83ad2330e7dfc1541bdc58299b7d4387")

# Stripping 'unneeded symbols' causes vivify-server executable to break
# (exits with error `Pkg: Error reading from file`)
options=(!strip)

build() {
	cd "${pkgname}-${pkgver}"
        yarn install

        node_modules/.bin/tsc --project . \
            && node_modules/.bin/pkg . \
            || exit 1
}

package() {
	cd "${pkgname}-${pkgver}"
        install -Dm755 ./viv                     "${pkgdir}/usr/bin/viv"
        install -Dm755 ./bin/vivify-server-linux "${pkgdir}/usr/bin/vivify-server"
        install -Dm644 ./LICENSE                 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}