Summary: Haskell Source code suggestions Name: hlint Version: 1.8.3 Release: 0.1 License: GPL Group: Development/Languages Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz # Source0-md5: af5a287804f0ed1ba41728febf74296f URL: http://community.haskell.org/~ndm/hlint/ BuildRequires: ghc >= 6.12.3 %requires_releq ghc BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define ghcdir ghc-%(/usr/bin/ghc --numeric-version) %description HLint gives suggestions on how to improve your source code. %prep %setup -q %build runhaskell Setup.hs configure -v2 \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ --docdir=%{_docdir}/%{name}-%{version} runhaskell Setup.hs build runhaskell Setup.hs haddock --executables %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT # work around automatic haddock docs installation rm -rf %{name}-%{version}-doc cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc runhaskell Setup.hs register \ --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf %clean rm -rf $RPM_BUILD_ROOT %post /usr/bin/ghc-pkg recache %postun /usr/bin/ghc-pkg recache %files %defattr(644,root,root,755) %doc NEWS %doc %{name}-%{version}-doc/html %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf %{_libdir}/%{ghcdir}/%{pkgname}-%{version}