]> git.pld-linux.org Git - SPECS.git/blob - shellcheck.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / shellcheck.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # disable all tests for now to avoid linking QuickCheck
4
5 %define         pkg_name        ShellCheck
6 Summary:        Shell script analysis tool
7 Name:           shellcheck
8 Version:        0.4.6
9 Release:        0.1
10 License:        GPL v3+
11 Group:          Development
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
27 # End cabal-rpm deps
28 BuildRequires:  pandoc
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
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
37   counter-intuitively.
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
40   circumstances.
41
42 %package -n ghc-%{pkg_name}
43 Summary:        Haskell %{pkg_name} library
44
45 %description -n ghc-%{pkg_name}
46 This package provides the Haskell %{pkg_name} shared library.
47
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}
55
56 %description -n ghc-%{pkg_name}-devel
57 This package provides the Haskell %{pkg_name} library development
58 files.
59
60 %prep
61 %setup -q -n ShellCheck-%{version}
62
63 %build
64 %ghc_lib_build
65
66 pandoc -s -t man shellcheck.1.md -o shellcheck.1
67
68 %check
69 %if %{with tests}
70 %cabal_test
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 %ghc_lib_install
76 %ghc_fix_rpath %{pkgver}
77
78 cp -p shellcheck.1 $RPM_BUILD_ROOT%{_mandir}/man1/shellcheck.1
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post -n ghc-%{pkg_name}-devel
84 %ghc_pkg_recache
85
86 %postun -n ghc-%{pkg_name}-devel
87 %ghc_pkg_recache
88
89 %files
90 %defattr(644,root,root,755)
91 %doc LICENSE
92 %doc README.md
93 %attr(755,root,root) %{_bindir}/shellcheck
94 %{_mandir}/man1/shellcheck.1*
95
96 %files -n ghc-%{pkg_name} -f ghc-%{pkg_name}.files
97 %defattr(644,root,root,755)
98 %doc LICENSE
99
100 %files -n ghc-%{pkg_name}-devel -f ghc-%{pkg_name}-devel.files
101 %defattr(644,root,root,755)
102 %doc README.md
This page took 0.0708 seconds and 3 git commands to generate.