From 1a9b128dd74d080218f922516968af2065297452 Mon Sep 17 00:00:00 2001 From: Sergey Zhemoitel Date: Sat, 19 Sep 2020 13:12:24 +0300 Subject: [PATCH] Imported from SRPM --- .abf.yml | 2 ++ minio-client.spec | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .abf.yml create mode 100644 minio-client.spec diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..dd958e7 --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + mc-RELEASE.2020-09-18T00-13-21Z.tar.gz: 1308dbb092c0dca237006b13a75a35e7033b2440 diff --git a/minio-client.spec b/minio-client.spec new file mode 100644 index 0000000..f82658e --- /dev/null +++ b/minio-client.spec @@ -0,0 +1,44 @@ +%define debug_package %nil +%define oname mc +%define rel 2020-09-18T00-13-21Z +%define ver RELEASE +%define commit 0c1f1e29f107446a638cec50aca1ea37e4490393 +%define shortcommit %(c=%{commit}; echo ${c:0:12}) + +Name: minio-client +Version: 20200918 +Release: 1 +Summary: MinIO client +License: ASL 2.0 +URL: https://min.io/ +Source0: https://github.com/minio/mc/archive/RELEASE.%{rel}/%{oname}-%{ver}.%{rel}.tar.gz +Group: Development/Other +BuildRequires: golang >= 1.13 +BuildRequires: git-core +BuildRequires: upx + +%description +MinIO Client is a replacement for ls, cp, mkdir, diff and +rsync commands for filesystems and object storage. + +%prep +%setup -qn %{oname}-RELEASE.%{rel} + +%build +#make BUILD_LDFLAGS="-X cmd.Version=RELEASE.%{rel}" +GO111MODULE=on CGO_ENABLED=0 go build -trimpath -tags kqueue \ + -ldflags="-s -w \ + -X github.com/minio/mc/cmd.Version=%{ver} \ + -X github.com/minio/mc/cmd.ReleaseTag=%{ver}.%{rel} \ + -X github.com/minio/mc/cmd.CommitID=%{commit} \ + -X github.com/minio/mc/cmd.ShortCommitID=%{shortcommit}" \ + -o bin/%{name} +upx bin/%{name} + +%install +install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name} + +%files +%doc README.md LICENSE docs +%{_bindir}/%{name} +