]>
Commit | Line | Data |
---|---|---|
327b22f4 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
a480dca3 | 5 | %define pkgname haskell-src-exts |
89afe562 | 6 | Summary: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer |
327b22f4 | 7 | Summary(pl.UTF-8): Operacje na źródłach w Haskellu: abstraksyjna składnia, analiza leksykalna i składniowa, wypisywanie |
89afe562 | 8 | Name: ghc-%{pkgname} |
983bcc2d | 9 | Version: 1.18.2 |
246aed11 | 10 | Release: 2 |
89afe562 JR |
11 | License: BSD |
12 | Group: Development/Languages | |
327b22f4 JB |
13 | #Source0Download: http://hackage.haskell.org/package/haskell-src-exts |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
983bcc2d | 15 | # Source0-md5: 59d77928c66774aa80810b48dcc12541 |
327b22f4 JB |
16 | URL: http://hackage.haskell.org/package/haskell-src-exts |
17 | BuildRequires: cpphs >= 1.3 | |
89afe562 | 18 | BuildRequires: ghc >= 6.12.3 |
327b22f4 | 19 | BuildRequires: ghc-array >= 0.1 |
983bcc2d JP |
20 | BuildRequires: ghc-base >= 4.5 |
21 | BuildRequires: ghc-base < 5 | |
327b22f4 JB |
22 | BuildRequires: ghc-pretty >= 1.0 |
23 | %if %{with prof} | |
24 | BuildRequires: cpphs-prof >= 1.3 | |
25 | BuildRequires: ghc-prof >= 6.12.3 | |
26 | BuildRequires: ghc-array-prof >= 0.1 | |
983bcc2d JP |
27 | BuildRequires: ghc-base-prof >= 4.5 |
28 | BuildRequires: ghc-base-prof < 5 | |
327b22f4 JB |
29 | BuildRequires: ghc-pretty-prof >= 1.0 |
30 | %endif | |
a480dca3 | 31 | BuildRequires: rpmbuild(macros) >= 1.608 |
f8a7566b | 32 | %requires_eq ghc |
327b22f4 JB |
33 | Requires(post,postun): /usr/bin/ghc-pkg |
34 | Requires: cpphs >= 1.3 | |
35 | Requires: ghc-array >= 0.1 | |
983bcc2d JP |
36 | Requires: ghc-base >= 4.5 |
37 | Requires: ghc-base < 5 | |
327b22f4 | 38 | Requires: ghc-pretty >= 1.0 |
a43a39d9 | 39 | Obsoletes: ghc-haskell-src-exts-doc |
89afe562 JR |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
f8a7566b ER |
42 | # debuginfo is not useful for ghc |
43 | %define _enable_debug_packages 0 | |
327b22f4 JB |
44 | |
45 | # don't compress haddock files | |
71a15fe1 | 46 | %define _noautocompressdoc *.haddock |
f8a7566b | 47 | |
89afe562 JR |
48 | %description |
49 | Haskell-Source with Extensions (HSE, haskell-src-exts) is an extension | |
50 | of the standard haskell-src package, and handles most registered | |
51 | syntactic extensions to Haskell, including: | |
52 | ||
53 | * Multi-parameter type classes with functional dependencies | |
54 | * Indexed type families (including associated types) | |
55 | * Empty data declarations | |
56 | * GADTs | |
57 | * Implicit parameters | |
58 | * Template Haskell | |
59 | ||
60 | and a few more. All extensions implemented in GHC are supported. | |
61 | Apart from these standard extensions, it also handles regular patterns | |
62 | as per the HaRP extension as well as HSX-style embedded XML syntax. | |
63 | ||
327b22f4 JB |
64 | %description -l pl.UTF-8 |
65 | Haskell-Source with Extensions (HSE, haskell-src-exts) to rozszerzenie | |
66 | standardowego pakietu haskell-src, obsługujące większość | |
67 | zarejestrowanych rozszerzeń składniowych do Haskella, w tym: | |
68 | ||
69 | - wieloparametrowe klasy typów z zależnościami funkcyjnymi | |
70 | - rodziny typów indeksowanych (w tym asocjacyjnych) | |
71 | - deklaracje pustych danych | |
72 | - GADT | |
73 | - parametry implikowane | |
74 | - Template Haskell | |
75 | ||
76 | i kilka innych. Obsługiwane są wszystkie rozszerzenia zaimplementowane | |
77 | w GHC. Poza tymi rozszerzeniami, pakiet obsługuje wzorce regularne | |
78 | zgodne z rozszerzeniem HaRP, a także składnię osadzonego XML-a w stylu | |
79 | HSX. | |
80 | ||
55b90c8d JR |
81 | %package prof |
82 | Summary: Profiling %{pkgname} library for GHC | |
83 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
84 | Group: Development/Libraries | |
85 | Requires: %{name} = %{version}-%{release} | |
327b22f4 JB |
86 | Requires: cpphs-prof >= 1.3 |
87 | Requires: ghc-array-prof >= 0.1 | |
983bcc2d JP |
88 | Requires: ghc-base-prof >= 4.5 |
89 | Requires: ghc-base-prof < 5 | |
327b22f4 | 90 | Requires: ghc-pretty-prof >= 1.0 |
55b90c8d JR |
91 | |
92 | %description prof | |
327b22f4 JB |
93 | Profiling %{pkgname} library for GHC. Should be installed when GHC's |
94 | profiling subsystem is needed. | |
55b90c8d JR |
95 | |
96 | %description prof -l pl.UTF-8 | |
97 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
98 | kiedy potrzebujemy systemu profilującego z GHC. | |
99 | ||
89afe562 JR |
100 | %prep |
101 | %setup -q -n %{pkgname}-%{version} | |
102 | ||
103 | %build | |
327b22f4 JB |
104 | runhaskell Setup.hs configure -v2 \ |
105 | %{?with_prof:--enable-library-profiling} \ | |
89afe562 JR |
106 | --prefix=%{_prefix} \ |
107 | --libdir=%{_libdir} \ | |
108 | --libexecdir=%{_libexecdir} \ | |
109 | --docdir=%{_docdir}/%{name}-%{version} | |
110 | ||
111 | runhaskell Setup.hs build | |
112 | runhaskell Setup.hs haddock --executables | |
113 | ||
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
117 | ||
118 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
119 | ||
120 | # work around automatic haddock docs installation | |
80abe821 | 121 | %{__rm} -rf %{name}-%{version}-doc |
a43a39d9 | 122 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc |
80abe821 | 123 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
89afe562 JR |
124 | |
125 | runhaskell Setup.hs register \ | |
327b22f4 | 126 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
89afe562 JR |
127 | |
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %post | |
a480dca3 | 132 | %ghc_pkg_recache |
89afe562 JR |
133 | |
134 | %postun | |
a480dca3 | 135 | %ghc_pkg_recache |
89afe562 JR |
136 | |
137 | %files | |
138 | %defattr(644,root,root,755) | |
327b22f4 | 139 | %doc CHANGELOG %{name}-%{version}-doc/* |
89afe562 | 140 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
55b90c8d | 141 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
327b22f4 JB |
142 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HShaskell-src-exts-%{version}.o |
143 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShaskell-src-exts-%{version}.a | |
0a6878c9 JR |
144 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language |
145 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell | |
55b90c8d | 146 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.hi |
327b22f4 | 147 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Exts |
55b90c8d | 148 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Exts/*.hi |
55b90c8d | 149 | |
983bcc2d | 150 | %if %{with prof} |
55b90c8d JR |
151 | %files prof |
152 | %defattr(644,root,root,755) | |
327b22f4 | 153 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShaskell-src-exts-%{version}_p.a |
55b90c8d JR |
154 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.p_hi |
155 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Exts/*.p_hi | |
983bcc2d | 156 | %endif |