# https://github.com/bootc-dev/bootc/issues/1640 %if 0%{?fedora} || 0%{?rhel} >= 10 || 0%{?rust_minor} >= 89 %global new_cargo_macros 1 %else %global new_cargo_macros 0 %endif Name: cla-rust # Replaced by cargo xtask spec Version: 202510081906.g332dd68685 Release: 1%{?dist} Summary: OpenAI-compatible proxy for command-line assistant License: MIT OR Apache-2.0 URL: https://github.com/r0x0d/cla-rust Source0: cla-rust-202510081906.g332dd68685.tar.zstd Source1: cla-rust-202510081906.g332dd68685-vendor.tar.zstd %if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: cargo-rpm-macros >= 25 %endif BuildRequires: systemd %description CLAD (Command-Line Assistant Daemon) is an OpenAI-compatible proxy server that sits between Goose and the command-line-assistant backend. It translates between Goose's OpenAI-compatible chat completion API and the command-line-assistant's custom message/context API format. The package includes: - clad: The main proxy server daemon - c: A convenient CLI wrapper for goose commands %prep %autosetup -n %{name}-%{version} %cargo_vendor_manifest # Default -v vendor config doesn't support non-crates.io deps (i.e. git) cp .cargo/vendor-config.toml . %cargo_prep -N cat vendor-config.toml >> .cargo/config.toml rm vendor-config.toml %build # Build the main bootc binary %cargo_build # https://pagure.io/fedora-rust/rust-packaging/issue/33 sed -i -e '/https:\/\//d' cargo-vendor.txt %cargo_license_summary %{cargo_license} > LICENSE.dependencies %install # Install binaries install -D -m 0755 target/release/clad %{buildroot}%{_bindir}/clad install -D -m 0755 target/release/c %{buildroot}%{_bindir}/c # Install example configuration file install -D -m 0644 crates/clad/config.toml.example %{buildroot}%{_datadir}/%{name}/config.toml # Create directory for user configurations install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name} %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %{_bindir}/clad %{_bindir}/c %{_datadir}/%{name}/config.toml.example %dir %{_sysconfdir}/%{name} %changelog * Tue Oct 07 2025 Rodolfo Olivieri - 0.1.0-1 - Initial package release - Includes clad proxy server and c CLI wrapper