]>
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 |
55b90c8d | 5 | Release: 4 |
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 | 11 | BuildRequires: cpphs |
55b90c8d | 12 | BuildRequires: cpphs-prof |
89afe562 | 13 | BuildRequires: ghc >= 6.12.3 |
a480dca3 | 14 | BuildRequires: rpmbuild(macros) >= 1.608 |
89afe562 | 15 | Requires: cpphs |
f8a7566b | 16 | %requires_eq ghc |
a43a39d9 | 17 | Obsoletes: ghc-haskell-src-exts-doc |
89afe562 JR |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
f8a7566b ER |
20 | # debuginfo is not useful for ghc |
21 | %define _enable_debug_packages 0 | |
71a15fe1 | 22 | %define _noautocompressdoc *.haddock |
f8a7566b | 23 | |
89afe562 JR |
24 | %description |
25 | Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension | |
26 | of the standard haskell-src package, and handles most registered | |
27 | syntactic extensions to Haskell, including: | |
28 | ||
29 | * Multi-parameter type classes with functional dependencies | |
30 | * Indexed type families (including associated types) | |
31 | * Empty data declarations | |
32 | * GADTs | |
33 | * Implicit parameters | |
34 | * Template Haskell | |
35 | ||
36 | and a few more. All extensions implemented in GHC are supported. | |
37 | Apart from these standard extensions, it also handles regular patterns | |
38 | as per the HaRP extension as well as HSX-style embedded XML syntax. | |
39 | ||
55b90c8d JR |
40 | %package prof |
41 | Summary: Profiling %{pkgname} library for GHC | |
42 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
43 | Group: Development/Libraries | |
44 | Requires: %{name} = %{version}-%{release} | |
45 | Requires: cpphs-prof | |
46 | ||
47 | %description prof | |
48 | Profiling %{pkgname} library for GHC. Should be installed when | |
49 | GHC's profiling subsystem is needed. | |
50 | ||
51 | %description prof -l pl.UTF-8 | |
52 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
53 | kiedy potrzebujemy systemu profilującego z GHC. | |
54 | ||
89afe562 JR |
55 | %prep |
56 | %setup -q -n %{pkgname}-%{version} | |
57 | ||
58 | %build | |
55b90c8d | 59 | runhaskell Setup.hs configure -v2 --enable-library-profiling \ |
89afe562 JR |
60 | --prefix=%{_prefix} \ |
61 | --libdir=%{_libdir} \ | |
62 | --libexecdir=%{_libexecdir} \ | |
63 | --docdir=%{_docdir}/%{name}-%{version} | |
64 | ||
65 | runhaskell Setup.hs build | |
66 | runhaskell Setup.hs haddock --executables | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
71 | ||
72 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
73 | ||
74 | # work around automatic haddock docs installation | |
75 | rm -rf %{name}-%{version}-doc | |
a43a39d9 | 76 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc |
89afe562 JR |
77 | |
78 | runhaskell Setup.hs register \ | |
79 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post | |
a480dca3 | 85 | %ghc_pkg_recache |
89afe562 JR |
86 | |
87 | %postun | |
a480dca3 | 88 | %ghc_pkg_recache |
89afe562 JR |
89 | |
90 | %files | |
91 | %defattr(644,root,root,755) | |
2056cc9d | 92 | %doc CHANGELOG |
a43a39d9 | 93 | %doc %{name}-%{version}-doc/* |
89afe562 | 94 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
55b90c8d JR |
95 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
96 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o | |
97 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a | |
98 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
99 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.hi | |
100 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Exts/*.hi | |
101 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Exts/Annotated/*.hi | |
102 | ||
103 | %files prof | |
104 | %defattr(644,root,root,755) | |
105 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
106 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.p_hi | |
107 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Exts/*.p_hi | |
108 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Exts/Annotated/*.p_hi |