88 lines
2.5 KiB
RPMSpec
88 lines
2.5 KiB
RPMSpec
# Generated by go2rpm 1.3
|
|
%bcond_without check
|
|
|
|
# https://github.com/gdamore/tcell
|
|
%global goipath github.com/gdamore/tcell/v2
|
|
%global forgeurl https://github.com/gdamore/tcell
|
|
Version: 2.5.2
|
|
|
|
%gometa
|
|
|
|
%global common_description %{expand:
|
|
Tcell is an alternate terminal package, similar in some ways to termbox, but
|
|
better in others.}
|
|
|
|
%global golicenses LICENSE
|
|
%global godocs README.adoc AUTHORS
|
|
|
|
Name: %{goname}
|
|
Release: %autorelease
|
|
Summary: Alternate terminal package
|
|
|
|
# Upstream license specification: Apache-2.0
|
|
License: ASL 2.0
|
|
URL: %{gourl}
|
|
Source0: %{gosource}
|
|
|
|
BuildRequires: golang(github.com/gdamore/encoding)
|
|
BuildRequires: golang(github.com/lucasb-eyer/go-colorful) >= 1.2.0
|
|
BuildRequires: golang(github.com/mattn/go-runewidth) >= 0.0.13
|
|
BuildRequires: golang(golang.org/x/sys/unix)
|
|
BuildRequires: golang(golang.org/x/term)
|
|
BuildRequires: golang(golang.org/x/text/encoding) >= 0.3.7
|
|
BuildRequires: golang(golang.org/x/text/encoding/charmap) >= 0.3.7
|
|
BuildRequires: golang(golang.org/x/text/encoding/japanese) >= 0.3.7
|
|
BuildRequires: golang(golang.org/x/text/encoding/korean) >= 0.3.7
|
|
BuildRequires: golang(golang.org/x/text/encoding/simplifiedchinese) >= 0.3.7
|
|
BuildRequires: golang(golang.org/x/text/encoding/traditionalchinese) >= 0.3.7
|
|
BuildRequires: golang(golang.org/x/text/transform) >= 0.3.7
|
|
|
|
# These are all needed for rebuilding the terminfo database.
|
|
BuildRequires: kitty-terminfo
|
|
BuildRequires: ncurses
|
|
BuildRequires: ncurses-base
|
|
BuildRequires: ncurses-term
|
|
BuildRequires: rxvt-unicode
|
|
|
|
%description
|
|
%{common_description}
|
|
|
|
%gopkg
|
|
|
|
%prep
|
|
%goprep
|
|
# Use existing sources for:
|
|
# * foot, as we have no source since it isn't packaged
|
|
# * sun, which is hand-coded, not generated
|
|
# * xterm-direct, which is hand-coded, not generated
|
|
# * xterm-termite, as we have no source since it isn't packaged
|
|
find terminfo/?/ \! -path '*foot/foot.go' -a \! -path '*sun/term.go' -a \! -path '*xterm/direct.go' -a \! -path '*xterm_termite/term.go' -type f -delete
|
|
sed -i 's/go run mkinfo.go/$1/g' terminfo/gen.sh
|
|
|
|
%build
|
|
# Rebuild database from source.
|
|
%gobuild -o %{gobuilddir}/bin/mkinfo terminfo/mkinfo.go
|
|
pushd terminfo
|
|
bash -x gen.sh %{gobuilddir}/bin/mkinfo
|
|
popd
|
|
|
|
%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 AUTHORS
|
|
%{_bindir}/*
|
|
|
|
%gopkgfiles
|
|
|
|
%changelog
|
|
%autochangelog
|