summaryrefslogtreecommitdiff
path: root/libre/rapydscript-ng/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/rapydscript-ng/PKGBUILD')
-rw-r--r--libre/rapydscript-ng/PKGBUILD33
1 files changed, 33 insertions, 0 deletions
diff --git a/libre/rapydscript-ng/PKGBUILD b/libre/rapydscript-ng/PKGBUILD
new file mode 100644
index 000000000..defe780cc
--- /dev/null
+++ b/libre/rapydscript-ng/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer (Arch): Eli Schwartz <eschwartz@archlinux.org>
+# Maintainer: <heckyel@parabola.nu>
+
+pkgname=rapydscript-ng
+pkgver=0.7.17
+pkgrel=1.parabola1
+pkgdesc="Pythonic JavaScript that doesn't suck"
+arch=('any')
+url="https://github.com/kovidgoyal/rapydscript-ng"
+license=('BSD2')
+depends=('nodejs')
+makedepends=('npm')
+provides=("${pkgname}")
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kovidgoyal/${pkgname}/archive/v${pkgver}.tar.gz")
+sha512sums=('a94061a48398b537eeaf4b6649344d3178cf76709e7f5ec76302846cc13a08de96cc350ca4d72502177aa6050c6b7e84eed86d3c07ed12cd0b1898d008ad2fe9')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ npm install --no-optional
+ bin/rapydscript self --complete
+ rm -rf release/ && mv dev/ release/
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ mkdir -p "${pkgdir}"/usr/{bin,lib/node_modules/rapydscript-ng/}
+ cp -r * "${pkgdir}"/usr/lib/node_modules/rapydscript-ng/
+
+ ln -s ../lib/node_modules/rapydscript-ng/bin/rapydscript "${pkgdir}"/usr/bin/rapydscript
+
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}