]> git.pld-linux.org Git - packages/hlint.git/blob - hlint.spec
c58bbd2122d85ad3909e534e465a1ae7bf4fc501
[packages/hlint.git] / hlint.spec
1 Summary:        Haskell Source code suggestions
2 Name:           hlint
3 Version:        1.8.45
4 Release:        1
5 License:        GPL
6 Group:          Development/Languages
7 Source0:        http://hackage.haskell.org/packages/archive/hlint/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  a317df7355d572b2aaa7402a76760725
9 URL:            http://community.haskell.org/~ndm/hlint/
10 BuildRequires:  cpphs
11 BuildRequires:  ghc >= 6.12.3
12 BuildRequires:  ghc-haskell-src-exts
13 BuildRequires:  ghc-transformers
14 BuildRequires:  ghc-uniplate
15 BuildRequires:  hscolour
16 BuildRequires:  rpmbuild(macros) >= 1.608
17 %requires_eq    ghc
18 Obsoletes:      hlint-doc
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 # debuginfo is not useful for ghc
22 %define         _enable_debug_packages  0
23
24 # don't compress haddoc files
25 %define         _noautocompressdoc      *.haddock
26
27 %description
28 HLint gives suggestions on how to improve your source code.
29
30 %prep
31 %setup -q
32
33 %build
34 runhaskell Setup.hs configure -v2 \
35         --prefix=%{_prefix} \
36         --libdir=%{_libdir} \
37         --libexecdir=%{_libexecdir} \
38         --docdir=%{_docdir}/%{name}-%{version}
39
40 runhaskell Setup.hs build
41 runhaskell Setup.hs haddock --executables
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
46
47 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
48
49 # work around automatic haddock docs installation
50 %{__rm} -rf %{name}-%{version}-doc
51 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
52 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
53
54 runhaskell Setup.hs register \
55         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %post
61 %ghc_pkg_recache
62
63 %postun
64 %ghc_pkg_recache
65
66 %files
67 %defattr(644,root,root,755)
68 %doc %{name}-%{version}-doc/*
69 %attr(755,root,root) %{_bindir}/hlint
70 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
71 %{_libdir}/%{ghcdir}/%{name}-%{version}
72 %{_datadir}/%{name}-%{version}
This page took 0.069534 seconds and 2 git commands to generate.