]>
Commit | Line | Data |
---|---|---|
89afe562 JR |
1 | %define pkgname haskell-src-exts |
2 | Summary: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer | |
3 | Name: ghc-%{pkgname} | |
4 | Version: 1.9.6 | |
5 | Release: 0.1 | |
6 | License: BSD | |
7 | Group: Development/Languages | |
8 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
9 | # Source0-md5: 5e73836ab3414ec029e93903b26563ca | |
10 | URL: http://hackage.haskell.org/package/%{pkgname}/ | |
11 | BuildRequires: cpphs | |
12 | BuildRequires: ghc >= 6.12.3 | |
13 | Requires: cpphs | |
14 | %requires_releq ghc | |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %define ghcdir ghc-%(/usr/bin/ghc --numeric-version) | |
18 | ||
19 | %description | |
20 | Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension | |
21 | of the standard haskell-src package, and handles most registered | |
22 | syntactic extensions to Haskell, including: | |
23 | ||
24 | * Multi-parameter type classes with functional dependencies | |
25 | * Indexed type families (including associated types) | |
26 | * Empty data declarations | |
27 | * GADTs | |
28 | * Implicit parameters | |
29 | * Template Haskell | |
30 | ||
31 | and a few more. All extensions implemented in GHC are supported. | |
32 | Apart from these standard extensions, it also handles regular patterns | |
33 | as per the HaRP extension as well as HSX-style embedded XML syntax. | |
34 | ||
35 | %prep | |
36 | %setup -q -n %{pkgname}-%{version} | |
37 | ||
38 | %build | |
39 | runhaskell Setup.hs configure -v2 \ | |
40 | --prefix=%{_prefix} \ | |
41 | --libdir=%{_libdir} \ | |
42 | --libexecdir=%{_libexecdir} \ | |
43 | --docdir=%{_docdir}/%{name}-%{version} | |
44 | ||
45 | runhaskell Setup.hs build | |
46 | runhaskell Setup.hs haddock --executables | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
51 | ||
52 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
53 | ||
54 | # work around automatic haddock docs installation | |
55 | rm -rf %{name}-%{version}-doc | |
56 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
57 | ||
58 | runhaskell Setup.hs register \ | |
59 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %post | |
65 | /usr/bin/ghc-pkg recache | |
66 | ||
67 | %postun | |
68 | /usr/bin/ghc-pkg recache | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc NEWS | |
73 | %doc %{name}-%{version}-doc/html | |
74 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
75 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |