# NOTE: This package requires "Enable internet access during builds" in COPR # settings — the build bootstraps rustup and cargo fetches crates over the network. %global debug_package %{nil} Name: zellij Version: 0.44.3 Release: 2%{?dist} Summary: A terminal workspace and multiplexer License: MIT URL: https://github.com/zellij-org/zellij Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # We build with rustup (not Fedora's rust/cargo) so the compiler version is # driven by the source tree's rust-toolchain.toml. This lets the package track # the latest stable zellij without coordinating with whatever Rust the Fedora # chroot happens to ship (latest zellij needs Rust newer than Fedora's). BuildRequires: rustup BuildRequires: gcc BuildRequires: cmake BuildRequires: git BuildRequires: pkgconfig(openssl) %description Zellij is a terminal workspace and multiplexer with a layout and plugin system. Its default plugins ship as prebuilt WebAssembly assets in the source tree, so only the main binary is compiled here (no wasm toolchain required). %prep %autosetup -n %{name}-%{version} %build # Toolchain bootstrap and build happen in %%install (see below). %install export RUSTUP_HOME=%{_builddir}/.rustup export CARGO_HOME=%{_builddir}/.cargo export PATH="${CARGO_HOME}/bin:${PATH}" # Link against the chroot's system OpenSSL (pulled in via BuildRequires: # pkgconfig(openssl)) instead of letting the openssl-sys crate vendor and # compile its own copy. The vendored build runs OpenSSL's ./Configure, whose # perl needs FindBin.pm — not present in the minimal mock chroot — so it fails # with "Can't locate FindBin.pm in @INC". Using the system lib also skips # compiling OpenSSL from source entirely, which is faster. export OPENSSL_NO_VENDOR=1 # Read the Rust channel this release pins (rust-toolchain.toml, currently # "1.92.0") and install exactly that with rustup. Reading it from the source # tree means bumping Version above is all it takes to follow a new zellij — the # build never depends on whatever Rust the Fedora chroot ships. We then remove # the file and pin the toolchain explicitly, so cargo doesn't also try to add # the wasm32/musl targets it lists (we only build the host binary). toolchain="$(sed -n 's/^[[:space:]]*channel[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' rust-toolchain.toml)" rm -f rust-toolchain.toml rustup-init -y --no-modify-path --profile minimal --default-toolchain none rustup toolchain install "${toolchain}" --profile minimal rustup default "${toolchain}" # Build only the zellij binary crate; the default plugins are embedded from the # prebuilt .wasm under zellij-utils/assets, so the wasm32 target is never built. RUSTFLAGS='-C strip=symbols' cargo install --locked --root=%{buildroot}%{_prefix} --path . # Remove cargo bookkeeping created by `cargo install` rm -f %{buildroot}%{_prefix}/.crates.toml rm -f %{buildroot}%{_prefix}/.crates2.json # Shell completions, generated by the freshly built binary mkdir -p %{buildroot}%{_datadir}/bash-completion/completions mkdir -p %{buildroot}%{_datadir}/zsh/site-functions mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d %{buildroot}%{_bindir}/%{name} setup --generate-completion bash > %{buildroot}%{_datadir}/bash-completion/completions/%{name} %{buildroot}%{_bindir}/%{name} setup --generate-completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_%{name} %{buildroot}%{_bindir}/%{name} setup --generate-completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish %files %license LICENSE.md %doc README.md %{_bindir}/%{name} %{_datadir}/bash-completion/completions/%{name} %{_datadir}/zsh/site-functions/_%{name} %{_datadir}/fish/vendor_completions.d/%{name}.fish %changelog * Sun Jun 28 2026 Hypercube - 0.44.3-2 - Set OPENSSL_NO_VENDOR=1 so openssl-sys links the chroot's system OpenSSL instead of vendoring its own copy, which failed to configure (missing perl FindBin.pm in the minimal mock chroot) * Wed Jun 24 2026 Hypercube - 0.44.3-1 - Initial package for Hypercube - Build with rustup-managed toolchain (per upstream rust-toolchain.toml) so the package tracks the latest stable zellij regardless of Fedora's Rust version