mirror of
https://abf.rosa.ru/djam/esbuild.git
synced 2025-02-23 14:22:54 +00:00
52 lines
No EOL
975 B
RPMSpec
52 lines
No EOL
975 B
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
%define secscan 0
|
|
|
|
Name: esbuild
|
|
Version: 0.25.0
|
|
Release: 1
|
|
Summary: An extremely fast bundler for the web
|
|
URL: https://esbuild.github.io
|
|
Source0: https://github.com/evanw/esbuild/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
License: MIT
|
|
Group: Development/Other
|
|
BuildRequires: go
|
|
BuildRequires: git-core
|
|
BuildRequires: upx
|
|
BuildRequires: pkgconfig(openssl3.3)
|
|
|
|
%if %{secscan}
|
|
BuildRequires: clamav
|
|
BuildRequires: trivy
|
|
%endif
|
|
|
|
%description
|
|
An extremely fast bundler for the web
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%if %{secscan}
|
|
clamscan -ir .
|
|
trivy fs --scanners vuln --format cosign-vuln .
|
|
%endif
|
|
|
|
%build
|
|
export GOPROXY=direct
|
|
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/%{name} ./cmd/esbuild
|
|
upx bin/%{name}
|
|
|
|
%install
|
|
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
%files
|
|
%doc README.md LICENSE.md docs
|
|
%{_bindir}/%{name}
|
|
|
|
%check
|
|
export GOPROXY=direct
|
|
go test ./...
|
|
|
|
%if %{secscan}
|
|
clamscan -ir %{buildroot}
|
|
%endif |