Blob Blame History Raw
# Generated by go2rpm 1
%bcond_without check

# https://github.com/bugst/go-serial
%global goipath         go.bug.st/serial
%global forgeurl        https://github.com/bugst/go-serial
Version:                1.5.0

%gometa

%global common_description %{expand:
A cross-platform serial library for Golang.}

%global golicenses      LICENSE
%global godocs          README.md

Name:           %{goname}-1
Release:        %autorelease
Summary:        Cross-platform serial library for Golang

# Upstream license specification: BSD-3-Clause
License:        BSD
URL:            %{gourl}
Source0:        %{gosource}

BuildRequires:  golang(github.com/creack/goselect)
BuildRequires:  golang(github.com/stretchr/testify/require)
BuildRequires:  golang(golang.org/x/sys/unix)
BuildRequires:  socat

%description
%{common_description}

%gopkg

%prep
%goprep

%build
for cmd in portlist; 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
%autochangelog