diff --git a/zellij.spec b/zellij.spec index 18dd501..d4eac5b 100644 --- a/zellij.spec +++ b/zellij.spec @@ -27,8 +27,8 @@ Source0: https://github.com/zellij-org/zellij/archive/refs/tags/v%{versio Source1: vendor.tar.gz Source2: cargo_config Source3: README.suse-maint.md +BuildRequires: rust+cargo >= 1.62 BuildRequires: cargo-packaging -BuildRequires: rust >= 1.60 ExclusiveArch: %{rust_tier1_arches} %if %{with test} BuildRequires: pkgconfig(openssl) @@ -46,8 +46,25 @@ language that compiles to WebAssembly. %autosetup -a1 mkdir -p .cargo cp %{SOURCE2} .cargo/config +# Remove prebuilt binaries +rm assets/plugins/* %build +# First rebuilt plugins we just deleted +# Note: RUSTFLAGS break linking with WASM-files, so we don't use the cargo_build-macro here +pushd default-plugins/status-bar +cargo --offline build --release --target=wasm32-wasi +popd +pushd default-plugins/tab-bar +cargo --offline build --release --target=wasm32-wasi +popd +pushd default-plugins/strider +cargo --offline build --release --target=wasm32-wasi +popd +# Move the results to the place they are expected +mv target/wasm32-wasi/release/*.wasm assets/plugins/ + +# Build zellij proper %{cargo_build} --all-features %install