56 lines
2.1 KiB
RPMSpec
56 lines
2.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 pkg
|
|
%define go_import_path github.com/containerd/errdefs/pkg
|
|
%define go_test_exclude %{go_import_path}/errgrpc %{go_import_path}/errhttp
|
|
|
|
Name: go-github-containerd-errdefs-pkg
|
|
Version: 0.3.0
|
|
Release: %autorelease
|
|
Summary: Containerd error definitions protocol package
|
|
License: Apache-2.0
|
|
URL: https://github.com/containerd/errdefs
|
|
#!RemoteAsset: sha256:593bf56f1991517e493510815d8fc6d344b8550fbfb3de56812f015096aab24f
|
|
Source0: https://proxy.golang.org/github.com/containerd/errdefs/pkg/@v/v%{version}.zip#/%{_name}-%{version}.zip
|
|
BuildArch: noarch
|
|
BuildSystem: golangmodules
|
|
|
|
BuildRequires: go
|
|
BuildRequires: go-rpm-macros
|
|
BuildRequires: unzip
|
|
BuildRequires: go(github.com/containerd/errdefs)
|
|
BuildRequires: go(github.com/containerd/typeurl/v2)
|
|
BuildRequires: go(google.golang.org/genproto/googleapis/rpc)
|
|
BuildRequires: go(google.golang.org/grpc)
|
|
BuildRequires: go(google.golang.org/protobuf)
|
|
|
|
Provides: go(github.com/containerd/errdefs/pkg) = %{version}
|
|
|
|
Requires: go(github.com/containerd/errdefs)
|
|
Requires: go(github.com/containerd/typeurl/v2)
|
|
Requires: go(google.golang.org/genproto/googleapis/rpc)
|
|
Requires: go(google.golang.org/grpc)
|
|
Requires: go(google.golang.org/protobuf)
|
|
|
|
%prep -a
|
|
# Go proxy zips contain source below an @version directory; flatten it so
|
|
# GOPATH-mode macros see the requested import path.
|
|
_go_proxy_dir=github.com/containerd/errdefs/pkg@v%{version}
|
|
[ -d "$_go_proxy_dir" ] || _go_proxy_dir=containerd/errdefs/pkg@v%{version}
|
|
mv "$_go_proxy_dir"/* .
|
|
rmdir -p "$_go_proxy_dir" github.com/containerd/errdefs github.com/containerd github.com containerd/errdefs containerd 2>/dev/null || :
|
|
|
|
%description
|
|
Containerd error definitions protocol package.
|
|
|
|
%files
|
|
%license LICENSE
|
|
%{go_sys_gopath}/%{go_import_path}
|
|
|
|
%changelog
|
|
%autochangelog
|