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