# Generated by go2rpm 1.3
%bcond_without check

# https://git.sr.ht/~eliasnaur/gio
%global goipath         gioui.org
%global forgeurl        https://github.com/gioui/gio
%global commit          18d4dbf60c4ff644fe976b9e4f1be27229848529

%gometa

%global godevelheader %{expand:
Requires:               pkgconfig(glesv2)
Requires:               pkgconfig(xkbcommon)}

%global common_description %{expand:
Immediate mode GUI programs in Go for Android, iOS, macOS, Linux, FreeBSD,
OpenBSD, Windows, and WebAssembly (experimental). See the project page gioui.org
for documentation and more information.}

%global golicenses      LICENSE
%global godocs          README.md

Name:           %{goname}
Version:        0
Release:        0.1%{?dist}
Summary:        Immediate mode GUI programs in Go

License:        Unlicense or MIT

URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(golang.org/x/exp/shiny/iconvg)
BuildRequires:  golang(golang.org/x/exp/shiny/materialdesign/icons)
BuildRequires:  golang(golang.org/x/image/draw)
BuildRequires:  golang(golang.org/x/image/font)
BuildRequires:  golang(golang.org/x/image/font/gofont/gobold)
BuildRequires:  golang(golang.org/x/image/font/gofont/gobolditalic)
BuildRequires:  golang(golang.org/x/image/font/gofont/goitalic)
BuildRequires:  golang(golang.org/x/image/font/gofont/gomedium)
BuildRequires:  golang(golang.org/x/image/font/gofont/gomediumitalic)
BuildRequires:  golang(golang.org/x/image/font/gofont/gomono)
BuildRequires:  golang(golang.org/x/image/font/gofont/gomonobold)
BuildRequires:  golang(golang.org/x/image/font/gofont/gomonobolditalic)
BuildRequires:  golang(golang.org/x/image/font/gofont/gomonoitalic)
BuildRequires:  golang(golang.org/x/image/font/gofont/goregular)
BuildRequires:  golang(golang.org/x/image/font/gofont/gosmallcaps)
BuildRequires:  golang(golang.org/x/image/font/gofont/gosmallcapsitalic)
BuildRequires:  golang(golang.org/x/image/font/sfnt)
BuildRequires:  golang(golang.org/x/image/math/fixed)
BuildRequires:  golang(golang.org/x/sync/errgroup)
BuildRequires:  golang(golang.org/x/sys/unix)
BuildRequires:  golang(golang.org/x/tools/go/packages)

%if %{with check}
# Tests
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  golang(github.com/chromedp/cdproto/runtime)
BuildRequires:  golang(github.com/chromedp/chromedp)
BuildRequires:  golang(golang.org/x/image/colornames)
%endif

%description
%{common_description}

%gopkg

%prep
%goprep

%build
%gobuild -o %{gobuilddir}/bin/gogio %{goipath}/cmd/gogio

%install
%gopkginstall
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/

%if %{with check}
%check
%gocheck -t cmd
%endif

%files
%license LICENSE
%doc README.md
%{_bindir}/*

%gopkgfiles

%changelog
* Tue Dec 22 07:23:37 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0-0.1.20201222git18d4dbf
- Initial package