File cargo-trunk.spec of Package cargo-trunk
Name: cargo-trunk
Version: v0.21.14
Release: 0
Summary: Build, bundle & ship your Rust WASM application to the web
License: MIT OR Apache-2.0
URL: https://github.com/trunk-rs/trunk
Source0: trunk-%{version}.tar.xz
Source1: vendor.tar.xz
BuildRequires: cargo
BuildRequires: gcc
BuildRequires: rust >= 1.81.0
%description
Trunk is a tool for building, bundling, and shipping Rust WASM applications to
the web.
%prep
%autosetup -n trunk-%{version} -a1
%build
export CARGO_HOME=$PWD/.cargo
mkdir -p "$CARGO_HOME"
# Disable the crates.io update check feature (runtime network access) while
# keeping rustls for HTTPS support.
cargo build \
--release \
--frozen \
--no-default-features \
--features rustls
%install
install -D -m 0755 target/release/trunk %{buildroot}%{_bindir}/trunk
%check
# Upstream tests rely on network and toolchain components (wasm-bindgen, etc.)
# not available in the constrained build environment.
%files
%license LICENSE*
%doc README.md
%{_bindir}/trunk