# Generated by go2rpm 1.1
%bcond_without check

# https://github.com/hinshun/vt10x
%global goipath         github.com/hinshun/vt10x
%global commit          d55458df857cfff952e4bf72ce1b567c5a4e141c

%gometa

%global common_description %{expand:
Package vt10x is a vt10x terminal emulation backend.}

%global golicenses      LICENSE
%global godocs          README.md

Name:           %{goname}
Version:        0
Release:        0.1%{?dist}
Summary:        Package vt10x is a vt10x terminal emulation backend

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

BuildRequires:  golang(github.com/gdamore/tcell)
BuildRequires:  golang(github.com/kr/pty)
BuildRequires:  golang(github.com/Netflix/go-expect)

%if %{with check}
# Tests
BuildRequires:  golang(github.com/stretchr/testify/require)
BuildRequires:  golang(golang.org/x/crypto/ssh/terminal)
%endif

%description
%{common_description}

%gopkg

%prep
%goprep

%build
for cmd in cmd/* ; do
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done

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

%if %{with check}
%check
%gocheck
%endif

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

%gopkgfiles

%changelog
* Tue Sep 29 20:38:39 CDT 2020 Joe Doss <joe@solidadmin.com> - 0-0.1.20200929gitd55458d
- Initial package