File kubectl-browse-pvc.spec of Package failed_kubectl-browse-pvc

Name:           kubectl-browse-pvc
Version:        1.0.7
Release:        1.1
Summary:        kubectl plugin to browse PersistentVolumeClaims

License:        MIT
URL:            https://example.com/kubectl-browse-pvc
Source0:        %{name}-%{version}.tar.gz
Source1:        vendor.tar.gz

BuildRequires:  go >= 1.20
BuildRequires:  git

%description
A small kubectl plugin that helps browsing PersistentVolumeClaims (PVCs).

%prep
%setup -q

%build
# build statically without cgo
export CGO_ENABLED=0
mkdir -p bin
# remove buildmode=pie because pie requires cgo/external linking; building with CGO disabled fails with buildmode=pie
go build -mod=vendor -ldflags="-X main.Version=v%{version}" -o bin/kubectl-browse_pvc .

%install
rm -rf %{buildroot}
install -d %{buildroot}%{_bindir}
install -m 0755 bin/kubectl-browse_pvc %{buildroot}%{_bindir}/kubectl-browse_pvc

%files
%license LICENSE
%doc README.md
%{_bindir}/kubectl-browse_pvc

%changelog
* Mon Aug 11 2025 John Doe <jdoe@example.com> - 1.0.7-1.1
- Removed -buildmode=pie from build command to allow static build with CGO_DISABLED (fixes build error on riscv64)
openSUSE Build Service is sponsored by