s5cmd/s5cmd.spec
2024-12-19 11:55:18 +00:00

45 lines
1.1 KiB
RPMSpec

%define debug %nil
%define debug_package %nil
Name: s5cmd
Version: 2.3.0
Release: 1
Summary: Parallel S3 and local filesystem execution tool
URL: https://github.com/peak/s5cmd
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
License: MIT
Group: Development/Other
BuildRequires: go
BuildRequires: git-core
BuildRequires: upx
BuildRequires: pkgconfig(openssl3.3)
%description
s5cmd is a very fast S3 and local filesystem execution tool.
It comes with support for a multitude of operations
including tab completion and wildcard support for files,
which can be very handy for your object storage workflow
while working with large number of files.
%prep
%setup -q
sed -i 's/v0.0.0/%{version}/' version/version.go
sed -i 's/dev/ROSA/' version/version.go
%build
export GOPROXY=direct
#make build
CGO_ENABLED=0 go build ${GCFLAGS} \
-ldflags "-s -w -X github.com/peak/s5cmd/version.Version=%{version} -X github.com/peak/s5cmd/version.GitCommit=%{vendor}" \
-mod=vendor .
upx %{name}
%install
install -Dm0755 %{name} %{buildroot}%{_bindir}/%{name}
%files
%doc README.md LICENSE
%{_bindir}/%{name}