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