diff --git a/srcpkgs/rapydscript-ng/template b/srcpkgs/rapydscript-ng/template new file mode 100644 index 0000000000..d5f04b7587 --- /dev/null +++ b/srcpkgs/rapydscript-ng/template @@ -0,0 +1,28 @@ +# Template file for 'rapydscript-ng' +pkgname=rapydscript-ng +version=0.7.20 +revision=1 +archs=noarch +hostmakedepends="nodejs" +depends="nodejs" +short_desc="Transpiler for a Python like language to JavaScript" +maintainer="bra1nwave " +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 + +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 +}