]>
Commit | Line | Data |
---|---|---|
67ba6e81 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
543a17fb JR |
5 | %define pkgname snap-core |
6 | Summary: Snap: A Haskell Web Framework (core interfaces and types) | |
67ba6e81 | 7 | Summary(pl.UTF-8): Snap - szkielet WWW dla Haskella (główne interfejsy i typy) |
543a17fb | 8 | Name: ghc-%{pkgname} |
67ba6e81 JB |
9 | Version: 0.9.5.0 |
10 | Release: 1 | |
543a17fb JR |
11 | License: BSD |
12 | Group: Development/Languages | |
67ba6e81 JB |
13 | #Source0Download: http://hackage.haskell.org/package/snap-core |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
15 | # Source0-md5: e347d1aeee7a2990d211b9d1556c125d | |
16 | Patch0: %{name}-deps.patch | |
17 | URL: http://hackage.haskell.org/package/snap-core | |
543a17fb | 18 | BuildRequires: ghc >= 6.12.3 |
67ba6e81 JB |
19 | BuildRequires: ghc-HUnit >= 1.2 |
20 | BuildRequires: ghc-HUnit < 2 | |
21 | BuildRequires: ghc-MonadCatchIO-transformers >= 0.2.1 | |
22 | BuildRequires: ghc-MonadCatchIO-transformers < 0.4 | |
23 | BuildRequires: ghc-attoparsec >= 0.10 | |
24 | BuildRequires: ghc-attoparsec < 0.11 | |
25 | BuildRequires: ghc-attoparsec-enumerator >= 0.3 | |
26 | BuildRequires: ghc-attoparsec-enumerator < 0.4 | |
27 | BuildRequires: ghc-base >= 4 | |
28 | BuildRequires: ghc-base < 5 | |
543a17fb | 29 | BuildRequires: ghc-blaze-builder >= 0.2.1.4 |
67ba6e81 JB |
30 | BuildRequires: ghc-blaze-builder < 0.4 |
31 | BuildRequires: ghc-blaze-builder-enumerator >= 0.2 | |
32 | BuildRequires: ghc-blaze-builder-enumerator < 0.3 | |
33 | BuildRequires: ghc-bytestring >= 0.9 | |
34 | BuildRequires: ghc-bytestring < 0.11 | |
543a17fb | 35 | BuildRequires: ghc-case-insensitive >= 0.3 |
67ba6e81 JB |
36 | BuildRequires: ghc-case-insensitive < 1.2 |
37 | BuildRequires: ghc-containers >= 0.3 | |
38 | BuildRequires: ghc-containers < 1.0 | |
39 | BuildRequires: ghc-deepseq >= 1.1 | |
40 | BuildRequires: ghc-deepseq < 1.4 | |
41 | BuildRequires: ghc-directory >= 1 | |
42 | BuildRequires: ghc-directory < 2 | |
43 | BuildRequires: ghc-enumerator >= 0.4.15 | |
44 | BuildRequires: ghc-enumerator < 0.5 | |
45 | BuildRequires: ghc-filepath >= 1.1 | |
46 | BuildRequires: ghc-filepath < 2.0 | |
47 | BuildRequires: ghc-hashable >= 1.2.1 | |
48 | BuildRequires: ghc-hashable < 1.3 | |
49 | BuildRequires: ghc-mtl >= 2.0 | |
50 | BuildRequires: ghc-mtl < 2.2 | |
51 | BuildRequires: ghc-random >= 1 | |
52 | BuildRequires: ghc-random < 2 | |
53 | BuildRequires: ghc-regex-posix >= 0.95 | |
54 | BuildRequires: ghc-regex-posix < 1 | |
55 | BuildRequires: ghc-text >= 0.11 | |
56 | BuildRequires: ghc-time >= 1.0 | |
57 | BuildRequires: ghc-time < 1.5 | |
58 | BuildRequires: ghc-unix >= 2.4 | |
59 | BuildRequires: ghc-unix < 3.0 | |
60 | BuildRequires: ghc-unix-compat >= 0.2 | |
61 | BuildRequires: ghc-unix-compat < 0.5 | |
62 | BuildRequires: ghc-unordered-containers >= 0.1.4.3 | |
63 | BuildRequires: ghc-unordered-containers < 0.3 | |
64 | BuildRequires: ghc-vector >= 0.6 | |
65 | BuildRequires: ghc-vector < 0.11 | |
66 | BuildRequires: ghc-zlib-enum >= 0.2.1 | |
67 | BuildRequires: ghc-zlib-enum < 0.3 | |
68 | %if %{with prof} | |
69 | BuildRequires: ghc-prof >= 6.12.3 | |
543a17fb | 70 | BuildRequires: ghc-HUnit-prof >= 1.2 |
67ba6e81 | 71 | BuildRequires: ghc-HUnit-prof < 2 |
543a17fb | 72 | BuildRequires: ghc-MonadCatchIO-transformers-prof >= 0.2.1 |
67ba6e81 JB |
73 | BuildRequires: ghc-MonadCatchIO-transformers-prof < 0.4 |
74 | BuildRequires: ghc-attoparsec-prof >= 0.10 | |
75 | BuildRequires: ghc-attoparsec-prof < 0.11 | |
76 | BuildRequires: ghc-attoparsec-enumerator-prof >= 0.3 | |
77 | BuildRequires: ghc-attoparsec-enumerator-prof < 0.4 | |
78 | BuildRequires: ghc-base-prof >= 4 | |
79 | BuildRequires: ghc-base-prof < 5 | |
80 | BuildRequires: ghc-blaze-builder-prof >= 0.2.1.4 | |
81 | BuildRequires: ghc-blaze-builder-prof < 0.4 | |
82 | BuildRequires: ghc-blaze-builder-enumerator-prof >= 0.2 | |
83 | BuildRequires: ghc-blaze-builder-enumerator-prof < 0.3 | |
84 | BuildRequires: ghc-bytestring-prof >= 0.9 | |
85 | BuildRequires: ghc-bytestring-prof < 0.11 | |
86 | BuildRequires: ghc-case-insensitive-prof >= 0.3 | |
87 | BuildRequires: ghc-case-insensitive-prof < 1.2 | |
88 | BuildRequires: ghc-containers-prof >= 0.3 | |
89 | BuildRequires: ghc-containers-prof < 1.0 | |
90 | BuildRequires: ghc-deepseq-prof >= 1.1 | |
91 | BuildRequires: ghc-deepseq-prof < 1.4 | |
92 | BuildRequires: ghc-directory-prof >= 1 | |
93 | BuildRequires: ghc-directory-prof < 2 | |
94 | BuildRequires: ghc-enumerator-prof >= 0.4.15 | |
95 | BuildRequires: ghc-enumerator-prof < 0.5 | |
96 | BuildRequires: ghc-filepath-prof >= 1.1 | |
97 | BuildRequires: ghc-filepath-prof < 2.0 | |
98 | BuildRequires: ghc-hashable-prof >= 1.2.1 | |
99 | BuildRequires: ghc-hashable-prof < 1.3 | |
543a17fb | 100 | BuildRequires: ghc-mtl-prof >= 2.0 |
67ba6e81 JB |
101 | BuildRequires: ghc-mtl-prof < 2.2 |
102 | BuildRequires: ghc-random-prof >= 1 | |
103 | BuildRequires: ghc-random-prof < 2 | |
543a17fb | 104 | BuildRequires: ghc-regex-posix-prof >= 0.95 |
67ba6e81 JB |
105 | BuildRequires: ghc-regex-posix-prof < 1 |
106 | BuildRequires: ghc-text-prof >= 0.11 | |
107 | BuildRequires: ghc-time-prof >= 1.0 | |
108 | BuildRequires: ghc-time-prof < 1.5 | |
109 | BuildRequires: ghc-unix-prof >= 2.4 | |
110 | BuildRequires: ghc-unix-prof < 3.0 | |
543a17fb | 111 | BuildRequires: ghc-unix-compat-prof >= 0.2 |
67ba6e81 | 112 | BuildRequires: ghc-unix-compat-prof < 0.5 |
543a17fb | 113 | BuildRequires: ghc-unordered-containers-prof >= 0.1.4.3 |
67ba6e81 | 114 | BuildRequires: ghc-unordered-containers-prof < 0.3 |
543a17fb | 115 | BuildRequires: ghc-vector-prof >= 0.6 |
67ba6e81 | 116 | BuildRequires: ghc-vector-prof < 0.11 |
543a17fb | 117 | BuildRequires: ghc-zlib-enum-prof >= 0.2.1 |
67ba6e81 JB |
118 | BuildRequires: ghc-zlib-enum-prof < 0.3 |
119 | %endif | |
543a17fb | 120 | BuildRequires: rpmbuild(macros) >= 1.608 |
543a17fb | 121 | Requires(post,postun): /usr/bin/ghc-pkg |
67ba6e81 | 122 | %requires_releq ghc |
543a17fb | 123 | Requires: ghc-HUnit >= 1.2 |
67ba6e81 | 124 | Requires: ghc-HUnit < 2 |
543a17fb | 125 | Requires: ghc-MonadCatchIO-transformers >= 0.2.1 |
67ba6e81 JB |
126 | Requires: ghc-MonadCatchIO-transformers < 0.4 |
127 | Requires: ghc-attoparsec >= 0.10 | |
128 | Requires: ghc-attoparsec < 0.11 | |
129 | Requires: ghc-attoparsec-enumerator >= 0.3 | |
130 | Requires: ghc-attoparsec-enumerator < 0.4 | |
131 | Requires: ghc-base >= 4 | |
132 | Requires: ghc-base < 5 | |
133 | Requires: ghc-blaze-builder >= 0.2.1.4 | |
134 | Requires: ghc-blaze-builder < 0.4 | |
135 | Requires: ghc-blaze-builder-enumerator >= 0.2 | |
136 | Requires: ghc-blaze-builder-enumerator < 0.3 | |
137 | Requires: ghc-bytestring >= 0.9 | |
138 | Requires: ghc-bytestring < 0.11 | |
139 | Requires: ghc-case-insensitive >= 0.3 | |
140 | Requires: ghc-case-insensitive < 1.2 | |
141 | Requires: ghc-containers >= 0.3 | |
142 | Requires: ghc-containers < 1.0 | |
143 | Requires: ghc-deepseq >= 1.1 | |
144 | Requires: ghc-deepseq < 1.4 | |
145 | Requires: ghc-directory >= 1 | |
146 | Requires: ghc-directory < 2 | |
147 | Requires: ghc-enumerator >= 0.4.15 | |
148 | Requires: ghc-enumerator < 0.5 | |
149 | Requires: ghc-filepath >= 1.1 | |
150 | Requires: ghc-filepath < 2.0 | |
151 | Requires: ghc-hashable >= 1.2.1 | |
152 | Requires: ghc-hashable < 1.3 | |
543a17fb | 153 | Requires: ghc-mtl >= 2.0 |
67ba6e81 JB |
154 | Requires: ghc-mtl < 2.2 |
155 | Requires: ghc-random >= 1 | |
156 | Requires: ghc-random < 2 | |
543a17fb | 157 | Requires: ghc-regex-posix >= 0.95 |
67ba6e81 JB |
158 | Requires: ghc-regex-posix < 1 |
159 | Requires: ghc-text >= 0.11 | |
160 | Requires: ghc-time >= 1.0 | |
161 | Requires: ghc-time < 1.5 | |
162 | Requires: ghc-unix >= 2.4 | |
163 | Requires: ghc-unix < 3.0 | |
543a17fb | 164 | Requires: ghc-unix-compat >= 0.2 |
67ba6e81 | 165 | Requires: ghc-unix-compat < 0.5 |
543a17fb | 166 | Requires: ghc-unordered-containers >= 0.1.4.3 |
67ba6e81 | 167 | Requires: ghc-unordered-containers < 0.3 |
543a17fb | 168 | Requires: ghc-vector >= 0.6 |
67ba6e81 | 169 | Requires: ghc-vector < 0.11 |
543a17fb | 170 | Requires: ghc-zlib-enum >= 0.2.1 |
67ba6e81 | 171 | Requires: ghc-zlib-enum < 0.3 |
543a17fb JR |
172 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
173 | ||
174 | # debuginfo is not useful for ghc | |
175 | %define _enable_debug_packages 0 | |
176 | ||
67ba6e81 | 177 | # don't compress haddock files |
543a17fb JR |
178 | %define _noautocompressdoc *.haddock |
179 | ||
180 | %description | |
181 | Snap is a simple and fast web development framework and server written | |
67ba6e81 JB |
182 | in Haskell. For more information you can visit the Snap project |
183 | website at <http://snapframework.com/>. | |
184 | ||
185 | %description -l pl.UTF-8 | |
186 | Snap to prosty i szybki szkielet programistyczny oraz serwer WWW, | |
187 | napisany w Haskellu. Więcej informacji można znaleźć na stronie | |
188 | projektu: <http://snapframework.com/>. | |
543a17fb JR |
189 | |
190 | %package prof | |
191 | Summary: Profiling %{pkgname} library for GHC | |
192 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
193 | Group: Development/Libraries | |
194 | Requires: %{name} = %{version}-%{release} | |
67ba6e81 JB |
195 | Requires: ghc-HUnit-prof >= 1.2 |
196 | Requires: ghc-HUnit-prof < 2 | |
197 | Requires: ghc-MonadCatchIO-transformers-prof >= 0.2.1 | |
198 | Requires: ghc-MonadCatchIO-transformers-prof < 0.4 | |
199 | Requires: ghc-attoparsec-prof >= 0.10 | |
200 | Requires: ghc-attoparsec-prof < 0.11 | |
201 | Requires: ghc-attoparsec-enumerator-prof >= 0.3 | |
202 | Requires: ghc-attoparsec-enumerator-prof < 0.4 | |
203 | Requires: ghc-base-prof >= 4 | |
204 | Requires: ghc-base-prof < 5 | |
205 | Requires: ghc-blaze-builder-prof >= 0.2.1.4 | |
206 | Requires: ghc-blaze-builder-prof < 0.4 | |
207 | Requires: ghc-blaze-builder-enumerator-prof >= 0.2 | |
208 | Requires: ghc-blaze-builder-enumerator-prof < 0.3 | |
209 | Requires: ghc-bytestring-prof >= 0.9 | |
210 | Requires: ghc-bytestring-prof < 0.11 | |
211 | Requires: ghc-case-insensitive-prof >= 0.3 | |
212 | Requires: ghc-case-insensitive-prof < 1.2 | |
213 | Requires: ghc-containers-prof >= 0.3 | |
214 | Requires: ghc-containers-prof < 1.0 | |
215 | Requires: ghc-deepseq-prof >= 1.1 | |
216 | Requires: ghc-deepseq-prof < 1.4 | |
217 | Requires: ghc-directory-prof >= 1 | |
218 | Requires: ghc-directory-prof < 2 | |
219 | Requires: ghc-enumerator-prof >= 0.4.15 | |
220 | Requires: ghc-enumerator-prof < 0.5 | |
221 | Requires: ghc-filepath-prof >= 1.1 | |
222 | Requires: ghc-filepath-prof < 2.0 | |
223 | Requires: ghc-hashable-prof >= 1.2.1 | |
224 | Requires: ghc-hashable-prof < 1.3 | |
225 | Requires: ghc-mtl-prof >= 2.0 | |
226 | Requires: ghc-mtl-prof < 2.2 | |
227 | Requires: ghc-random-prof >= 1 | |
228 | Requires: ghc-random-prof < 2 | |
229 | Requires: ghc-regex-posix-prof >= 0.95 | |
230 | Requires: ghc-regex-posix-prof < 1 | |
231 | Requires: ghc-text-prof >= 0.11 | |
232 | Requires: ghc-time-prof >= 1.0 | |
233 | Requires: ghc-time-prof < 1.5 | |
234 | Requires: ghc-unix-prof >= 2.4 | |
235 | Requires: ghc-unix-prof < 3.0 | |
236 | Requires: ghc-unix-compat-prof >= 0.2 | |
237 | Requires: ghc-unix-compat-prof < 0.5 | |
238 | Requires: ghc-unordered-containers-prof >= 0.1.4.3 | |
239 | Requires: ghc-unordered-containers-prof < 0.3 | |
240 | Requires: ghc-vector-prof >= 0.6 | |
241 | Requires: ghc-vector-prof < 0.11 | |
242 | Requires: ghc-zlib-enum-prof >= 0.2.1 | |
243 | Requires: ghc-zlib-enum-prof < 0.3 | |
543a17fb JR |
244 | |
245 | %description prof | |
67ba6e81 JB |
246 | Profiling %{pkgname} library for GHC. Should be installed when GHC's |
247 | profiling subsystem is needed. | |
543a17fb JR |
248 | |
249 | %description prof -l pl.UTF-8 | |
250 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
251 | kiedy potrzebujemy systemu profilującego z GHC. | |
252 | ||
253 | %prep | |
254 | %setup -q -n %{pkgname}-%{version} | |
67ba6e81 | 255 | %patch0 -p1 |
543a17fb JR |
256 | |
257 | %build | |
67ba6e81 JB |
258 | runhaskell Setup.hs configure -v2 \ |
259 | %{?with_prof:--enable-library-profiling} \ | |
543a17fb JR |
260 | --prefix=%{_prefix} \ |
261 | --libdir=%{_libdir} \ | |
262 | --libexecdir=%{_libexecdir} \ | |
263 | --docdir=%{_docdir}/%{name}-%{version} | |
264 | ||
265 | runhaskell Setup.hs build | |
266 | runhaskell Setup.hs haddock --executables | |
267 | ||
268 | %install | |
269 | rm -rf $RPM_BUILD_ROOT | |
270 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
271 | ||
272 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
273 | ||
274 | # work around automatic haddock docs installation | |
275 | %{__rm} -rf %{name}-%{version}-doc | |
276 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
277 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
278 | ||
279 | runhaskell Setup.hs register \ | |
67ba6e81 | 280 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
543a17fb JR |
281 | |
282 | %clean | |
283 | rm -rf $RPM_BUILD_ROOT | |
284 | ||
285 | %post | |
286 | %ghc_pkg_recache | |
287 | ||
288 | %postun | |
289 | %ghc_pkg_recache | |
290 | ||
291 | %files | |
292 | %defattr(644,root,root,755) | |
67ba6e81 | 293 | %doc CONTRIBUTORS README* %{name}-%{version}-doc/* |
543a17fb JR |
294 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
295 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
67ba6e81 JB |
296 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSsnap-core-%{version}.o |
297 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsnap-core-%{version}.a | |
543a17fb JR |
298 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap |
299 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/*.hi | |
300 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal | |
301 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/*.hi | |
302 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http | |
303 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http/*.hi | |
304 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Iteratee | |
305 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Iteratee/*.hi | |
306 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Parsing | |
307 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Parsing/*.hi | |
308 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Test | |
309 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Test/*.hi | |
310 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Types | |
311 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Types/*.hi | |
312 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Util | |
313 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Util/*.hi | |
314 | ||
315 | %files prof | |
316 | %defattr(644,root,root,755) | |
67ba6e81 | 317 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsnap-core-%{version}_p.a |
543a17fb JR |
318 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/*.p_hi |
319 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/*.p_hi | |
320 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http/*.p_hi | |
321 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Iteratee/*.p_hi | |
322 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Parsing/*.p_hi | |
323 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Test/*.p_hi | |
324 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Types/*.p_hi | |
325 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Util/*.p_hi |