## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.9.0 %bcond_with check # https://github.com/google/gnostic %global goipath github.com/google/gnostic Version: 0.6.9 %gometa %global common_description %{expand: This package contains a Go command line tool which converts JSON and YAML OpenAPI descriptions to and from equivalent Protocol Buffer representations. Protocol Buffers provide a language-neutral, platform-neutral, extensible mechanism for serializing structured data. gnostic s Protocol Buffer models for the OpenAPI Specification can be used to generate code that includes data structures with explicit fields for the elements of an OpenAPI description. This makes it possible for developers to work with OpenAPI descriptions in type-safe ways, which is particularly useful in strongly-typed languages like Go and Swift. gnostic reads OpenAPI descriptions into these generated data structures, reports errors, resolves internal dependencies, and writes the results in a binary form that can be used in any language that is supported by the Protocol Buffer tools. A plugin interface simplifies integration with API tools written in a variety of different languages, and when necessary, Protocol Buffer OpenAPI descriptions can be reexported as JSON or YAML. gnostic compilation code and OpenAPI Protocol Buffer models are automatically generated from an OpenAPI JSON Schema. Source code for the generator is in the generate-gnostic directory.} %global golicenses LICENSE %global godocs examples CONTRIBUTING.md README.md surface/README.md\\\ linters/README.md linters/go/gnostic-lint-\\\ paths/README.md linters/go/gnostic-lint-\\\ descriptions/README.md linters/node/gnostic-lint-\\\ operations/README.md linters/node/gnostic-lint-\\\ responses/README.md printer/README.md generate-\\\ gnostic/README.md tools/README.md cmd/disco/README.md\\\ examples cmd/protoc-gen-jsonschema/README.md\\\ cmd/vocabulary-operations/README.md cmd/petstore-\\\ builder/README.md examples cmd/protoc-gen-\\\ openapi/README.md cmd/report/README.md cmd/report-\\\ messages/README.md discovery/README.md\\\ jsonschema/README.md extensions/README.md\\\ jsonwriter/README.md openapiv3/README.md\\\ openapiv3/schema-generator/3.0.2.md openapiv3/schema-\\\ generator/3.0.0.md openapiv3/schema-\\\ generator/3.0.1.md openapiv3/schema-\\\ generator/3.1.0.md openapiv3/schema-\\\ generator/README.md compiler/README.md\\\ openapiv2/README.md plugins/README.md\\\ plugins/gnostic-analyze/README.md plugins/gnostic-\\\ complexity/README.md plugins/gnostic-\\\ summary/README.md Name: %{goname} Release: %autorelease Summary: A compiler for APIs described by the OpenAPI Specification with plugins for code generation and other API support tasks License: Apache-2.0 URL: %{gourl} Source: %{gosource} BuildRequires: golang(github.com/docopt/docopt-go) BuildRequires: golang(github.com/golang/protobuf/jsonpb) BuildRequires: golang(github.com/golang/protobuf/proto) BuildRequires: golang(github.com/golang/protobuf/ptypes) BuildRequires: golang(github.com/golang/protobuf/ptypes/any) BuildRequires: golang(github.com/stoewer/go-strcase) BuildRequires: golang(golang.org/x/tools/imports) BuildRequires: golang(google.golang.org/genproto/googleapis/api/annotations) BuildRequires: golang(google.golang.org/genproto/googleapis/rpc/status) BuildRequires: golang(google.golang.org/protobuf/compiler/protogen) BuildRequires: golang(google.golang.org/protobuf/proto) BuildRequires: golang(google.golang.org/protobuf/reflect/protoreflect) BuildRequires: golang(google.golang.org/protobuf/runtime/protoimpl) BuildRequires: golang(google.golang.org/protobuf/types/descriptorpb) BuildRequires: golang(google.golang.org/protobuf/types/known/anypb) BuildRequires: golang(google.golang.org/protobuf/types/pluginpb) BuildRequires: golang(gopkg.in/yaml.v3) %if %{with check} # Tests BuildRequires: golang(github.com/flowstack/go-jsonschema) BuildRequires: golang(gopkg.in/check.v1) BuildRequires: /usr/bin/protoc %endif %description %{common_description} %gopkg %prep %goprep %autopatch -p1 %build for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %gobuild -o %{gobuilddir}/bin/gnostic %{goipath} for cmd in generate-gnostic plugins/gnostic-vocabulary plugins/gnostic-complexity linters/go/gnostic-lint-descriptions linters/go/gnostic-lint-paths plugins/gnostic-analyze plugins/gnostic-summary tools/format-schema openapiv3/schema-generator jsonschema plugins/gnostic-linter plugins/gnostic-process-plugin-response tools/j2y2j plugins/gnostic-analyze/summarize plugins/gnostic-plugin-request; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done mv %{gobuilddir}/bin/report %{gobuilddir}/bin/gnostic-report %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check # new version, we need fix this # Needs network %gocheck -d . \ -d apps/protoc-gen-openapi \ -d generate-gnostic \ -d compiler \ -d extensions \ -d plugins \ -d plugins/gnostic-complexity \ -d plugins/gnostic-vocabulary %endif %files %license LICENSE %doc examples CONTRIBUTING.md README.md surface/README.md linters/README.md %doc linters/go/gnostic-lint-paths/README.md %doc linters/go/gnostic-lint-descriptions/README.md %doc linters/node/gnostic-lint-operations/README.md %doc linters/node/gnostic-lint-responses/README.md printer/README.md %doc generate-gnostic/README.md tools/README.md cmd/disco/README.md examples %doc cmd/protoc-gen-jsonschema/README.md cmd/vocabulary-operations/README.md %doc cmd/petstore-builder/README.md examples cmd/protoc-gen-openapi/README.md %doc cmd/report/README.md cmd/report-messages/README.md discovery/README.md %doc jsonschema/README.md extensions/README.md jsonwriter/README.md %doc openapiv3/README.md openapiv3/schema-generator/3.0.2.md %doc openapiv3/schema-generator/3.0.0.md openapiv3/schema-generator/3.0.1.md %doc openapiv3/schema-generator/3.1.0.md openapiv3/schema-generator/README.md %doc compiler/README.md openapiv2/README.md plugins/README.md %doc plugins/gnostic-analyze/README.md plugins/gnostic-complexity/README.md %doc plugins/gnostic-summary/README.md %{_bindir}/* %gopkgfiles %changelog * Mon May 01 2023 John Doe - 0.6.9-1 - Uncommitted changes