# Generated by rust2rpm 27 %undefine __brp_mangle_shebangs %define debug_package %{nil} # no debuginfo in the compiled objects either — nothing consumes it and it # is a large share of compile time on big dependency trees %define rustflags_debuginfo 0 %bcond check 0 %global crate starship Name: starship Version: 1.26.0 Release: 1%{?dist} Summary: Minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️ License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-3-Clause AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND ISC AND MIT AND (MIT AND Apache-2.0) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND Unlicense AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) URL: https://crates.io/crates/starship # the crates.io download URL spelled out: mock fetches sources at SRPM-build # time, before any buildroot macro exists Source0: https://static.crates.io/crates/%{crate}/%{crate}-%{version}.crate BuildRequires: cargo-rpm-macros >= 24 BuildRequires: cmake BuildRequires: mold # compilation cache server — its cache dir lives on the workspace via the # mock config's bind mount, shared across all rust source builds BuildRequires: sccache BuildRequires: git-core # Old devel packages Obsoletes: rust-starship+gix-faster-devel < 1.23.0 Obsoletes: rust-starship+gix-features-devel < 1.23.0 Obsoletes: rust-starship+gix-max-perf-devel < 1.23.0 Obsoletes: rust-starship+libz-ng-sys-devel < 1.23.0 %global _description %{expand: The minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️.} %description %{_description} %files %license LICENSE %license LICENSE.dependencies %doc README.md %{_bindir}/starship %prep %autosetup -n %{crate}-%{version} -p1 cargo add log@=0.4.22 # online-cargo build config — replaces terra's %%cargo_prep_online_sccache # (anda-srpm-macros is no longer a build input). Same shape: the [profile.rpm] # the Fedora cargo macros build with, the redhat flag env, sccache as the # rustc wrapper, the install root — with no [net] offline and no # local-registry replacement, so crates fetch from crates.io at build time. %{expand:%{!?_cargo_home:%%global _cargo_home %{rpmbuilddir}%{?buildsubdir:/%{buildsubdir}}/.cargo}} %global __sccache %{_bindir}/sccache mkdir -p %{_cargo_home} target/rpm ln -s rpm target/release cat > %{_cargo_home}/config.toml <<'EOF' [profile.rpm] inherits = "release" opt-level = %{rustflags_opt_level} codegen-units = %{rustflags_codegen_units} debug = %{rustflags_debuginfo} strip = "none" [build] rustc = "%__rustc" rustdoc = "%__rustdoc" rustc-wrapper = "%__sccache" [env] CFLAGS = "%build_cflags" CXXFLAGS = "%build_cxxflags" LDFLAGS = "%build_ldflags" [install] root = "%buildroot%{_prefix}" [term] verbose = true EOF rm -f Cargo.toml.orig %{expand:%global __cargo /usr/bin/env CARGO_HOME=%{_cargo_home} RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' /usr/bin/cargo} %build # cache dir on the workspace bind mount (see mock config) — survives across # builds and is shared by every rust source build export SCCACHE_DIR=/sccache # license reports (terra's cargo_license_*_online logic, inline): the # cargo-to-rpm license commands hardcode --offline, which breaks the # online build %{__cargo} tree -Z avoid-dev-deps --workspace --edges no-build,no-dev,no-proc-macro \ --no-dedupe --target all --prefix none --format "# {l}" | sort -u %{__cargo} tree -Z avoid-dev-deps --workspace --edges no-build,no-dev,no-proc-macro \ --no-dedupe --target all --prefix none --format "{l}: {p}" \ | sed -e "s: (proc-macro)::" | sort -u > LICENSE.dependencies %install export SCCACHE_DIR=/sccache %cargo_install -- --locked # the crate is a lib+bin crate, so cargo_install copies the crate # source into the cargo registry for a -devel subpackage; the devel # subpackages are dropped here (plain package names, bin-only), so # the registry copy goes with them rm -rf %{buildroot}%{_datadir}/cargo/registry/%{crate}-%{version} %if %{with check} %check %cargo_test %endif %changelog * Thu Sep 24 2026 ahsan - 1.26.0-1 - source build matching terra's rust2rpm spec (was: release-binary wrapper)