# Generated by go2rpm 1.2 %bcond_without check # https://github.com/facebook/ent %global goipath github.com/facebook/ent Version: 0.5.0 %gometa %global common_description %{expand: Ent is a simple, yet powerful entity framework for Go, that makes it easy to build and maintain applications with large data-models.} %global golicenses LICENSE %global godocs CODE_OF_CONDUCT.md CONTRIBUTING.md README.md Name: %{goname} Release: 2%{?dist} Summary: An entity framework for Go # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} BuildRequires: golang(github.com/go-openapi/inflect) BuildRequires: golang(github.com/google/uuid) BuildRequires: golang(github.com/gorilla/websocket) BuildRequires: golang(github.com/json-iterator/go) BuildRequires: golang(github.com/mattn/go-sqlite3) BuildRequires: golang(github.com/mitchellh/mapstructure) BuildRequires: golang(github.com/modern-go/reflect2) BuildRequires: golang(github.com/olekukonko/tablewriter) BuildRequires: golang(github.com/pkg/errors) BuildRequires: golang(github.com/spf13/cobra) BuildRequires: golang(go.opencensus.io/stats) BuildRequires: golang(go.opencensus.io/stats/view) BuildRequires: golang(go.opencensus.io/tag) BuildRequires: golang(go.opencensus.io/trace) BuildRequires: golang(golang.org/x/sync/errgroup) BuildRequires: golang(golang.org/x/sync/semaphore) BuildRequires: golang(golang.org/x/tools/go/packages) BuildRequires: golang(golang.org/x/tools/imports) %if %{with check} # Tests BuildRequires: golang(github.com/DATA-DOG/go-sqlmock) BuildRequires: golang(github.com/jessevdk/go-flags) BuildRequires: golang(github.com/stretchr/testify/assert) BuildRequires: golang(github.com/stretchr/testify/mock) BuildRequires: golang(github.com/stretchr/testify/require) BuildRequires: golang(golang.org/x/tools/go/packages/packagestest) %endif %description %{common_description} %package docs Summary: Documentation and examples for %{name} %description docs The package %{name}-docs contains documentation and examples for %{name}. %gopkg %prep %goprep %build %gobuild -o %{gobuilddir}/bin/entc %{goipath}/cmd/entc # Fix permissions and remove spurious gitignore rm doc/.gitignore find doc -type f -exec chmod 0644 {} \; %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %if %{with check} %check # these tests hardcode package paths rm entc/internal/snapshot_test.go \ entc/load/load_test.go %ifarch i686 armv7hl # these tests fail on 32bit arches due to hardcoded ints that overflow rm dialect/gremlin/encoding/graphson/native_test.go \ dialect/sql/schema/mysql_test.go \ dialect/sql/schema/postgres_test.go \ dialect/sql/schema/sqlite_test.go %endif %gocheck %endif %files %license LICENSE %doc CODE_OF_CONDUCT.md CONTRIBUTING.md README.md %{_bindir}/* %files docs %doc doc examples %gopkgfiles %changelog * Mon Nov 16 2020 Davide Cavalca - 0.5.0-2 - Fix docs permissions and remove spurious gitignore * Sun Nov 08 2020 Davide Cavalca - 0.5.0-1 - Initial package