|
|
2224f09 |
# Generated by go2rpm
|
|
|
2224f09 |
%bcond_without check
|
|
|
2224f09 |
|
|
|
2224f09 |
# https://github.com/googleapis/gnostic
|
|
|
2224f09 |
%global goipath github.com/googleapis/gnostic
|
|
|
cadfbf6 |
Version: 0.5.3
|
|
|
2224f09 |
|
|
|
2224f09 |
%gometa
|
|
|
2224f09 |
|
|
|
2224f09 |
%global common_description %{expand:
|
|
|
2224f09 |
This package contains a Go command line tool which converts JSON and YAML
|
|
|
2224f09 |
OpenAPI descriptions to and from equivalent Protocol Buffer representations.
|
|
|
2224f09 |
|
|
|
2224f09 |
Protocol Buffers provide a language-neutral, platform-neutral, extensible
|
|
|
2224f09 |
mechanism for serializing structured data. gnostic's Protocol Buffer models for
|
|
|
2224f09 |
the OpenAPI Specification can be used to generate code that includes data
|
|
|
2224f09 |
structures with explicit fields for the elements of an OpenAPI description. This
|
|
|
2224f09 |
makes it possible for developers to work with OpenAPI descriptions in type-safe
|
|
|
2224f09 |
ways, which is particularly useful in strongly-typed languages like Go and
|
|
|
2224f09 |
Swift.
|
|
|
2224f09 |
|
|
|
2224f09 |
gnostic reads OpenAPI descriptions into these generated data structures, reports
|
|
|
2224f09 |
errors, resolves internal dependencies, and writes the results in a binary form
|
|
|
2224f09 |
that can be used in any language that is supported by the Protocol Buffer tools.
|
|
|
2224f09 |
A plugin interface simplifies integration with API tools written in a variety of
|
|
|
2224f09 |
different languages, and when necessary, Protocol Buffer OpenAPI descriptions
|
|
|
2224f09 |
can be reexported as JSON or YAML.
|
|
|
2224f09 |
|
|
|
2224f09 |
gnostic compilation code and OpenAPI Protocol Buffer models are automatically
|
|
|
2224f09 |
generated from an OpenAPI JSON Schema. Source code for the generator is in the
|
|
|
2224f09 |
generate-gnostic directory.}
|
|
|
2224f09 |
|
|
|
2224f09 |
%global golicenses LICENSE
|
|
|
2224f09 |
%global godocs examples CONTRIBUTING.md README.md README-disco.md\\\
|
|
|
2224f09 |
README-gnostic-report.md README-petstore-builder.md\\\
|
|
|
2224f09 |
README-report-messages.md README-generate-gnostic.md
|
|
|
2224f09 |
|
|
|
2224f09 |
Name: %{goname}
|
|
|
9dbc757 |
Release: 1%{?dist}
|
|
|
2224f09 |
Summary: Compiler for APIs described by the OpenAPI Specification
|
|
|
2224f09 |
|
|
|
2224f09 |
# Upstream license specification: Apache-2.0
|
|
|
2224f09 |
License: ASL 2.0
|
|
|
2224f09 |
URL: %{gourl}
|
|
|
2224f09 |
Source0: %{gosource}
|
|
|
2224f09 |
|
|
|
2224f09 |
BuildRequires: golang(github.com/docopt/docopt-go)
|
|
|
af3f6fe |
BuildRequires: golang(github.com/golang/protobuf/jsonpb)
|
|
|
2224f09 |
BuildRequires: golang(github.com/golang/protobuf/proto)
|
|
|
2224f09 |
BuildRequires: golang(github.com/golang/protobuf/ptypes)
|
|
|
2224f09 |
BuildRequires: golang(github.com/golang/protobuf/ptypes/any)
|
|
|
9dbc757 |
BuildRequires: golang(github.com/stoewer/go-strcase)
|
|
|
cadfbf6 |
BuildRequires: golang(google.golang.org/genproto/googleapis/api/annotations)
|
|
|
cadfbf6 |
BuildRequires: golang(google.golang.org/protobuf/compiler/protogen)
|
|
|
9dbc757 |
BuildRequires: golang(google.golang.org/protobuf/proto)
|
|
|
9dbc757 |
BuildRequires: golang(google.golang.org/protobuf/reflect/protoreflect)
|
|
|
9dbc757 |
BuildRequires: golang(google.golang.org/protobuf/runtime/protoimpl)
|
|
|
9dbc757 |
BuildRequires: golang(gopkg.in/yaml.v3)
|
|
|
2224f09 |
|
|
|
af3f6fe |
%if %{with check}
|
|
|
af3f6fe |
# Tests
|
|
|
af3f6fe |
BuildRequires: golang(gopkg.in/check.v1)
|
|
|
1c8d326 |
BuildRequires: /usr/bin/protoc
|
|
|
af3f6fe |
%endif
|
|
|
af3f6fe |
|
|
|
2224f09 |
%description
|
|
|
2224f09 |
%{common_description}
|
|
|
2224f09 |
|
|
|
2224f09 |
%gopkg
|
|
|
2224f09 |
|
|
|
2224f09 |
%prep
|
|
|
2224f09 |
%goprep
|
|
|
2224f09 |
mv apps/disco/README.md README-disco.md
|
|
|
2224f09 |
mv apps/petstore-builder/README.md README-petstore-builder.md
|
|
|
2224f09 |
mv apps/report-messages/README.md README-report-messages.md
|
|
|
2224f09 |
mv apps/report/README.md README-gnostic-report.md
|
|
|
2224f09 |
mv generate-gnostic/README.md README-generate-gnostic.md
|
|
|
2224f09 |
|
|
|
2224f09 |
%build
|
|
|
2224f09 |
%gobuild -o %{gobuilddir}/bin/gnostic %{goipath}
|
|
|
2224f09 |
for cmd in apps/report apps/report-messages apps/petstore-builder generate-gnostic apps/disco; do
|
|
|
2224f09 |
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
|
|
2224f09 |
done
|
|
|
2224f09 |
mv %{gobuilddir}/bin/report %{gobuilddir}/bin/gnostic-report
|
|
|
2224f09 |
|
|
|
2224f09 |
%install
|
|
|
2224f09 |
%gopkginstall
|
|
|
2224f09 |
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
|
2224f09 |
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
|
2224f09 |
|
|
|
2224f09 |
%if %{with check}
|
|
|
2224f09 |
%check
|
|
|
2224f09 |
# Needs network
|
|
|
9dbc757 |
%gocheck -d . \
|
|
|
1c8d326 |
-d apps/protoc-gen-openapi \
|
|
|
9dbc757 |
-d generate-gnostic \
|
|
|
9dbc757 |
-d compiler \
|
|
|
9dbc757 |
-d extensions \
|
|
|
9dbc757 |
-d plugins \
|
|
|
9dbc757 |
-d plugins/gnostic-complexity \
|
|
|
9dbc757 |
-d plugins/gnostic-vocabulary
|
|
|
2224f09 |
%endif
|
|
|
2224f09 |
|
|
|
2224f09 |
%files
|
|
|
2224f09 |
%license LICENSE
|
|
|
2224f09 |
%doc examples CONTRIBUTING.md README.md README-disco.md README-gnostic-report.md
|
|
|
2224f09 |
%doc README-petstore-builder.md README-report-messages.md
|
|
|
2224f09 |
%doc README-generate-gnostic.md
|
|
|
2224f09 |
%{_bindir}/*
|
|
|
2224f09 |
|
|
|
2224f09 |
%gopkgfiles
|
|
|
2224f09 |
|
|
|
2224f09 |
%changelog
|
|
|
cadfbf6 |
* Sat Dec 19 02:16:11 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.5.3-1
|
|
|
cadfbf6 |
- Update to 0.5.3
|
|
|
cadfbf6 |
- Close: rhbz#1887628
|
|
|
cadfbf6 |
|
|
|
9dbc757 |
* Fri Aug 14 01:00:35 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.5.1-1
|
|
|
9dbc757 |
- Update to 0.5.1
|
|
|
9dbc757 |
|
|
|
314c35b |
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-2
|
|
|
314c35b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
314c35b |
|
|
|
af3f6fe |
* Tue Apr 14 01:03:04 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.1-1
|
|
|
af3f6fe |
- Update to 0.4.1
|
|
|
af3f6fe |
|
|
|
eb55cae |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-3
|
|
|
eb55cae |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
eb55cae |
|
|
|
0f32896 |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-2
|
|
|
0f32896 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
0f32896 |
|
|
|
2224f09 |
* Thu May 09 17:27:45 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.2.0-1
|
|
|
2224f09 |
- Initial package
|