]>
Commit | Line | Data |
---|---|---|
5c44ed1b JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname conduit | |
6 | Summary: Streaming data processing library | |
7 | Summary(pl.UTF-8): Biblioteka przetwarzania danych strumieniowych | |
8 | Name: ghc-%{pkgname} | |
2e4469e6 | 9 | Version: 1.3.2 |
4f50af28 | 10 | Release: 2 |
5c44ed1b JB |
11 | License: BSD |
12 | Group: Development/Languages | |
13 | #Source0Download: http://hackage.haskell.org/package/conduit | |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
2e4469e6 | 15 | # Source0-md5: 162fbaa267a0412d98b0536e71bccd6a |
5c44ed1b JB |
16 | URL: http://hackage.haskell.org/package/conduit |
17 | BuildRequires: ghc >= 6.12.3 | |
18 | BuildRequires: ghc-base >= 4.3 | |
2e4469e6 | 19 | BuildRequires: ghc-bytestring |
5c44ed1b | 20 | BuildRequires: ghc-directory |
2e4469e6 JR |
21 | BuildRequires: ghc-exceptions |
22 | BuildRequires: ghc-filepath | |
23 | BuildRequires: ghc-mono-traversable >= 1.0.7 | |
5c44ed1b | 24 | BuildRequires: ghc-mtl |
2e4469e6 JR |
25 | BuildRequires: ghc-primitive |
26 | BuildRequires: ghc-resourcet >= 1.2 | |
27 | BuildRequires: ghc-text | |
28 | BuildRequires: ghc-transformers >= 0.4 | |
29 | BuildRequires: ghc-unix | |
30 | BuildRequires: ghc-unliftio-core | |
31 | BuildRequires: ghc-vector | |
5c44ed1b JB |
32 | %if %{with prof} |
33 | BuildRequires: ghc-prof >= 6.12.3 | |
34 | BuildRequires: ghc-base-prof >= 4.3 | |
2e4469e6 | 35 | BuildRequires: ghc-bytestring-prof |
5c44ed1b | 36 | BuildRequires: ghc-directory-prof |
2e4469e6 JR |
37 | BuildRequires: ghc-exceptions-prof |
38 | BuildRequires: ghc-filepath-prof | |
39 | BuildRequires: ghc-mono-traversable-prof >= 1.0.7 | |
5c44ed1b | 40 | BuildRequires: ghc-mtl-prof |
2e4469e6 JR |
41 | BuildRequires: ghc-primitive-prof |
42 | BuildRequires: ghc-resourcet-prof >= 1.2 | |
43 | BuildRequires: ghc-text-prof | |
44 | BuildRequires: ghc-transformers-prof >= 0.4 | |
45 | BuildRequires: ghc-unix-prof | |
46 | BuildRequires: ghc-unliftio-core-prof | |
47 | BuildRequires: ghc-vector-prof | |
5c44ed1b JB |
48 | %endif |
49 | BuildRequires: rpmbuild(macros) >= 1.608 | |
50 | Requires(post,postun): /usr/bin/ghc-pkg | |
51 | %requires_eq ghc | |
52 | Requires: ghc-base >= 4.3 | |
2e4469e6 | 53 | Requires: ghc-bytestring |
5c44ed1b | 54 | Requires: ghc-directory |
2e4469e6 JR |
55 | Requires: ghc-exceptions |
56 | Requires: ghc-filepath | |
57 | Requires: ghc-mono-traversable >= 1.0.7 | |
5c44ed1b | 58 | Requires: ghc-mtl |
2e4469e6 JR |
59 | Requires: ghc-primitive |
60 | Requires: ghc-resourcet >= 1.2 | |
61 | Requires: ghc-text | |
62 | Requires: ghc-transformers >= 0.4 | |
63 | Requires: ghc-unix | |
64 | Requires: ghc-unliftio-core | |
65 | Requires: ghc-vector | |
5c44ed1b JB |
66 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
67 | ||
68 | # debuginfo is not useful for ghc | |
69 | %define _enable_debug_packages 0 | |
70 | ||
71 | # don't compress haddock files | |
72 | %define _noautocompressdoc *.haddock | |
73 | ||
74 | %description | |
75 | conduit is a solution to the streaming data problem, allowing for | |
76 | production, transformation, and consumption of streams of data in | |
77 | constant memory. It is an alternative to lazy I/O which guarantees | |
78 | deterministic resource handling, and fits in the same general solution | |
79 | space as enumerator/iteratee and pipes. | |
80 | ||
81 | %description -l pl.UTF-8 | |
82 | conduit to rozwiązanie problemu danych strumieniowych, pozwalające na | |
83 | produkcję, przekształcanie oraz konsumpcję strumieni danych ze stałą | |
84 | złożonością pamięciową. Jest to alternatywa dla leniwego we/wy, | |
85 | gwarantująca deterministyczną obsługę zasobów, mieszcząca się w tej | |
86 | samej przestrzeni rozwiązań ogólnych, co enumerator/iteratee oraz | |
87 | potoki. | |
88 | ||
89 | %package prof | |
90 | Summary: Profiling %{pkgname} library for GHC | |
91 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
92 | Group: Development/Libraries | |
93 | Requires: %{name} = %{version}-%{release} | |
94 | Requires: ghc-base-prof >= 4.3 | |
2e4469e6 | 95 | Requires: ghc-bytestring-prof |
5c44ed1b | 96 | Requires: ghc-directory-prof |
2e4469e6 JR |
97 | Requires: ghc-exceptions-prof |
98 | Requires: ghc-filepath-prof | |
99 | Requires: ghc-mono-traversable-prof >= 1.0.7 | |
5c44ed1b | 100 | Requires: ghc-mtl-prof |
2e4469e6 JR |
101 | Requires: ghc-primitive-prof |
102 | Requires: ghc-resourcet-prof >= 1.2 | |
103 | Requires: ghc-text-prof | |
104 | Requires: ghc-transformers-prof >= 0.4 | |
105 | Requires: ghc-unix-prof | |
106 | Requires: ghc-unliftio-core-prof | |
107 | Requires: ghc-vector-prof | |
5c44ed1b JB |
108 | |
109 | %description prof | |
110 | Profiling %{pkgname} library for GHC. Should be installed when | |
111 | GHC's profiling subsystem is needed. | |
112 | ||
113 | %description prof -l pl.UTF-8 | |
114 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
115 | kiedy potrzebujemy systemu profilującego z GHC. | |
116 | ||
117 | %package doc | |
118 | Summary: HTML documentation for ghc %{pkgname} package | |
119 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
120 | Group: Documentation | |
121 | ||
122 | %description doc | |
123 | HTML documentation for ghc %{pkgname} package. | |
124 | ||
125 | %description doc -l pl.UTF-8 | |
126 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
127 | ||
128 | %prep | |
129 | %setup -q -n %{pkgname}-%{version} | |
130 | ||
131 | %build | |
132 | runhaskell Setup.lhs configure -v2 \ | |
133 | %{?with_prof:--enable-library-profiling} \ | |
134 | --prefix=%{_prefix} \ | |
135 | --libdir=%{_libdir} \ | |
136 | --libexecdir=%{_libexecdir} \ | |
137 | --docdir=%{_docdir}/%{name}-%{version} | |
138 | ||
139 | runhaskell Setup.lhs build | |
140 | runhaskell Setup.lhs haddock --executables | |
141 | ||
142 | %install | |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
145 | ||
146 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
147 | ||
148 | # work around automatic haddock docs installation | |
149 | %{__rm} -rf %{name}-%{version}-doc | |
150 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
151 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
152 | ||
153 | runhaskell Setup.lhs register \ | |
154 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
155 | ||
156 | %clean | |
157 | rm -rf $RPM_BUILD_ROOT | |
158 | ||
159 | %post | |
160 | %ghc_pkg_recache | |
161 | ||
162 | %postun | |
163 | %ghc_pkg_recache | |
164 | ||
165 | %files | |
166 | %defattr(644,root,root,755) | |
167 | %doc LICENSE | |
168 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
169 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
2e4469e6 JR |
170 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSconduit-%{version}-*.so |
171 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSconduit-%{version}-*.a | |
172 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSconduit-%{version}-*_p.a | |
173 | ||
174 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi | |
175 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi | |
5c44ed1b | 176 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data |
2e4469e6 JR |
177 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi |
178 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi | |
5c44ed1b JB |
179 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit |
180 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/*.hi | |
2e4469e6 JR |
181 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/*.dyn_hi |
182 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Combinators | |
183 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Combinators/*.hi | |
184 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Combinators/*.dyn_hi | |
185 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal | |
186 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal/*.hi | |
187 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal/*.dyn_hi | |
188 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal/List | |
189 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal/List/*.hi | |
190 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal/List/*.dyn_hi | |
191 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Streaming | |
192 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Streaming/*.hi | |
193 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Streaming/*.dyn_hi | |
194 | ||
5c44ed1b JB |
195 | |
196 | %if %{with prof} | |
197 | %files prof | |
198 | %defattr(644,root,root,755) | |
2e4469e6 JR |
199 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSconduit-%{version}-*_p.a |
200 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi | |
201 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi | |
5c44ed1b | 202 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/*.p_hi |
2e4469e6 JR |
203 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Combinators/*.p_hi |
204 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal/*.p_hi | |
205 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Conduit/Internal/List/*.p_hi | |
206 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Streaming/*.p_hi | |
5c44ed1b JB |
207 | %endif |
208 | ||
209 | %files doc | |
210 | %defattr(644,root,root,755) | |
211 | %doc %{name}-%{version}-doc/* |