]>
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 |
71a15fe1 | 5 | Release: 2 |
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 |
89afe562 JR |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
f8a7566b ER |
18 | # debuginfo is not useful for ghc |
19 | %define _enable_debug_packages 0 | |
71a15fe1 | 20 | %define _noautocompressdoc *.haddock |
f8a7566b | 21 | |
89afe562 JR |
22 | %description |
23 | Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension | |
24 | of the standard haskell-src package, and handles most registered | |
25 | syntactic extensions to Haskell, including: | |
26 | ||
27 | * Multi-parameter type classes with functional dependencies | |
28 | * Indexed type families (including associated types) | |
29 | * Empty data declarations | |
30 | * GADTs | |
31 | * Implicit parameters | |
32 | * Template Haskell | |
33 | ||
34 | and a few more. All extensions implemented in GHC are supported. | |
35 | Apart from these standard extensions, it also handles regular patterns | |
36 | as per the HaRP extension as well as HSX-style embedded XML syntax. | |
37 | ||
f8a7566b ER |
38 | %package doc |
39 | Summary: HTML documentation for %{pkgname} | |
40 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
41 | Group: Documentation | |
42 | ||
43 | %description doc | |
44 | HTML documentation for %{pkgname}. | |
45 | ||
46 | %description doc -l pl.UTF-8 | |
47 | Dokumentacja w formacie HTML dla %{pkgname}. | |
48 | ||
89afe562 JR |
49 | %prep |
50 | %setup -q -n %{pkgname}-%{version} | |
51 | ||
52 | %build | |
53 | runhaskell Setup.hs configure -v2 \ | |
54 | --prefix=%{_prefix} \ | |
55 | --libdir=%{_libdir} \ | |
56 | --libexecdir=%{_libexecdir} \ | |
57 | --docdir=%{_docdir}/%{name}-%{version} | |
58 | ||
59 | runhaskell Setup.hs build | |
60 | runhaskell Setup.hs haddock --executables | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
65 | ||
66 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
67 | ||
68 | # work around automatic haddock docs installation | |
69 | rm -rf %{name}-%{version}-doc | |
f8a7566b | 70 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc |
89afe562 JR |
71 | |
72 | runhaskell Setup.hs register \ | |
73 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
74 | ||
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %post | |
a480dca3 | 79 | %ghc_pkg_recache |
89afe562 JR |
80 | |
81 | %postun | |
a480dca3 | 82 | %ghc_pkg_recache |
89afe562 JR |
83 | |
84 | %files | |
85 | %defattr(644,root,root,755) | |
2056cc9d | 86 | %doc CHANGELOG |
89afe562 JR |
87 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
88 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
f8a7566b ER |
89 | |
90 | %files doc | |
91 | %defattr(644,root,root,755) | |
71a15fe1 | 92 | %doc %{name}-%{version}-doc/html |