f000294b38
Signed-off-by: Jvle <keke.oerv@isrc.iscas.ac.cn>
108 lines
4.1 KiB
RPMSpec
108 lines
4.1 KiB
RPMSpec
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
|
|
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
|
|
# SPDX-FileContributor: Jvle <keke.oerv@isrc.iscas.ac.cn>
|
|
#
|
|
# SPDX-License-Identifier: MulanPSL-2.0
|
|
|
|
%define _name moby
|
|
%define go_import_path github.com/moby/moby
|
|
%define api_path api
|
|
%define api_version 1.55.0
|
|
%define client_path client
|
|
%define man_path man
|
|
|
|
Name: go-github-moby-moby
|
|
Version: 0.5.0
|
|
Release: %autorelease
|
|
Summary: Moby API, client, and manpage Go modules
|
|
License: Apache-2.0
|
|
URL: https://github.com/moby/moby
|
|
#!RemoteAsset: sha256:11f15099d8455cb5a98374730bb11a0c741815e7506607b335108d294e4b0bff
|
|
Source0: %{url}/archive/refs/tags/client/v%{version}.tar.gz#/%{_name}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildSystem: golangmodules
|
|
|
|
# The upstream repository contains several independently versioned Go modules.
|
|
# Package the modules needed by Docker-related dependencies together from the
|
|
# client release tag, which contains the selected submodules.
|
|
|
|
BuildRequires: go
|
|
BuildRequires: go-rpm-macros
|
|
BuildRequires: go(github.com/containerd/errdefs)
|
|
BuildRequires: go(github.com/containerd/errdefs/pkg)
|
|
BuildRequires: go(github.com/cpuguy83/go-md2man/v2)
|
|
BuildRequires: go(github.com/distribution/reference)
|
|
BuildRequires: go(github.com/docker/go-connections)
|
|
BuildRequires: go(github.com/docker/go-units)
|
|
BuildRequires: go(github.com/google/go-cmp)
|
|
BuildRequires: go(github.com/moby/term)
|
|
BuildRequires: go(github.com/opencontainers/go-digest)
|
|
BuildRequires: go(github.com/opencontainers/image-spec)
|
|
BuildRequires: go(go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp)
|
|
BuildRequires: go(go.opentelemetry.io/otel/trace)
|
|
BuildRequires: go(golang.org/x/time)
|
|
BuildRequires: go(gotest.tools/v3)
|
|
BuildRequires: go(github.com/moby/docker-image-spec)
|
|
BuildRequires: go(pgregory.net/rapid)
|
|
|
|
# client depends on api@1.55.0
|
|
Provides: go(%{go_import_path}/%{api_path}) = %{api_version}
|
|
Provides: go(%{go_import_path}/%{client_path}) = %{version}
|
|
Provides: go(%{go_import_path}/%{man_path}) = %{version}
|
|
|
|
Requires: go(github.com/containerd/errdefs)
|
|
Requires: go(github.com/containerd/errdefs/pkg)
|
|
Requires: go(github.com/cpuguy83/go-md2man/v2)
|
|
Requires: go(github.com/distribution/reference)
|
|
Requires: go(github.com/docker/go-connections)
|
|
Requires: go(github.com/docker/go-units)
|
|
Requires: go(github.com/moby/docker-image-spec)
|
|
Requires: go(github.com/moby/term)
|
|
Requires: go(github.com/opencontainers/go-digest)
|
|
Requires: go(github.com/opencontainers/image-spec)
|
|
Requires: go(github.com/russross/blackfriday/v2)
|
|
Requires: go(go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp)
|
|
Requires: go(go.opentelemetry.io/otel/trace)
|
|
Requires: go(golang.org/x/time)
|
|
|
|
%description
|
|
This package provides selected Moby Go modules: the Docker Engine API types,
|
|
the Go client for the Docker Engine API, and the manpage generator module.
|
|
|
|
%install
|
|
for _subdir in %{api_path} %{client_path} %{man_path}; do
|
|
install -d "%{buildroot}%{go_sys_gopath}/%{go_import_path}/$(dirname "${_subdir}")"
|
|
cp -a "${_subdir}" "%{buildroot}%{go_sys_gopath}/%{go_import_path}/${_subdir}"
|
|
done
|
|
|
|
%check
|
|
export GO111MODULE=off
|
|
export GOPATH=%{_builddir}/go:%{_datadir}/gocode
|
|
|
|
for _subdir in %{api_path} %{client_path} %{man_path}; do
|
|
mkdir -p "%{_builddir}/go/src/%{go_import_path}/$(dirname "${_subdir}")"
|
|
cp -a "${_subdir}" "%{_builddir}/go/src/%{go_import_path}/${_subdir}"
|
|
done
|
|
|
|
for _import_path in \
|
|
%{go_import_path}/%{api_path} \
|
|
%{go_import_path}/%{client_path} \
|
|
%{go_import_path}/%{man_path}; do
|
|
pushd %{_builddir}/go/src/${_import_path}
|
|
go test -v ./...
|
|
popd
|
|
done
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc README.md
|
|
%doc %{api_path}/README.md
|
|
%doc %{client_path}/README.md
|
|
%doc %{man_path}/README.md
|
|
%{go_sys_gopath}/%{go_import_path}/%{api_path}
|
|
%{go_sys_gopath}/%{go_import_path}/%{client_path}
|
|
%{go_sys_gopath}/%{go_import_path}/%{man_path}
|
|
|
|
%changelog
|
|
%autochangelog
|