summaryrefslogtreecommitdiff
path: root/libre/rapydscript-ng
diff options
context:
space:
mode:
authorJesús Eduardo <heckyel@parabola.nu>2017-09-10 22:55:23 +0000
committerJesús Eduardo <heckyel@parabola.nu>2017-09-10 22:55:23 +0000
commit16e9679cfc45e70ab1205c2c62b14a1213a70af9 (patch)
tree38b687f94be830d32f50fb44a4b87d7a031c2323 /libre/rapydscript-ng
parent99ab54d028448d1c854dd2b0e715bf09943261be (diff)
downloadabslibre-16e9679cfc45e70ab1205c2c62b14a1213a70af9.tar.gz
abslibre-16e9679cfc45e70ab1205c2c62b14a1213a70af9.tar.bz2
abslibre-16e9679cfc45e70ab1205c2c62b14a1213a70af9.zip
Added: rapydscript-ng for calibre
Diffstat (limited to 'libre/rapydscript-ng')
-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"
+}