summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e7f8c7d196eaf955c104e2126bb0810530c3bda6 (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
# Maintainer: Giorgi Kobakhidze <gk@koba.pvt.ge>

_pkgname=libsignal-protocol-javascript
pkgname="${_pkgname}-git"
pkgver=1.3.0.r5.g4fbea5a
pkgrel=3
license=(GPL3)
arch=(any)
url="https://github.com/signalapp/${_pkgname}"
conflicts=("${_pkgname}")
makedepends=(emscripten npm grunt-cli)
source=("git+${url}")
sha256sums=(SKIP)

pkgver() {
	cd -- "${_pkgname}"
	git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd -- "${_pkgname}"
	npm install
	grunt build
}

package() {
	cd -- "${_pkgname}"
	install -dm755 "$pkgdir"/usr/share/webapps/"${_pkgname}"
	cp -R dist "$pkgdir"/usr/share/webapps/"${_pkgname}"/
	cp build/curve25519_compiled.wasm "$pkgdir"/usr/share/webapps/"${_pkgname}"/dist/
}