From c2785f5f9fc0da9c19ed5887f0121443349ae6dc Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 5 Dec 2025 00:38:11 -0800 Subject: [PATCH] add: carapace (#8076) (#8078) * add: carapace * midnight passed lol --------- (cherry picked from commit 1c7bc06f40479a72d968218a7c9b345df3a71b1e) Signed-off-by: Owen-sz Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/tools/carapace/anda.hcl | 5 ++++ anda/tools/carapace/carapace.spec | 49 +++++++++++++++++++++++++++++++ anda/tools/carapace/update.rhai | 1 + 3 files changed, 55 insertions(+) create mode 100644 anda/tools/carapace/anda.hcl create mode 100644 anda/tools/carapace/carapace.spec create mode 100644 anda/tools/carapace/update.rhai diff --git a/anda/tools/carapace/anda.hcl b/anda/tools/carapace/anda.hcl new file mode 100644 index 0000000000..fb3498abe1 --- /dev/null +++ b/anda/tools/carapace/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "carapace.spec" + } +} diff --git a/anda/tools/carapace/carapace.spec b/anda/tools/carapace/carapace.spec new file mode 100644 index 0000000000..6faa5fccb7 --- /dev/null +++ b/anda/tools/carapace/carapace.spec @@ -0,0 +1,49 @@ +%define debug_package %{nil} + +%global goipath github.com/carapace-sh/carapace-bin +Version: 1.5.5 + +%gometa -f + +Name: carapace +Release: 1%?dist +Summary: A multi-shell completion binary + +License: MIT +URL: https://carapace.sh/ +Source0: https://github.com/carapace-sh/carapace-bin/archive/refs/tags/v%{version}.tar.gz + +Packager: Owen Zimmerman + +BuildRequires: golang gcc go-rpm-macros +Requires: glibc + +%description +%{summary}. + +%gopkg + +%prep +%autosetup -n %{name}-bin-%{version} + +%build +%define gomodulesmode GO111MODULE=on +export CGO_CPPFLAGS="${CPPFLAGS}" +export CGO_CFLAGS="${CFLAGS}" +export CGO_CXXFLAGS="${CXXFLAGS}" +export CGO_LDFLAGS="${LDFLAGS}" +export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" +go generate ./cmd/... +%gobuild -o %{gobuilddir}/cmd/carapace %{goipath}/cmd/carapace + +%install +install -Dm 0755 %{gobuilddir}/cmd/carapace %{buildroot}%{_bindir}/carapace + +%files +%license LICENSE +%doc README.md +%{_bindir}/carapace + +%changelog +* Fri Dec 05 2025 Owen Zimmerman +- Initial commit diff --git a/anda/tools/carapace/update.rhai b/anda/tools/carapace/update.rhai new file mode 100644 index 0000000000..2351508732 --- /dev/null +++ b/anda/tools/carapace/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("carapace-sh/carapace-bin"));