summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authora-wing2019-08-08 13:36:58 +0800
committera-wing2019-08-08 13:36:58 +0800
commit91b6180f68c85d360dbb2edb0ccc35f338e26c6c (patch)
tree177cd5a0aa89a3c01759a993ccaae9c5edf418f8
downloadaur-91b6180f68c85d360dbb2edb0ccc35f338e26c6c.tar.gz
Init deno
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD37
2 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5f42b846d03
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = deno
+ pkgdesc = A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio
+ pkgver = 0.13.0
+ pkgrel = 1
+ url = https://github.com/denoland/deno
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = python2
+ makedepends = cargo
+ makedepends = nodejs
+ source = deno-0.13.0::git+https://github.com/denoland/deno#tag=v0.13.0
+ sha512sums = SKIP
+
+pkgname = deno
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..80be895dc49
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Metal A-wing <1 at 233 dot email>
+
+pkgname=deno
+pkgver=0.13.0
+pkgrel=1
+pkgdesc="A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio"
+arch=('i686' 'x86_64')
+url="https://github.com/denoland/deno"
+license=('MIT')
+makedepends=('git' 'python2' 'cargo' 'nodejs')
+source=("${pkgname}-${pkgver}::git+https://github.com/denoland/deno#tag=v${pkgver}")
+sha512sums=('SKIP')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ git submodule update --init --recursive
+ mkdir -p "${srcdir}"/python2-path
+ ln -sf /usr/bin/python2 "${srcdir}/python2-path/python"
+ PATH="${srcdir}/python2-path:${PATH}" ./tools/setup.py
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ PATH="${srcdir}/python2-path:${PATH}" DENO_BUILD_MODE=release ./tools/build.py deno
+}
+
+check() {
+ cd ${pkgname}-${pkgver}
+ ./target/release/deno run tests/002_hello.ts
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ install -Dm755 target/release/deno "${pkgdir}"/usr/bin/deno
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+