diff --git a/deno/README.md b/deno/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fd0a036e45f625e0d88d1cf93d10b6e350e9adc8 --- /dev/null +++ b/deno/README.md @@ -0,0 +1,5 @@ +# # 注意 + ++ 该源代码中有`.rustfmt.toml`文件,该文件使得在编译过程中自动下载切换到合适的cargo版本,注意要装rustup + ++ diff --git a/deno/deno-1.19.1-1.x86_64.rpm b/deno/deno-1.19.1-1.x86_64.rpm new file mode 100644 index 0000000000000000000000000000000000000000..e75ed769a8e65e029bbdf38a76a761185764a1c4 Binary files /dev/null and b/deno/deno-1.19.1-1.x86_64.rpm differ diff --git a/deno/deno.spec b/deno/deno.spec new file mode 100644 index 0000000000000000000000000000000000000000..6b9188b7e56b79b28d6b966545d95c9698814b37 --- /dev/null +++ b/deno/deno.spec @@ -0,0 +1,59 @@ +%global deno_arches x86_64 i686 aarch64 +%global glibc_min_version 2.3.0 +%global libgcc_min_version 8.5.0 +%global cargo_min_version 1.58.1 +Name: deno +Version: 1.19.1 +Release: 1 +Summary: A secure runtime for JavaScript and TypeScript +License: MIT +URL: https://deno.land +Source0: https://github.com/denoland/deno/releases/download/v{version}/deno_src.tar.gz +ExclusiveArch: %{deno_arches} +# BuildRequires: cargo >= %%{cargo_min_version} +BuildRequires: cargo +BuildRequires: python3 +Requires: glibc >= %{glibc_min_version} +Requires: libgcc >= %{libgcc_min_version} + +%description +Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. +Secure by default. No file, network, or environment access, unless explicitly enabled. +Supports TypeScript out of the box. +Ships only a single executable file. +Has built-in utilities like a dependency inspector (deno info) and a code formatter (deno fmt). +Has a set of reviewed (audited) standard modules that are guaranteed to work with Deno: deno.land/std +Has a number of companies interested in using and exploring Deno + +%prep +%setup -q -n deno + + +%build +cargo build --release --locked + +%install +mkdir -p %{buildroot}/%{_bindir} +install -Dm755 target/release/deno %{buildroot}/%{_bindir}/deno + +install -dm755 %{buildroot}/usr/share/bash-completion/completions +./target/release/deno completions bash > %{buildroot}/usr/share/bash-completion/completions/deno + +# install -dm755 %%{buildroot}/usr/share/zsh/site-functions +# ./target/release/deno completions zsh > %%{buildroot}/usr/share/zsh/site-functions/_deno + +# install -dm755 %%{buildroot}/usr/share/fish/vendor_functions.d +# ./target/release/deno completions fish > %%{buildroot}/usr/share/fish/vendor_functions.d/deno.fish + +%check +./target/release/deno run ./cli/tests/testdata/002_hello.ts + +%files +%license LICENSE.md +%{_bindir}/deno +%{_datadir}/bash-completion/completions/deno +# %%{share}/zsh/site-functions/_deno +# %%{share}/fish/vendor_functions.d/deno.fish +%changelog +* Thu Mar 3 2022 csmsoledad <2584139809@qq.com> - 1.19.1 +- Package init diff --git a/deno/deno_src.tar.gz b/deno/deno_src.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..191629dde3b52b22e868c05517dcfed2fa20ea44 Binary files /dev/null and b/deno/deno_src.tar.gz differ