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