2021-01-26 17:32:04 +01:00
|
|
|
#
|
|
|
|
# spec file for package deno
|
|
|
|
#
|
|
|
|
# Copyright (c) 2021 SUSE LLC
|
|
|
|
# Copyright (c) 2020-2021 Avindra Goolcharan <avindra@opensuse.org>
|
2021-02-05 23:00:49 +01:00
|
|
|
# Copyright (c) 2018-2021 the Deno authors
|
2021-01-26 17:32:04 +01:00
|
|
|
#
|
|
|
|
# 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
|
2021-07-04 03:19:59 +02:00
|
|
|
Version: 1.11.5
|
2021-01-26 17:32:04 +01:00
|
|
|
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
|
2021-07-04 08:16:26 +02:00
|
|
|
# new icu data file
|
|
|
|
Source2: https://github.com/denoland/deno/raw/main/core/icudtl.dat
|
2021-01-26 17:32:04 +01:00
|
|
|
Source99: revendor_source.sh
|
2021-06-19 20:11:46 +02:00
|
|
|
Patch0: deno-69.patch
|
2021-07-04 07:18:30 +02:00
|
|
|
Patch1: ff-serde.patch
|
2021-01-26 17:32:04 +01:00
|
|
|
BuildRequires: clang
|
2021-03-03 01:10:36 +01:00
|
|
|
# gcc-c++ needed to build SPIRV-Cross
|
|
|
|
BuildRequires: gcc-c++
|
2021-01-26 17:32:04 +01:00
|
|
|
BuildRequires: gn
|
|
|
|
BuildRequires: lld
|
|
|
|
BuildRequires: llvm
|
|
|
|
BuildRequires: ninja
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: python
|
|
|
|
BuildRequires: python2-setuptools
|
2021-07-04 04:16:14 +02:00
|
|
|
# TODO: enable this when it lands in Factory
|
|
|
|
# BuildRequires: rust >= 1.53.0
|
2021-01-26 17:32:04 +01:00
|
|
|
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
|
2021-01-27 18:27:48 +01:00
|
|
|
A JavaSript and TypeScript platform built on V8 with sandboxed defaults.
|
2021-01-26 17:32:04 +01:00
|
|
|
|
2021-01-27 18:27:48 +01:00
|
|
|
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.
|
2021-01-26 17:32:04 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -a1 -p1
|
|
|
|
%define cargo_registry $(pwd)/vendor
|
|
|
|
%{cargo_prep}
|
2021-07-04 08:16:26 +02:00
|
|
|
# refresh icu data file
|
|
|
|
cp %{SOURCE2} ./core
|
2021-01-26 17:32:04 +01:00
|
|
|
|
|
|
|
%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}
|
2021-05-13 04:33:06 +02:00
|
|
|
cp target/release/deno %{buildroot}%{_bindir}
|
2021-01-26 17:32:04 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE.md
|
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|