Группа :: Работа с файлами
Пакет: minio-mc
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%global import_path github.com/minio/mc
%global commit 4b4cab0441f000db100c5b5d9329221181bf61f2
%global shortcommit %(c=%{commit}; echo ${c:0:12})
%global tag RELEASE.2023-05-18T16-59-00Z
%define version 2023.05.18
%global _unpackaged_files_terminate_build 1
Name: minio-mc
Version: %version
Release: alt1
Summary: Minio Client for filesystems and object storage
Group: File tools
License: AGPL-3.0
Url: https://www.min.io/
Source: %name-%version.tar
Patch: %name-%version.patch
ExclusiveArch: %go_arches
BuildRequires(pre): rpm-build-golang
%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
%patch -p1
%build
export BUILDDIR="$PWD/.gopath"
export IMPORT_PATH="%import_path"
export GOPATH="$BUILDDIR:%go_path"
export GOFLAGS="-mod=vendor"
export TAG=%tag
export VERSION=${TAG#RELEASE.}
export COMMIT=%commit
export SCOMMIT=%shortcommit
export prefix=%import_path/cmd
export YEAR=2022
# setup flags like 'go run buildscripts/gen-ldflags.go' would do
export LDFLAGS="-X $prefix.Version=$VERSION -X $prefix.ReleaseTag=$TAG -X $prefix.CommitID=$COMMIT -X $prefix.ShortCommitID=$SCOMMIT -X github.com/minio/mc/cmd.CopyrightYear=$YEAR"
export TAGS="kqueue"
sed -e "s|DEVELOPMENT.GOGET|$VERSION|g" -i cmd/build-constants.go
%golang_prepare
pushd $BUILDDIR/src/%import_path
CGO_ENABLED=0 %gobuild -tags kqueue -trimpath -o %name .
#CGO_ENABLED=0 %golang_build .
popd
%install
export BUILDDIR="$PWD/.gopath"
mkdir -p -- \
%buildroot%_bindir
cd .gopath/src/%import_path
install -p -m 755 %name %buildroot%_bindir/%name
%files
%doc README.md
%_bindir/%name
%changelog
…
Полный changelog можно просмотреть здесь
%global commit 4b4cab0441f000db100c5b5d9329221181bf61f2
%global shortcommit %(c=%{commit}; echo ${c:0:12})
%global tag RELEASE.2023-05-18T16-59-00Z
%define version 2023.05.18
%global _unpackaged_files_terminate_build 1
Name: minio-mc
Version: %version
Release: alt1
Summary: Minio Client for filesystems and object storage
Group: File tools
License: AGPL-3.0
Url: https://www.min.io/
Source: %name-%version.tar
Patch: %name-%version.patch
ExclusiveArch: %go_arches
BuildRequires(pre): rpm-build-golang
%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
%patch -p1
%build
export BUILDDIR="$PWD/.gopath"
export IMPORT_PATH="%import_path"
export GOPATH="$BUILDDIR:%go_path"
export GOFLAGS="-mod=vendor"
export TAG=%tag
export VERSION=${TAG#RELEASE.}
export COMMIT=%commit
export SCOMMIT=%shortcommit
export prefix=%import_path/cmd
export YEAR=2022
# setup flags like 'go run buildscripts/gen-ldflags.go' would do
export LDFLAGS="-X $prefix.Version=$VERSION -X $prefix.ReleaseTag=$TAG -X $prefix.CommitID=$COMMIT -X $prefix.ShortCommitID=$SCOMMIT -X github.com/minio/mc/cmd.CopyrightYear=$YEAR"
export TAGS="kqueue"
sed -e "s|DEVELOPMENT.GOGET|$VERSION|g" -i cmd/build-constants.go
%golang_prepare
pushd $BUILDDIR/src/%import_path
CGO_ENABLED=0 %gobuild -tags kqueue -trimpath -o %name .
#CGO_ENABLED=0 %golang_build .
popd
%install
export BUILDDIR="$PWD/.gopath"
mkdir -p -- \
%buildroot%_bindir
cd .gopath/src/%import_path
install -p -m 755 %name %buildroot%_bindir/%name
%files
%doc README.md
%_bindir/%name
%changelog
…
Полный changelog можно просмотреть здесь