package created using the webbuild interface [release 0.27.3-1mamba;Sat Feb 28 2026]
This commit is contained in:
74
esbuild.spec
Normal file
74
esbuild.spec
Normal file
@@ -0,0 +1,74 @@
|
||||
Name: esbuild
|
||||
Version: 0.27.3
|
||||
Release: 1mamba
|
||||
Summary: An extremely fast bundler for the web
|
||||
Group: Development/Tools
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan@openmamba.org>
|
||||
URL: https://esbuild.github.io/
|
||||
Source: https://github.com/evanw/esbuild.git/v%{version}/esbuild-%{version}.tar.bz2
|
||||
License: MIT
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: go
|
||||
|
||||
%description
|
||||
An extremely fast bundler for the web.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
export CGO_CPPFLAGS="%{optflags}"
|
||||
export CGO_CFLAGS="%{optflags}"
|
||||
export CGO_CXXFLAGS="%{optflags}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
|
||||
go build \
|
||||
-trimpath \
|
||||
-buildmode=pie \
|
||||
-mod=readonly \
|
||||
-modcacherw \
|
||||
-ldflags "-linkmode external" \
|
||||
./cmd/esbuild
|
||||
|
||||
# Generate npm/esbuild/*
|
||||
node scripts/esbuild.js ./esbuild --neutral
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
|
||||
|
||||
# Detect node platform name (e.g., "linux-x64")
|
||||
node_platform=$(node -p 'process.platform + "-" + process.arch')
|
||||
node_dir="%{buildroot}%{_prefix}/lib/node_modules"
|
||||
npm_dir="${node_dir}/${pkgname}"
|
||||
install -D -m0755 -d ${npm_dir}/lib
|
||||
install -D -m0644 -t ${npm_dir}/lib npm/esbuild/lib/main.d.ts
|
||||
install -D -m0644 -t ${npm_dir}/lib npm/esbuild/lib/main.js
|
||||
install -D -m0644 -t ${npm_dir} npm/esbuild/package.json
|
||||
|
||||
# Install the @esbuild/platform module
|
||||
install -m755 -d ${node_dir}/@esbuild/${node_platform}/bin
|
||||
ln -s /usr/bin/esbuild ${node_dir}/@esbuild/${node_platform}/bin/esbuild
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/esbuild
|
||||
%dir %{_prefix}/lib/node_modules/@esbuild
|
||||
%dir %{_prefix}/lib/node_modules/@esbuild/linux-*
|
||||
%dir %{_prefix}/lib/node_modules/@esbuild/linux-*/bin
|
||||
%{_prefix}/lib/node_modules/@esbuild/linux-*/bin/esbuild
|
||||
%{_prefix}/lib/node_modules/lib/main.d.ts
|
||||
%{_prefix}/lib/node_modules/lib/main.js
|
||||
%{_prefix}/lib/node_modules/package.json
|
||||
%doc LICENSE.md
|
||||
|
||||
%changelog
|
||||
* Sat Feb 28 2026 Silvan Calarco <silvan@openmamba.org> 0.27.3-1mamba
|
||||
- package created using the webbuild interface
|
||||
Reference in New Issue
Block a user