# Copyright 2021-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module

EGO_SUM=(
	"cloud.google.com/go/auth v0.13.0"
	"cloud.google.com/go/auth v0.13.0/go.mod"
	"cloud.google.com/go/auth/oauth2adapt v0.2.6"
	"cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod"
	"cloud.google.com/go/compute/metadata v0.6.0"
	"cloud.google.com/go/compute/metadata v0.6.0/go.mod"
	"github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod"
	"github.com/davecgh/go-spew v1.1.1"
	"github.com/davecgh/go-spew v1.1.1/go.mod"
	"github.com/felixge/httpsnoop v1.0.4"
	"github.com/felixge/httpsnoop v1.0.4/go.mod"
	"github.com/go-logr/logr v1.2.2/go.mod"
	"github.com/go-logr/logr v1.4.2"
	"github.com/go-logr/logr v1.4.2/go.mod"
	"github.com/go-logr/stdr v1.2.2"
	"github.com/go-logr/stdr v1.2.2/go.mod"
	"github.com/golang/protobuf v1.5.4"
	"github.com/golang/protobuf v1.5.4/go.mod"
	"github.com/google/go-cmp v0.5.9/go.mod"
	"github.com/google/go-cmp v0.6.0"
	"github.com/google/go-cmp v0.6.0/go.mod"
	"github.com/google/go-jsonnet v0.20.0"
	"github.com/google/go-jsonnet v0.20.0/go.mod"
	"github.com/google/s2a-go v0.1.8"
	"github.com/google/s2a-go v0.1.8/go.mod"
	"github.com/google/uuid v1.6.0"
	"github.com/google/uuid v1.6.0/go.mod"
	"github.com/googleapis/enterprise-certificate-proxy v0.3.4"
	"github.com/googleapis/enterprise-certificate-proxy v0.3.4/go.mod"
	"github.com/googleapis/gax-go/v2 v2.14.0"
	"github.com/googleapis/gax-go/v2 v2.14.0/go.mod"
	"github.com/gorilla/mux v1.8.1"
	"github.com/gorilla/mux v1.8.1/go.mod"
	"github.com/hashicorp/errwrap v1.0.0/go.mod"
	"github.com/hashicorp/errwrap v1.1.0"
	"github.com/hashicorp/errwrap v1.1.0/go.mod"
	"github.com/hashicorp/go-multierror v1.1.1"
	"github.com/hashicorp/go-multierror v1.1.1/go.mod"
	"github.com/inconshreveable/mousetrap v1.1.0"
	"github.com/inconshreveable/mousetrap v1.1.0/go.mod"
	"github.com/kr/pretty v0.3.1"
	"github.com/kr/pretty v0.3.1/go.mod"
	"github.com/kr/text v0.2.0"
	"github.com/kr/text v0.2.0/go.mod"
	"github.com/pmezard/go-difflib v1.0.0"
	"github.com/pmezard/go-difflib v1.0.0/go.mod"
	"github.com/rogpeppe/go-internal v1.13.1"
	"github.com/rogpeppe/go-internal v1.13.1/go.mod"
	"github.com/russross/blackfriday/v2 v2.1.0/go.mod"
	"github.com/sergi/go-diff v1.1.0"
	"github.com/sergi/go-diff v1.1.0/go.mod"
	"github.com/spf13/cobra v1.8.1"
	"github.com/spf13/cobra v1.8.1/go.mod"
	"github.com/spf13/pflag v1.0.5"
	"github.com/spf13/pflag v1.0.5/go.mod"
	"github.com/stretchr/testify v1.10.0"
	"github.com/stretchr/testify v1.10.0/go.mod"
	"go.opentelemetry.io/auto/sdk v1.1.0"
	"go.opentelemetry.io/auto/sdk v1.1.0/go.mod"
	"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0"
	"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod"
	"go.opentelemetry.io/otel v1.33.0"
	"go.opentelemetry.io/otel v1.33.0/go.mod"
	"go.opentelemetry.io/otel/metric v1.33.0"
	"go.opentelemetry.io/otel/metric v1.33.0/go.mod"
	"go.opentelemetry.io/otel/sdk v1.31.0"
	"go.opentelemetry.io/otel/sdk v1.31.0/go.mod"
	"go.opentelemetry.io/otel/sdk/metric v1.31.0"
	"go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod"
	"go.opentelemetry.io/otel/trace v1.33.0"
	"go.opentelemetry.io/otel/trace v1.33.0/go.mod"
	"golang.org/x/crypto v0.31.0"
	"golang.org/x/crypto v0.31.0/go.mod"
	"golang.org/x/net v0.33.0"
	"golang.org/x/net v0.33.0/go.mod"
	"golang.org/x/oauth2 v0.24.0"
	"golang.org/x/oauth2 v0.24.0/go.mod"
	"golang.org/x/sync v0.10.0"
	"golang.org/x/sync v0.10.0/go.mod"
	"golang.org/x/sys v0.28.0"
	"golang.org/x/sys v0.28.0/go.mod"
	"golang.org/x/text v0.21.0"
	"golang.org/x/text v0.21.0/go.mod"
	"google.golang.org/api v0.214.0"
	"google.golang.org/api v0.214.0/go.mod"
	"google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28"
	"google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod"
	"google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484"
	"google.golang.org/genproto/googleapis/rpc v0.0.0-20241216192217-9240e9c98484/go.mod"
	"google.golang.org/grpc v1.69.2"
	"google.golang.org/grpc v1.69.2/go.mod"
	"google.golang.org/protobuf v1.36.0"
	"google.golang.org/protobuf v1.36.0/go.mod"
	"gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod"
	"gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c"
	"gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod"
	"gopkg.in/yaml.v3 v3.0.1"
	"gopkg.in/yaml.v3 v3.0.1/go.mod"
	"sigs.k8s.io/yaml v1.4.0"
	"sigs.k8s.io/yaml v1.4.0/go.mod"
)

go-module_set_globals

DESCRIPTION="Declarative configuration for Gmail filters"
HOMEPAGE="https://github.com/mbrt/gmailctl"
SRC_URI="https://github.com/mbrt/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${EGO_SUM_SRC_URI}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

src_compile() {
	go build "./cmd/${PN}"
}

src_install() {
	dobin "${PN}"
	einstalldocs
}

src_test() {
	go test -v ./...
}