]>
Commit | Line | Data |
---|---|---|
c4f6ac36 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
013c9502 | 5 | %define pkgname text |
12768e02 JB |
6 | Summary: A Haskell library for manipulation of Unicode text |
7 | Summary(pl.UTF-8): Biblioteka Haskella do operacji na tekście kodowanym w Unicode | |
013c9502 | 8 | Name: ghc-%{pkgname} |
12768e02 JB |
9 | Version: 1.0.0.0 |
10 | Release: 1 | |
013c9502 JP |
11 | License: BSD |
12 | Group: Development/Languages | |
12768e02 JB |
13 | #Source0Download: http://hackage.haskell.org/package/text |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
15 | # Source0-md5: 6c76d0b7a6e5d2f4e0d0359b28e4a3e2 | |
16 | URL: http://hackage.haskell.org/package/text | |
013c9502 | 17 | BuildRequires: ghc >= 6.12.3 |
aa37bbd5 JB |
18 | BuildRequires: ghc-array >= 0.3 |
19 | BuildRequires: ghc-base >= 4.2 | |
20 | BuildRequires: ghc-base < 5 | |
21 | BuildRequires: ghc-bytestring >= 0.9 | |
22 | BuildRequires: ghc-deepseq >= 1.1.0.0 | |
23 | BuildRequires: ghc-ghc-prim >= 0.2 | |
24 | BuildRequires: ghc-integer-gmp >= 0.2 | |
25 | %if %{with prof} | |
26 | BuildRequires: ghc-prof >= 6.12.3 | |
27 | BuildRequires: ghc-array-prof >= 0.3 | |
28 | BuildRequires: ghc-base-prof >= 4.2 | |
29 | BuildRequires: ghc-base-prof < 5 | |
30 | BuildRequires: ghc-bytestring-prof >= 0.9 | |
31 | BuildRequires: ghc-deepseq-prof >= 1.1.0.0 | |
32 | BuildRequires: ghc-ghc-prim-prof >= 0.2 | |
33 | BuildRequires: ghc-integer-gmp-prof >= 0.2 | |
34 | %endif | |
013c9502 JP |
35 | BuildRequires: rpmbuild(macros) >= 1.608 |
36 | %requires_eq ghc | |
aa37bbd5 JB |
37 | Requires: ghc-array >= 0.3 |
38 | Requires: ghc-base >= 4.2 | |
39 | Requires: ghc-base < 5 | |
40 | Requires: ghc-bytestring >= 0.9 | |
41 | Requires: ghc-deepseq >= 1.1.0.0 | |
42 | Requires: ghc-ghc-prim >= 0.2 | |
43 | Requires: ghc-integer-gmp >= 0.2 | |
013c9502 JP |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | # debuginfo is not useful for ghc | |
47 | %define _enable_debug_packages 0 | |
48 | ||
aa37bbd5 JB |
49 | # don't compress haddock files |
50 | %define _noautocompressdoc *.haddock | |
51 | ||
013c9502 | 52 | %description |
12768e02 JB |
53 | This package provides the Data.Text library, a library for the space- |
54 | and time-efficient manipulation of Unicode text in Haskell. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Ten pakiet dostarcza bibliotekę Data.Text - służącą do wydajnych pod | |
58 | względem objętości i czasu operacji na tekście kodowanym w Unicode z | |
59 | poziomu Haskella. | |
013c9502 | 60 | |
e70a3a89 JB |
61 | %package prof |
62 | Summary: Profiling %{pkgname} library for GHC | |
63 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
64 | Group: Development/Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
aa37bbd5 JB |
66 | Requires: ghc-array-prof >= 0.3 |
67 | Requires: ghc-base-prof >= 4.2 | |
68 | Requires: ghc-base-prof < 5 | |
69 | Requires: ghc-bytestring-prof >= 0.9 | |
70 | Requires: ghc-deepseq-prof >= 1.1.0.0 | |
71 | Requires: ghc-ghc-prim-prof >= 0.2 | |
72 | Requires: ghc-integer-gmp-prof >= 0.2 | |
e70a3a89 JB |
73 | |
74 | %description prof | |
75 | Profiling %{pkgname} library for GHC. Should be installed when | |
76 | GHC's profiling subsystem is needed. | |
77 | ||
78 | %description prof -l pl.UTF-8 | |
79 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
80 | kiedy potrzebujemy systemu profilującego z GHC. | |
81 | ||
013c9502 | 82 | %package doc |
12768e02 JB |
83 | Summary: HTML documentation for %{pkgname} ghc package |
84 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
013c9502 JP |
85 | Group: Documentation |
86 | ||
87 | %description doc | |
12768e02 | 88 | HTML documentation for %{pkgname} ghc package. |
013c9502 JP |
89 | |
90 | %description doc -l pl.UTF-8 | |
12768e02 | 91 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. |
013c9502 JP |
92 | |
93 | %prep | |
94 | %setup -q -n %{pkgname}-%{version} | |
95 | ||
96 | %build | |
97 | runhaskell Setup.lhs configure -v2 \ | |
c4f6ac36 | 98 | %{?with_prof:--enable-library-profiling} \ |
013c9502 JP |
99 | --prefix=%{_prefix} \ |
100 | --libdir=%{_libdir} \ | |
101 | --libexecdir=%{_libexecdir} \ | |
102 | --docdir=%{_docdir}/%{name}-%{version} | |
103 | ||
104 | runhaskell Setup.lhs build | |
105 | runhaskell Setup.lhs haddock --executables | |
106 | ||
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
110 | ||
111 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
112 | ||
113 | # work around automatic haddock docs installation | |
114 | rm -rf %{name}-%{version}-doc | |
115 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
116 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
117 | ||
118 | runhaskell Setup.lhs register \ | |
119 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
120 | ||
121 | %clean | |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %post | |
125 | %ghc_pkg_recache | |
126 | ||
127 | %postun | |
128 | %ghc_pkg_recache | |
129 | ||
130 | %files | |
131 | %defattr(644,root,root,755) | |
12768e02 | 132 | %doc LICENSE README.markdown changelog |
013c9502 | 133 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
e70a3a89 JB |
134 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
135 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HStext-%{version}.o | |
136 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStext-%{version}.a | |
137 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
138 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text.hi | |
139 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text | |
140 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/*.hi | |
141 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Encoding | |
142 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Encoding/*.hi | |
143 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Encoding/Fusion | |
144 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Encoding/Fusion/*.hi | |
145 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Fusion | |
146 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Fusion/*.hi | |
147 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/IO | |
148 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/IO/*.hi | |
149 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy | |
150 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/*.hi | |
151 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder | |
152 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/*.hi | |
153 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/Int | |
154 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/Int/*.hi | |
155 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/RealFloat | |
156 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/RealFloat/*.hi | |
157 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Encoding | |
158 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Encoding/*.hi | |
159 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Unsafe | |
160 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Unsafe/*.hi | |
161 | ||
c4f6ac36 | 162 | %if %{with prof} |
e70a3a89 JB |
163 | %files prof |
164 | %defattr(644,root,root,755) | |
165 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStext-%{version}_p.a | |
166 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text.p_hi | |
167 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/*.p_hi | |
168 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Encoding/*.p_hi | |
169 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Encoding/Fusion/*.p_hi | |
170 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Fusion/*.p_hi | |
171 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/IO/*.p_hi | |
172 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/*.p_hi | |
173 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/*.p_hi | |
174 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/Int/*.p_hi | |
175 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Builder/RealFloat/*.p_hi | |
176 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Lazy/Encoding/*.p_hi | |
177 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Text/Unsafe/*.p_hi | |
c4f6ac36 | 178 | %endif |
013c9502 JP |
179 | |
180 | %files doc | |
181 | %defattr(644,root,root,755) | |
182 | %doc %{name}-%{version}-doc/* |