%global debug_package %{nil}
%global gituser denoland
%global gitname deno
Name: deno
Version: 2.5.6
Release: 3%{?dist}
Summary: A secure JavaScript and TypeScript runtime
License: MIT
Group: Development/Language
URL: https://github.com/%{gituser}/%{gitname}
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{gituser}-%{name}-%{version}.tar.gz
# Patch1: %%{url}/pull/16588.patch#/update_crates_16588.patch
BuildRequires: rust-packaging protobuf-compiler cmake
BuildRequires: llvm-devel clang-devel
BuildRequires: devscripts
%description
Deno is a simple, modern and secure runtime for JavaScript and
TypeScript that uses V8 and is built in Rust.
%prep
%autosetup -p1 -n %{name}-%{version}
%build
%set_build_flags
# export CFLAGS=$(echo "$CFLAGS -Wno-error=implicit-function-declaration")
# sed -i 's|lto = true|lto = "thin"|' Cargo.toml
export RUSTFLAGS="%{build_rustflags}"
# SSE4.2 + POPCNT
export RUSTFLAGS=$(echo "$RUSTFLAGS -C target-cpu=x86-64-v2" | sed -e 's|debuginfo=2|debuginfo=0|')
cargo build --release --verbose --locked
%install
# control flow protection not supported
hardening-check -v --nocfprotection --nobranchprotection target/release/%{name}
install -Dm755 target/release/%{name} %{buildroot}%{_bindir}/%{name}
%files
%{_bindir}/%{name}
%doc README.md Releases.md
%license LICENSE.md
%changelog
* Sun Nov 09 2025 samoht0 2.5.6
- use x86-64-v2 target
* Sat Nov 01 2025 samoht0 2.5.6
- update 2.5.6
- history cleanup