Accepting request 989072 from home:dziobian:gulgul-ultron
- Use recommended flags - Add Fedora build - Add remove-version-check.patch to make the package more usable as a build require OBS-URL: https://build.opensuse.org/request/show/989072 OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/esbuild?expand=0&rev=33
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 13 22:29:58 UTC 2022 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||
|
||||
- Use recommended flags
|
||||
- Add Fedora build
|
||||
- Add remove-version-check.patch to make the package more usable as a build require
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 18 15:41:13 UTC 2022 - Avindra Goolcharan <avindra@opensuse.org>
|
||||
|
||||
|
38
esbuild.spec
38
esbuild.spec
@@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
Name: esbuild
|
||||
Version: 0.14.36
|
||||
Release: 0
|
||||
@@ -25,24 +26,47 @@ 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
|
||||
Patch0: remove-version-check.patch
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: golang
|
||||
BuildRequires: go-rpm-macros
|
||||
%else
|
||||
BuildRequires: golang(API)
|
||||
BuildRequires: golang-packaging
|
||||
%endif
|
||||
BuildRequires: util-linux
|
||||
|
||||
#macros for Fedora
|
||||
%global goipath github.com/evanw/esbuild
|
||||
%global tag v%{version}
|
||||
%global extractdir0 esbuild-%version
|
||||
|
||||
|
||||
%description
|
||||
esbuild is a JavaScript bundler and minifier.
|
||||
|
||||
%gopkg
|
||||
|
||||
%prep
|
||||
%autosetup -a1
|
||||
%autosetup -a1 -p1
|
||||
|
||||
%build
|
||||
go build -ldflags "-s -w" -mod vendor -v \
|
||||
%ifnarch riscv64 ppc64
|
||||
-buildmode=pie \
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags}"
|
||||
|
||||
|
||||
%if 0%{?fedora}
|
||||
%goprep -k -e
|
||||
%gobuild ./cmd/esbuild
|
||||
%else
|
||||
%goprep .
|
||||
go build -v -p 4 -x -buildmode=pie -mod vendor ./cmd/esbuild
|
||||
%endif
|
||||
./cmd/esbuild
|
||||
|
||||
|
||||
|
||||
%install
|
||||
install -Dm755 esbuild %{buildroot}/%{_bindir}/%{name}
|
||||
install -pvDm755 %name "%{buildroot}/%{_bindir}/%{name}"
|
||||
|
||||
%files
|
||||
%license LICENSE.md
|
||||
|
13
remove-version-check.patch
Normal file
13
remove-version-check.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Disable version check. This is needed so that downstream packages which may bundle different versions of
|
||||
the esbuild client library can be built at all.
|
||||
|
||||
--- a/cmd/esbuild/main.go
|
||||
+++ b/cmd/esbuild/main.go
|
||||
@@ -189,7 +189,6 @@
|
||||
logger.PrintErrorToStderr(osArgs,
|
||||
fmt.Sprintf("Cannot start service: Host version %q does not match binary version %q",
|
||||
hostVersion, esbuildVersion))
|
||||
- os.Exit(1)
|
||||
}
|
||||
|
||||
case strings.HasPrefix(arg, "--ping"):
|
Reference in New Issue
Block a user