## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec # 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.4.3 %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} BuildRequires: scdoc BuildRequires: golang(github.com/google/renameio/maybe) 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: 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 %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 * Wed Feb 23 2022 Robert-André Mauchin 3.4.3-2 - Add missing BR scdoc * Wed Feb 23 2022 Robert-André Mauchin 3.4.3-1 - Update to 3.4.3 (fix FTBFS) Close: rhbz#2045653 * Thu Jan 20 2022 Fedora Release Engineering 3.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Oct 25 2021 Davide Cavalca 3.4.0-1 - Update to 3.4.0 * Thu Jul 22 2021 Fedora Release Engineering - 3.2.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Apr 07 2021 Davide Cavalca - 3.2.4-1 - Initial package