archrelease: copy trunk to community-any
[ArchLinux/community.git] / deno / trunk / PKGBUILD
blob34ae94a78f90f8c2025be539adae81ff1d16cef5
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Metal A-wing <1 at 233 dot email>
4 pkgname=deno
5 pkgver=1.33.0
6 _commit=39ece1fe0ddacc2cbf182403c9e7085bc01df5a6
7 pkgrel=1
8 pkgdesc="A secure runtime for JavaScript and TypeScript"
9 arch=('x86_64')
10 url="https://deno.land"
11 license=('MIT')
12 options=('!lto')
13 depends=('gcc-libs')
14 makedepends=('git' 'python' 'cargo' 'nodejs')
15 source=("git+https://github.com/denoland/deno.git#commit=$_commit")
16 sha512sums=('SKIP')
18 prepare() {
19   cd $pkgname
20   git submodule update --init --recursive
23 build() {
24   cd $pkgname
25   cargo build --release
28 check() {
29   cd $pkgname
30   ./target/release/deno run cli/tests/testdata/run/002_hello.ts
33 package() {
34   cd $pkgname
35   install -Dm755 target/release/deno "$pkgdir"/usr/bin/deno
37   install -dm755 "$pkgdir"/usr/share/bash-completion/completions
38   ./target/release/deno completions bash > "$pkgdir"/usr/share/bash-completion/completions/deno
39   install -dm755 "$pkgdir"/usr/share/zsh/site-functions
40   ./target/release/deno completions zsh > "$pkgdir"/usr/share/zsh/site-functions/_deno
41   install -dm755 "$pkgdir"/usr/share/fish/vendor_functions.d
42   ./target/release/deno completions fish > "$pkgdir"/usr/share/fish/vendor_functions.d/deno.fish
44   install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/