diff --git a/SPECS/cri-tools.spec b/SPECS/cri-tools.spec index ce31ee4..3fdec78 100644 --- a/SPECS/cri-tools.spec +++ b/SPECS/cri-tools.spec @@ -4,34 +4,37 @@ Version: 1.31.1 %define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**}; -%bcond_with check +%bcond_without check + + +%global forgeurl https://github.com/kubernetes-sigs/cri-tools -%global built_tag v%{version} -%global provider github -%global provider_tld com -%global project kubernetes-sigs %global repo cri-tools %global import_path sigs.k8s.io/%{repo} +%gometa -f + Name: %{repo} Release: 1%{?dist} Summary: CLI and validation tools for Container Runtime Interface License: ASL 2.0 URL: https://%{goipath} Source0: %url/archive/v%{version}/%{name}-%{version}.tar.gz -# no ppc64 -ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm} ppc64le s390x} +ExclusiveArch: %{golang_arches} # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: golang BuildRequires: glibc-static BuildRequires: git +BuildRequires: go-rpm-macros Provides: crictl = %{version}-%{release} %description %{summary} +%gopkg + %prep -%autosetup -p1 -n %{name}-%{version} +%autosetup -n %{name}-%{version} %build mkdir _build @@ -56,12 +59,22 @@ install -p -m 755 ./bin/crictl %{buildroot}%{_bindir} install -dp %{buildroot}%{_mandir}/man1 install -p -m 644 docs/crictl.1 %{buildroot}%{_mandir}/man1 +# install completions +install -dp %{buildroot}%{_datadir}/bash-completion/completions/ +install -p -m 644 docs/crictl-completions %{buildroot}%{_datadir}/bash-completion/completions/crictl + +%check +%gocheck + + %files %license LICENSE %doc CHANGELOG.md CONTRIBUTING.md OWNERS README.md RELEASE.md code-of-conduct.md %doc docs/{benchmark.md,roadmap.md,validation.md} %{_bindir}/crictl %{_mandir}/man1/crictl* +%{_datadir}/bash-completion/completions/crictl + %changelog * Fri Oct 25 2024 Dennis Gilmore - 1.31.1-1