Blob Blame History Raw
# Generated by go2rpm 1
%bcond_without check

# https://github.com/evanw/esbuild
%global goipath         github.com/evanw/esbuild
Version:                0.20.2

%gometa

%global common_description %{expand:
This is a JavaScript bundler and minifier. It packages up JavaScript and
TypeScript code for distribution on the web.}

%global golicenses      LICENSE.md
%global godocs          docs CHANGELOG.md README.md version.txt

Name:           %{goname}
Release:        %autorelease
Summary:        Fast JavaScript bundler and minifier

License:        MIT
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(golang.org/x/sys/unix)

%description
%{common_description}

%gopkg

%prep
%goprep

%build
for cmd in cmd/* ; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done

%install
%gopkginstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/

%if %{with check}
%check
# css_parser: failed on ppc64le and s390x.
%gocheck \
	-d internal/css_parser
%endif

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

%gopkgfiles

%changelog
%autochangelog