# Generated by go2rpm 1.3 %bcond_without check # https://github.com/mvdan/sh %global goipath mvdan.cc/sh %global forgeurl https://github.com/mvdan/sh Version: 3.2.4 %gometa %global goaltipaths mvdan.cc/sh/v3 %global common_description %{expand: A shell parser, formatter, and interpreter. Supports POSIX Shell, Bash, and mksh.} %global golicenses LICENSE %global godocs CHANGELOG.md README.md Name: %{goname} Release: 1%{?dist} Summary: A shell parser, formatter, and interpreter # Upstream license specification: BSD-3-Clause License: BSD URL: %{gourl} Source0: %{gosource} BuildRequires: scdoc BuildRequires: golang(github.com/google/renameio) BuildRequires: golang(github.com/pkg/diff) BuildRequires: golang(github.com/pkg/diff/write) BuildRequires: golang(golang.org/x/sync/errgroup) BuildRequires: golang(golang.org/x/sys/unix) BuildRequires: golang(golang.org/x/term) BuildRequires: golang(mvdan.cc/editorconfig) %if %{with check} # Tests BuildRequires: glibc-langpack-en BuildRequires: golang(github.com/creack/pty) BuildRequires: golang(github.com/kr/pretty) BuildRequires: golang(github.com/rogpeppe/go-internal/testscript) %endif %description %{common_description} %package -n shfmt Summary: Shell formatter %description -n shfmt shfmt is a shell formatter. shfmt's default shell formatting was chosen to be consistent, common, and predictable. %package -n gosh Summary: Proof of concept shell that uses interp. %description -n gosh Proof of concept shell that uses interp. Note that it's not meant to replace a POSIX shell at the moment, and its options are intentionally minimalistic. %gopkg %prep %goprep %build for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done mkdir -p %{gobuilddir}/man scdoc < cmd/shfmt/shfmt.1.scd > %{gobuilddir}/man/shfmt.1 %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{_mandir}/man1/ install -m 0644 -vp %{gobuilddir}/man/* %{buildroot}%{_mandir}/man1/ %if %{with check} %check %gocheck %endif %files -n shfmt %license LICENSE %doc CHANGELOG.md README.md %{_bindir}/shfmt %{_mandir}/man1/shfmt.1* %files -n gosh %license LICENSE %doc CHANGELOG.md README.md %{_bindir}/gosh %gopkgfiles %changelog * Wed Apr 07 2021 Davide Cavalca - 3.2.4-1 - Initial package