3 %bcond_with tests # disable all tests for now to avoid linking QuickCheck
5 %define pkg_name ShellCheck
6 Summary: Shell script analysis tool
12 Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
13 # Source0-md5: af1b59fc0ac1836bb993b0368febe26f
14 Patch0: ShellCheck-disable-TemplateHaskell-runTests.patch
15 URL: http://www.shellcheck.net/
16 BuildRequires: ghc-Cabal-devel
17 BuildRequires: ghc-rpm-macros
18 # Begin cabal-rpm deps:
19 BuildRequires: chrpath
20 BuildRequires: ghc-containers-devel
21 BuildRequires: ghc-directory-devel
22 BuildRequires: ghc-json-devel
23 BuildRequires: ghc-mtl-devel
24 BuildRequires: ghc-parsec-devel
25 BuildRequires: ghc-quickcheck-devel
26 BuildRequires: ghc-regex-tdfa-devel
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 The goals of ShellCheck are:
33 - To point out and clarify typical beginner's syntax issues, that
34 causes a shell to give cryptic error messages.
35 - To point out and clarify typical intermediate level semantic
36 problems, that causes a shell to behave strangely and
38 - To point out subtle caveats, corner cases and pitfalls, that may
39 cause an advanced user's otherwise working script to fail under future
42 %package -n ghc-%{pkg_name}
43 Summary: Haskell %{pkg_name} library
45 %description -n ghc-%{pkg_name}
46 This package provides the Haskell %{pkg_name} shared library.
48 %package -n ghc-%{pkg_name}-devel
49 Summary: Haskell %{pkg_name} library development files
50 Requires: ghc-compiler = %{ghc_version}
51 Provides: ghc-%{pkg_name}-static = %{version}-%{release}
52 Requires(post): ghc-compiler = %{ghc_version}
53 Requires(postun): ghc-compiler = %{ghc_version}
54 Requires: ghc-%{pkg_name} = %{version}-%{release}
56 %description -n ghc-%{pkg_name}-devel
57 This package provides the Haskell %{pkg_name} library development
61 %setup -q -n ShellCheck-%{version}
66 pandoc -s -t man shellcheck.1.md -o shellcheck.1
74 rm -rf $RPM_BUILD_ROOT
76 %ghc_fix_rpath %{pkgver}
78 cp -p shellcheck.1 $RPM_BUILD_ROOT%{_mandir}/man1/shellcheck.1
81 rm -rf $RPM_BUILD_ROOT
83 %post -n ghc-%{pkg_name}-devel
86 %postun -n ghc-%{pkg_name}-devel
90 %defattr(644,root,root,755)
93 %attr(755,root,root) %{_bindir}/shellcheck
94 %{_mandir}/man1/shellcheck.1*
96 %files -n ghc-%{pkg_name} -f ghc-%{pkg_name}.files
97 %defattr(644,root,root,755)
100 %files -n ghc-%{pkg_name}-devel -f ghc-%{pkg_name}-devel.files
101 %defattr(644,root,root,755)