File minio-mc.spec of Package minio-mc
#
# spec file for package minio-mc
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: minio-mc
Version: 20241121T172154Z
Release: 0
Summary: Console client for MinIO High Performance Object Storage
License: AGPL-3.0-only
Group: Productivity/Databases/Servers
URL: https://min.io/
Source: %{name}-%{version}.tar.xz
Source1: vendor.tar.xz
BuildRequires: fdupes
BuildRequires: go >= 1.17
BuildRequires: golang-packaging >= 15.0.8
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
MinIO Client (mc) provides a modern alternative to UNIX commands like ls, cat,
cp, mirror, diff, find etc. It supports filesystems and Amazon S3 compatible
cloud storage service (AWS Signature v2 and v4).
%prep
%setup -q
%setup -q -T -D -a 1
%build
export GO111MODULE=on
export MINIO_VERSION=$(echo %{version} | sed -e 's/\(....\)\(..\)\(..\)T\(..\)\(..\)\(..\)Z/\1-\2-\3T\4:\5:\6Z/g')
%goprep github.com/minio/mc
%gobuild -mod=vendor -ldflags="-X github.com/minio/mc/cmd.Version=${MINIO_VERSION} -X github.com/minio/mc/cmd.ReleaseTag=RELEASE.${MINIO_VERSION}" ...
%install
install -D -m 0755 %{_builddir}/go/bin/mc %{buildroot}%{_bindir}/mc
%check
%gotest github.com/minio/mc
%files
%defattr(-,root,root)
%license LICENSE
%doc README.md README_zh_CN.md NOTICE
%{_bindir}/mc
%changelog