golang-github-alecthomas-ch.../golang-github-alecthomas-chroma-2.spec
W. Michael Petullo 08a6f184f4 Update to 2.8.0
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2023-07-14 10:03:13 -05:00

66 lines
1.9 KiB
RPMSpec

# Generated by go2rpm 1.8.2
%bcond_without check
# https://github.com/alecthomas/chroma
%global goipath github.com/alecthomas/chroma/v2
Version: 2.8.0
%gometa -f
%global common_description %{expand:
A general purpose syntax highlighter in pure Go.}
%global golicenses COPYING
%global godocs pygments-lexers.txt README.md bin/README.hermit.md\\\
lexers/README.md
Name: %{goname}
Release: %autorelease
Summary: A general purpose syntax highlighter in pure Go
License: MIT
URL: %{gourl}
Source: %{gosource}
%description %{common_description}
%gopkg
%prep
%goprep
%generate_buildrequires
%go_generate_buildrequires
%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}/
install -m 0755 -vd %{buildroot}%{_datarootdir}/gocode/src/github.com/alecthomas/chroma/v2/lexers/embedded
install -m 0644 -vp %{gobuilddir}/src/github.com/alecthomas/chroma/v2/lexers/embedded/* %{buildroot}%{_datarootdir}/gocode/src/github.com/alecthomas/chroma/v2/lexers/embedded
install -m 0755 -vd %{buildroot}%{_datarootdir}/gocode/src/github.com/alecthomas/chroma/v2/styles
install -m 0644 -vp %{gobuilddir}/src/github.com/alecthomas/chroma/v2/styles/* %{buildroot}%{_datarootdir}/gocode/src/github.com/alecthomas/chroma/v2/styles
%if %{with check}
%check
%gocheck
%endif
%files
%license COPYING
%doc pygments-lexers.txt README.md bin/README.hermit.md lexers/README.md
%{_bindir}/chroma
%{_bindir}/chromad
%gopkgfiles
%{_datarootdir}/gocode/src/github.com/alecthomas/chroma/v2/lexers/embedded/
%{_datarootdir}/gocode/src/github.com/alecthomas/chroma/v2/styles/
%changelog
%autochangelog