%global _build_id_links none %global debug_package %{nil} %undefine source_date_epoch_from_changelog %global upstream_version 0.8.5 %global software_name sheldon Name: %{software_name} Version: %{upstream_version} Release: 1%{?dist} Summary: Fast, configurable, shell plugin manager License: MIT AND Apache-2.0 URL: https://github.com/rossmacarthur/sheldon # Source0 unpacks to sheldon-%%{upstream_version}/ (archive prefix set by the # vendoring workflow). Same filename/layout as the Debian orig tarball. Source0: %{software_name}_%{upstream_version}.orig.tar.gz # Vendored crates (Debian orig-vendor component: contents of vendor/ only). Source1: %{software_name}_%{upstream_version}.orig-vendor.tar.gz BuildRequires: tar, rust >= 1.81.0, cargo >= 1.81.0, gcc, git, openssl-devel, zlib-devel, pkgconf-pkg-config %description Sheldon is a fast, configurable, shell plugin manager for bash, zsh, fish, and other shells. %prep %autosetup -p1 -n %{software_name}-%{upstream_version} # Use vendored crates to minimize network access during build. # Source1 is a Debian-style orig-vendor component (contents of vendor/ only). mkdir -p vendor tar -xf %{SOURCE1} -C vendor if [ ! -d vendor ]; then echo "ERROR: vendor/ directory not found. Provide a vendored crates tarball via Source1." >&2 exit 1 fi %build export CARGO_HOME="$PWD/.cargo-home" export LIBZ_SYS_STATIC=0 export RUSTFLAGS="-C link-arg=-Wl,--as-needed" cargo build --release --frozen --offline %install install -Dsm755 target/release/%{software_name} %{buildroot}%{_bindir}/%{software_name} %check %files %license LICENSE-MIT LICENSE-APACHE %doc README.md %{_bindir}/%{software_name} %changelog