File deno.spec of Package deno

# spec file for package deno
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2020-2021 Avindra Goolcharan <>
# Copyright (c) 2018-2021 the Deno authors
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           deno
Version:        1.12.2
Release:        0
Summary:        A secure JavaScript and TypeScript runtime
License:        MIT
Group:          Productivity/Other
Source0:        %{name}-%{version}.tar.xz
Source1:        vendor.tar.xz
BuildRequires:  clang
# gcc-c++ needed to build SPIRV-Cross
BuildRequires:  gcc-c++
BuildRequires:  gn
BuildRequires:  lld
BuildRequires:  llvm
BuildRequires:  ninja
BuildRequires:  pkgconfig
BuildRequires:  python
BuildRequires:  python2-setuptools
BuildRequires:  rust >= 1.53.0
BuildRequires:  rust-packaging
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gmodule-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gthread-2.0)
# deno does not build on 32-bit archs
ExclusiveArch:  x86_64 aarch64 ppc64 ppc64le s390x

A JavaSript and TypeScript platform built on V8 with sandboxed defaults.

Deno has standard modules and comes with various utilities like
a linter, a language server protocol, a code formatter and
a unit test runner.

Remote code is fetched and cached on first execution, and only
updated with the --reload flag.

%autosetup -a1 -p1
%define cargo_registry $(pwd)/vendor

export V8_FROM_SOURCE=1
export CLANG_BASE_PATH=%{_prefix}
export GN_ARGS="enable_nacl = false blink_symbol_level = 0"
# enable binary stripping
export RUSTFLAGS="%{__global_rustflags} -Clink-arg=-s"

# place deno cli manually (cannot cargo install)
mkdir -p %{buildroot}%{_bindir}
cp target/release/deno %{buildroot}%{_bindir}


openSUSE Build Service is sponsored by