Package shellcheck: Specfile

# shellcheck requires newer modules then we have in Sisyphus
# So... We build static shellcheck with bundled new modules.
%def_disable getsource

Name: shellcheck
Version: 0.8.0
Release: alt1
License: GPL-3.0-or-later
Group: Development/Tools

BuildRequires: /proc ghc8.6.4 ghc8.6.4-cabal-install pandoc

%if_disabled getsource
Source: %name-%version.tar


Summary: Shell script analysis tool

The goals of ShellCheck are:
* To point out and clarify typical beginner's syntax issues, that causes
a shell to give cryptic error messages;
* To point out and clarify typical intermediate level semantic problems,
that causes a shell to behave strangely and counter-intuitively;
* To point out subtle caveats, corner cases and pitfalls, that may cause
an advanced user's otherwise working script to fail under future

%if_enabled getsource
%setup -c -T

%if_enabled getsource
rm -rf $HOME/.cabal
mkdir shellcheck-%version
ln -s -r -f shellcheck-%version $HOME/.cabal
cabal new-update
cabal fetch ShellCheck-%version
echo '' | cabal new-repl -w ghc-8.6.4 --build-dep fail
tar -cf shellcheck-%version.tar shellcheck-%version
exit 1
rm -rf $HOME/.cabal
ln -s -r -f . $HOME/.cabal
cabal new-install %_smp_mflags ShellCheck-%version

pandoc -s -f markdown-smart -t man %SOURCE1 -o shellcheck.1

mkdir -p %buildroot%_bindir
mkdir -p %buildroot%_man1dir
cp bin/shellcheck %buildroot%_bindir
cp shellcheck.1 %buildroot%_man1dir


* Thu Jan 20 2022 Gleb F-Malinovskiy <> 0.8.0-alt1
- Updated to 0.8.0.

* Mon Oct 18 2021 Gleb F-Malinovskiy <> 0.7.2-alt1
- Updated to 0.7.2.

* Sat Mar 27 2021 Gleb F-Malinovskiy <> 0.7.1-alt1
- Updated to 0.7.1.

* Fri Aug 23 2019 Gleb F-Malinovskiy <> 0.7.0-alt1
- Updated to 0.7.0.

* Thu May 25 2017 Gleb F-Malinovskiy <> 0.4.6-alt1
- Updated to 0.4.6.

* Tue Nov 22 2016 Gleb F-Malinovskiy <> 0.4.5-alt1
- Initial build.