[arch-commits] Commit in (4 files)

Eli Schwartz eschwartz at archlinux.org
Mon Apr 29 15:56:55 UTC 2019


    Date: Monday, April 29, 2019 @ 15:56:52
  Author: eschwartz
Revision: 456291

addpkg: rapydscript-ng 0.7.19

used to build calibre

Added:
  rapydscript-ng/
  rapydscript-ng/repos/
  rapydscript-ng/trunk/
  rapydscript-ng/trunk/PKGBUILD

----------+
 PKGBUILD |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Added: rapydscript-ng/trunk/PKGBUILD
===================================================================
--- rapydscript-ng/trunk/PKGBUILD	                        (rev 0)
+++ rapydscript-ng/trunk/PKGBUILD	2019-04-29 15:56:52 UTC (rev 456291)
@@ -0,0 +1,42 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+pkgname=rapydscript-ng
+pkgver=0.7.19
+pkgrel=1
+pkgdesc="Pythonic JavaScript that doesn't suck"
+arch=('any')
+url="https://github.com/kovidgoyal/${pkgname}"
+license=('BSD')
+depends=('nodejs')
+makedepends=('git' 'npm')
+source=("git+${url}.git?signed#tag=v${pkgver}")
+sha256sums=('SKIP')
+validpgpkeys=('3CE1780F78DD88DF45194FD706BC317B515ACE7C') # Kovid Goyal (New longer key) <kovid at kovidgoyal.net>
+
+build() {
+    cd "${srcdir}/${pkgname}"
+
+    npm install --no-optional
+    bin/rapydscript self --complete
+    rm -rf release/ && mv dev/ release/
+}
+
+check() {
+    cd "${srcdir}/${pkgname}"
+
+    bin/rapydscript test
+}
+
+package() {
+    cd "${srcdir}/${pkgname}"
+
+    mkdir -p "${pkgdir}"/usr/{bin,lib/node_modules/rapydscript-ng/}
+    cp -r * "${pkgdir}"/usr/lib/node_modules/rapydscript-ng/
+    # Non-deterministic race in npm gives 777 permissions to random directories.
+    # See https://github.com/npm/npm/issues/9359 for details.
+    find "${pkgdir}"/usr -type d -exec chmod 755 {} +
+
+    ln -s ../lib/node_modules/rapydscript-ng/bin/rapydscript "${pkgdir}"/usr/bin/rapydscript
+
+    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}


More information about the arch-commits mailing list