# Generated by go2rpm 1.6.0 %bcond_without check # https://github.com/mvdan/sh %global goipath mvdan.cc/sh/v3 %global forgeurl https://github.com/mvdan/sh Version: 3.7.0 %gometa %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: %autorelease Summary: A shell parser, formatter, and interpreter # Upstream license specification: BSD-3-Clause License: BSD URL: %{gourl} Source0: %{gosource} # Remove in F43 Provides: golang-mvdan-sh-3 = %{version}-%{release} Obsoletes: golang-mvdan-sh-3 < 3.7.0-2 %global godevelheader %{expand: Provides: golang-mvdan-sh-3-devel = %{version}-%{release} Obsoletes: golang-mvdan-sh-3-devel < 3.7.0-2} BuildRequires: scdoc %if %{with check} # Tests BuildRequires: golang(github.com/creack/pty) BuildRequires: golang(github.com/frankban/quicktest) 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 %generate_buildrequires %go_generate_buildrequires %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 -t cmd %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 %autochangelog