File deno.spec of Package deno

#
# spec file for package deno
#
# copyright (c) 2025 munix9@googlemail.com
#

Name:           deno
Version:        2.5.6
Release:        0
Summary:        A modern runtime for JavaScript and TypeScript
License:        MIT
URL:            https://deno.com/
Source0:        https://github.com/denoland/deno/releases/download/v%{version}/%{name}-x86_64-unknown-linux-gnu.zip
Source1:        https://github.com/denoland/deno/releases/download/v%{version}/%{name}-x86_64-unknown-linux-gnu.zip.sha256sum
Source10:       https://raw.githubusercontent.com/denoland/deno/refs/tags/v%{version}/LICENSE.md
Source11:       https://raw.githubusercontent.com/denoland/deno/refs/tags/v%{version}/README.md
Source12:       https://raw.githubusercontent.com/denoland/deno/refs/tags/v%{version}/Releases.md
NoSource:       0
BuildRequires:  unzip
Provides:       %{name}-bash-completion = %{version}
Obsoletes:      %{name}-bash-completion < %{version}
Provides:       %{name}-fish-completion = %{version}
Obsoletes:      %{name}-fish-completion < %{version}
Provides:       %{name}-zsh-completion  = %{version}
Obsoletes:      %{name}-zsh-completion  < %{version}
ExclusiveArch:  x86_64

%description
Deno is a JavaScript, TypeScript, and WebAssembly runtime with
secure defaults and a great developer experience.
It's built on V8, Rust, and Tokio.

%prep
%setup -q -c -T
pushd %{_sourcedir}
sha256sum -c %{SOURCE1}
popd
unzip %{SOURCE0}

%build
# nop

%install
install -D -m 0755 -t %{buildroot}%{_bindir} %{name}
install -m 0644 -t . %{SOURCE10} %{SOURCE11} %{SOURCE12}

install -d -m 0755 %{buildroot}%{_datadir}/bash-completion/completions \
	%{buildroot}%{_datadir}/fish/vendor_completions.d \
	%{buildroot}%{_datadir}/zsh/site-functions
./%{name} completions bash > %{buildroot}%{_datadir}/bash-completion/completions/%{name}
./%{name} completions fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish
./%{name} completions zsh  > %{buildroot}%{_datadir}/zsh/site-functions/_%{name}

%check
./%{name} --version

%files
%license LICENSE.md
%doc README.md Releases.md
%{_bindir}/%{name}
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/%{name}
%dir %{_datadir}/fish
%dir %{_datadir}/fish/vendor_completions.d
%{_datadir}/fish/vendor_completions.d/%{name}.fish
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}

%changelog
openSUSE Build Service is sponsored by