1 %define pkgname haskell-src
2 Summary: Support for manipulating Haskell source code
7 Group: Development/Languages
8 Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5: 32d181c082393ab859e72610803bac6e
10 URL: http://hackage.haskell.org/package/haskell-src/
11 BuildRequires: ghc >= 6.12.3
12 BuildRequires: rpmbuild(macros) >= 1.608
14 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16 # debuginfo is not useful for ghc
17 %define _enable_debug_packages 0
20 The haskell-src package provides support for manipulating Haskell
21 source code. The package provides a lexer, parser and pretty-printer,
22 and a definition of a Haskell abstract syntax tree (AST). Common uses
23 of this package are to parse or generate Haskell 98 code.
26 Summary: HTML documentation for %{pkgname}
27 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
31 HTML documentation for %{pkgname}.
33 %description doc -l pl.UTF-8
34 Dokumentacja w formacie HTML dla %{pkgname}.
37 %setup -q -n %{pkgname}-%{version}
40 runhaskell Setup.hs configure -v2 \
43 --libexecdir=%{_libexecdir} \
44 --docdir=%{_docdir}/%{name}-%{version}
46 runhaskell Setup.hs build
47 runhaskell Setup.hs haddock --executables
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
53 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
55 # work around automatic haddock docs installation
56 rm -rf %{name}-%{version}-doc
57 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
59 runhaskell Setup.hs register \
60 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
63 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
73 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
74 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
77 %defattr(644,root,root,755)
78 %doc %{name}-%{version}-doc/*