void-packages/srcpkgs/rapydscript-ng/template

30 lines
955 B
Bash

# Template file for 'rapydscript-ng'
pkgname=rapydscript-ng
version=0.7.20
revision=2
archs=noarch
hostmakedepends="nodejs"
depends="nodejs"
short_desc="Transpiler for a Python like language to JavaScript"
maintainer="bra1nwave <bra1nwave@protonmail.com>"
license="BSD-2-Clause"
homepage="https://github.com/kovidgoyal/rapydscript-ng"
changelog="https://raw.githubusercontent.com/kovidgoyal/rapydscript-ng/master/CHANGELOG.md"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=11540118ce88f33b974884f08d1627938bc57669f0eefc1392bf9fc9d411ae03
python_version=3 # seems to be compatible with both
do_build() {
npm install --no-optional
bin/rapydscript self --complete
rm -rf release/ && mv dev/ release/
}
do_install() {
vmkdir usr/bin
vmkdir usr/lib/node_modules/rapydscript-ng/
vcopy "*" usr/lib/node_modules/rapydscript-ng/
ln -s /usr/lib/node_modules/rapydscript-ng/bin/rapydscript "${DESTDIR}"/usr/bin/rapydscript
vlicense LICENSE
}