]>
Commit | Line | Data |
---|---|---|
3d9f2152 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
3ea44407 JR |
5 | %define pkgname blaze-builder-enumerator |
6 | Summary: Enumeratees for the incremental conversion of builders to bytestrings | |
3d9f2152 | 7 | Summary(pl.UTF-8): Funkcje enumeratee do przyrostowej konwersji builderów do łańcuchów bajtów |
3ea44407 JR |
8 | Name: ghc-%{pkgname} |
9 | Version: 0.2.0.5 | |
3d9f2152 | 10 | Release: 2 |
3ea44407 JR |
11 | License: BSD |
12 | Group: Development/Languages | |
3d9f2152 JB |
13 | #Source0Download: http://hackage.haskell.org/package/blaze-builder-enumerator |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
3ea44407 | 15 | # Source0-md5: 735b6422d93043554db61297e047a5f5 |
3d9f2152 | 16 | URL: http://hackage.haskell.org/package/blaze-builder-enumerator |
3ea44407 | 17 | BuildRequires: ghc >= 6.12.3 |
3d9f2152 JB |
18 | BuildRequires: ghc-base >= 4 |
19 | BuildRequires: ghc-base < 5 | |
20 | BuildRequires: ghc-blaze-builder >= 0.2.1.4 | |
21 | BuildRequires: ghc-blaze-builder < 0.4 | |
22 | BuildRequires: ghc-bytestring >= 0.9 | |
23 | BuildRequires: ghc-bytestring < 0.11 | |
24 | BuildRequires: ghc-enumerator >= 0.4.3.1 | |
25 | BuildRequires: ghc-enumerator < 0.5 | |
26 | BuildRequires: ghc-transformers >= 0.2 | |
27 | BuildRequires: ghc-transformers < 0.4 | |
28 | %if %{with prof} | |
29 | BuildRequires: ghc-prof >= 6.12.3 | |
30 | BuildRequires: ghc-base-prof >= 4 | |
31 | BuildRequires: ghc-base-prof < 5 | |
32 | BuildRequires: ghc-blaze-builder-prof >= 0.2.1.4 | |
33 | BuildRequires: ghc-blaze-builder-prof < 0.4 | |
34 | BuildRequires: ghc-bytestring-prof >= 0.9 | |
35 | BuildRequires: ghc-bytestring-prof < 0.11 | |
36 | BuildRequires: ghc-enumerator-prof >= 0.4.3.1 | |
37 | BuildRequires: ghc-enumerator-prof < 0.5 | |
38 | BuildRequires: ghc-transformers-prof >= 0.2 | |
39 | BuildRequires: ghc-transformers-prof < 0.4 | |
40 | %endif | |
3ea44407 | 41 | BuildRequires: rpmbuild(macros) >= 1.608 |
3ea44407 | 42 | Requires(post,postun): /usr/bin/ghc-pkg |
3d9f2152 JB |
43 | %requires_releq ghc |
44 | Requires: ghc-base >= 4 | |
45 | Requires: ghc-base < 5 | |
46 | Requires: ghc-blaze-builder >= 0.2.1.4 | |
47 | Requires: ghc-blaze-builder < 0.4 | |
48 | Requires: ghc-bytestring >= 0.9 | |
49 | Requires: ghc-bytestring < 0.11 | |
50 | Requires: ghc-enumerator >= 0.4.3.1 | |
51 | Requires: ghc-enumerator < 0.5 | |
52 | Requires: ghc-transformers >= 0.2 | |
53 | Requires: ghc-transformers < 0.4 | |
3ea44407 JR |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
56 | # debuginfo is not useful for ghc | |
57 | %define _enable_debug_packages 0 | |
58 | ||
3d9f2152 | 59 | # don't compress haddock files |
3ea44407 JR |
60 | %define _noautocompressdoc *.haddock |
61 | ||
62 | %description | |
3d9f2152 JB |
63 | This package integrates the builders from the blaze-builder package |
64 | with the enumerator package. It provides infrastructure and | |
65 | enumeratees for incrementally executing builders and pass the filled | |
66 | chunks to a bytestring iteratee. | |
67 | ||
68 | %description -l pl.UTF-8 | |
69 | Ten pakiet integruje buildery z pakietu blaze-builder z pakietem | |
70 | enumerator. Dostarcza infrastrukturę i funkcje enumeratee do | |
71 | przyrostowego wywoływania builderów i przekazywania wypełnionych | |
72 | porcji do funkcji iteratee łańcucha bajtów. | |
3ea44407 JR |
73 | |
74 | %package prof | |
75 | Summary: Profiling %{pkgname} library for GHC | |
76 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
77 | Group: Development/Libraries | |
78 | Requires: %{name} = %{version}-%{release} | |
3d9f2152 JB |
79 | Requires: ghc-base-prof >= 4 |
80 | Requires: ghc-base-prof < 5 | |
81 | Requires: ghc-blaze-builder-prof >= 0.2.1.4 | |
82 | Requires: ghc-blaze-builder-prof < 0.4 | |
83 | Requires: ghc-bytestring-prof >= 0.9 | |
84 | Requires: ghc-bytestring-prof < 0.11 | |
85 | Requires: ghc-enumerator-prof >= 0.4.3.1 | |
86 | Requires: ghc-enumerator-prof < 0.5 | |
87 | Requires: ghc-transformers-prof >= 0.2 | |
88 | Requires: ghc-transformers-prof < 0.4 | |
3ea44407 JR |
89 | |
90 | %description prof | |
3d9f2152 JB |
91 | Profiling %{pkgname} library for GHC. Should be installed when GHC's |
92 | profiling subsystem is needed. | |
3ea44407 JR |
93 | |
94 | %description prof -l pl.UTF-8 | |
95 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
96 | kiedy potrzebujemy systemu profilującego z GHC. | |
97 | ||
98 | %prep | |
99 | %setup -q -n %{pkgname}-%{version} | |
100 | ||
101 | %build | |
3d9f2152 JB |
102 | runhaskell Setup.hs configure -v2 \ |
103 | %{?with_prof:--enable-library-profiling} \ | |
3ea44407 JR |
104 | --prefix=%{_prefix} \ |
105 | --libdir=%{_libdir} \ | |
106 | --libexecdir=%{_libexecdir} \ | |
107 | --docdir=%{_docdir}/%{name}-%{version} | |
108 | ||
109 | runhaskell Setup.hs build | |
110 | runhaskell Setup.hs haddock --executables | |
111 | ||
112 | %install | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
115 | ||
116 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
117 | ||
118 | # work around automatic haddock docs installation | |
119 | %{__rm} -rf %{name}-%{version}-doc | |
120 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
121 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
122 | ||
123 | runhaskell Setup.hs register \ | |
3d9f2152 | 124 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
3ea44407 JR |
125 | |
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
129 | %post | |
130 | %ghc_pkg_recache | |
131 | ||
132 | %postun | |
133 | %ghc_pkg_recache | |
134 | ||
135 | %files | |
136 | %defattr(644,root,root,755) | |
3d9f2152 | 137 | %doc CHANGES %{name}-%{version}-doc/* |
3ea44407 JR |
138 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
139 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
3d9f2152 JB |
140 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSblaze-builder-enumerator-%{version}.o |
141 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSblaze-builder-enumerator-%{version}.a | |
3ea44407 JR |
142 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze |
143 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString | |
144 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder | |
145 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/*.hi | |
146 | ||
147 | %files prof | |
148 | %defattr(644,root,root,755) | |
3d9f2152 | 149 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSblaze-builder-enumerator-%{version}_p.a |
3ea44407 | 150 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/*.p_hi |