%global debug_package %{nil} %global git_tag RELEASE.2024-11-05T11-29-45Z Name: minio-mc Version: %(echo %{git_tag} | grep --only-matching --perl-regexp '\d{4}-\d{2}-\d{2}' | sed 's/-/./g') Release: 1%{?dist} Summary: Fast tool to manage MinIO clusters. License: AGPL-3.0 URL: https://github.com/minio/mc Source0: https://github.com/minio/mc/archive/refs/tags/%{git_tag}.tar.gz Patch0: go-pkg-checksum.patch ExclusiveArch: x86_64 BuildRequires: git BuildRequires: golang %description Fast tool to manage MinIO clusters. %prep %autosetup -n mc-%{git_tag} %build GO111MODULE=on CGO_ENABLED=0 go build -trimpath -tags kqueue \ --ldflags "-s -w -X github.com/minio/mc/cmd.Version=$(echo %{git_tag} | sed 's/^.*\.//')" \ -o mc %install install -D mc %{buildroot}%{_bindir}/mc %files %doc README.md %license LICENSE %attr(0755, -, -) %{_bindir}/mc %changelog %autochangelog