File esbuild.spec of Package esbuild

#
# spec file for package esbuild
#
# Copyright (c) 2021 SUSE LLC
#
# 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:           esbuild
Version:        0.14.9
Release:        0
Summary:        A JavaScript bundler written for speed
License:        MIT
Group:          Development/Languages/Other
URL:            https://esbuild.github.io
Source0:        https://github.com/evanw/esbuild/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        vendor.tar.xz
BuildRequires:  golang(API) >= 1.13
BuildRequires:  golang-packaging

%description
esbuild is a JavaScript bundler and minifier.

%prep
%autosetup -a1

%build
go build -ldflags "-s -w" -mod vendor -v \
%ifnarch riscv64 ppc64
	-buildmode=pie \
%endif
	./cmd/esbuild

%install
install -Dm755 esbuild %{buildroot}/%{_bindir}/%{name}

%files
%license LICENSE.md
%doc CHANGELOG.md README.md
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by