SHA256
2
1
forked from pool/deno

Accepting request 866954 from home:avindra:devel:languages:javascript

+deno

OBS-URL: https://build.opensuse.org/request/show/866954
OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=1
This commit is contained in:
2021-01-26 16:32:04 +00:00
committed by Git OBS Bridge
commit 93a36a1724
9 changed files with 497 additions and 0 deletions

79
deno.spec Normal file
View File

@@ -0,0 +1,79 @@
#
# spec file for package deno
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2020-2021 Avindra Goolcharan <avindra@opensuse.org>
#
# 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 https://bugs.opensuse.org/
#
Name: deno
Version: 1.7.0
Release: 0
Summary: A secure JavaScript and TypeScript runtime
License: MIT
Group: Productivity/Other
URL: https://github.com/denoland/deno
Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.xz
Source99: revendor_source.sh
BuildRequires: clang
BuildRequires: gn
BuildRequires: lld
BuildRequires: llvm
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: python
BuildRequires: python2-setuptools
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
%description
A JavaSript platform built on V8 with built-in TypeScript, with
secure, sandboxed defaults.
Supports and uses ES modules. Remote code is fetched and cached
on first execution, and only updated when deno run is called
with --reload.
%prep
%autosetup -a1 -p1
%define cargo_registry $(pwd)/vendor
%{cargo_prep}
%build
export V8_FROM_SOURCE=1
export CLANG_BASE_PATH=%{_prefix}
# https://www.chromium.org/developers/gn-build-configuration
export GN_ARGS="enable_nacl = false blink_symbol_level = 0"
# enable binary stripping
export RUSTFLAGS="%{__global_rustflags} -Clink-arg=-s"
%{cargo_build}
%install
# place deno cli manually (cannot cargo install)
mkdir -p %{buildroot}%{_bindir}
cp target/release/{deno,denort} %{buildroot}%{_bindir}
%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{name}rt
%changelog