]>
Commit | Line | Data |
---|---|---|
f323c4d8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
b4bb0115 JR |
5 | %define pkgname blaze-builder |
6 | Summary: Efficient buffered output | |
f323c4d8 | 7 | Summary(pl.UTF-8): Wydajne, buforowane wyjście |
b4bb0115 | 8 | Name: ghc-%{pkgname} |
777013fb | 9 | Version: 0.4.1.0 |
309136b9 | 10 | Release: 2 |
b4bb0115 JR |
11 | License: BSD |
12 | Group: Development/Languages | |
f323c4d8 JB |
13 | #Source0Download: http://hackage.haskell.org/package/blaze-builder |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
777013fb | 15 | # Source0-md5: c3cc5bdc46bd6e8bf5142cda2b0679b6 |
f323c4d8 | 16 | URL: http://hackage.haskell.org/package/blaze-builder |
b4bb0115 | 17 | BuildRequires: ghc >= 6.12.3 |
f323c4d8 JB |
18 | BuildRequires: ghc-base >= 4 |
19 | BuildRequires: ghc-base < 5 | |
20 | BuildRequires: ghc-bytestring >= 0.9 | |
21 | BuildRequires: ghc-bytestring < 1 | |
22 | BuildRequires: ghc-text >= 0.10 | |
777013fb | 23 | BuildRequires: ghc-text < 1.3 |
f323c4d8 | 24 | %if %{with prof} |
b4bb0115 | 25 | BuildRequires: ghc-prof |
f323c4d8 JB |
26 | BuildRequires: ghc-base-prof >= 4 |
27 | BuildRequires: ghc-base-prof < 5 | |
28 | BuildRequires: ghc-bytestring-prof >= 0.9 | |
29 | BuildRequires: ghc-bytestring-prof < 1 | |
30 | BuildRequires: ghc-text-prof >= 0.10 | |
777013fb | 31 | BuildRequires: ghc-text-prof < 1.3 |
f323c4d8 | 32 | %endif |
b4bb0115 | 33 | BuildRequires: rpmbuild(macros) >= 1.608 |
b4bb0115 | 34 | Requires(post,postun): /usr/bin/ghc-pkg |
a01fdcc4 | 35 | %requires_eq ghc |
f323c4d8 JB |
36 | Requires: ghc-base >= 4 |
37 | Requires: ghc-base < 5 | |
38 | Requires: ghc-bytestring >= 0.9 | |
39 | Requires: ghc-bytestring < 1 | |
40 | Requires: ghc-text >= 0.10 | |
777013fb | 41 | Requires: ghc-text < 1.3 |
b4bb0115 JR |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | # debuginfo is not useful for ghc | |
45 | %define _enable_debug_packages 0 | |
46 | ||
f323c4d8 | 47 | # don't compress haddock files |
b4bb0115 JR |
48 | %define _noautocompressdoc *.haddock |
49 | ||
50 | %description | |
51 | This library provides an abstraction of buffered output of byte | |
52 | streams and several convenience functions to exploit it. For example, | |
53 | it allows to efficiently serialize Haskell values to lazy bytestrings | |
54 | with a large average chunk size. The large average chunk size allows | |
55 | to make good use of cache prefetching in later processing steps | |
f323c4d8 | 56 | (e.g. compression) and reduces the system call overhead when writing |
b4bb0115 JR |
57 | the resulting lazy bytestring to a file or sending it over the |
58 | network. | |
59 | ||
f323c4d8 JB |
60 | %description -l pl.UTF-8 |
61 | Ta biblioteka zapewnia warstwę abstrakcji buforowanego wyjścia | |
62 | strumieni bajtów oraz kilka wygodnych funkcji do jej wykorzystania. | |
63 | Pozwala na przykład efektywnie serializować wartości haskellowe do | |
64 | leniwych łańcuchów bajtów o dużym przeciętnym rozmiarze bloku. Duży | |
65 | przeciętny rozmiar bloku pozwala na dobre wykorzystanie wypełniania | |
66 | pamięci podręcznej z wyprzedzeniem (prefetch) dla dalszych etapów | |
67 | przetwarzania (np. kompresji) i zmniejsza narzut wywołań systemowych | |
68 | przy zapisie wynikowych leniwych łańcuchów bajtów do pliku lub | |
69 | wysyłaniu ich przez sieć. | |
70 | ||
b4bb0115 JR |
71 | %package prof |
72 | Summary: Profiling %{pkgname} library for GHC | |
f323c4d8 | 73 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC |
b4bb0115 JR |
74 | Group: Development/Libraries |
75 | Requires: %{name} = %{version}-%{release} | |
f323c4d8 JB |
76 | Requires: ghc-base-prof >= 4 |
77 | Requires: ghc-base-prof < 5 | |
78 | Requires: ghc-bytestring-prof >= 0.9 | |
79 | Requires: ghc-bytestring-prof < 1 | |
80 | Requires: ghc-text-prof >= 0.10 | |
777013fb | 81 | Requires: ghc-text-prof < 1.3 |
b4bb0115 JR |
82 | |
83 | %description prof | |
84 | Profiling %{pkgname} library for GHC. Should be installed when | |
85 | GHC's profiling subsystem is needed. | |
86 | ||
87 | %description prof -l pl.UTF-8 | |
88 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
89 | kiedy potrzebujemy systemu profilującego z GHC. | |
90 | ||
91 | %prep | |
92 | %setup -q -n %{pkgname}-%{version} | |
93 | ||
94 | %build | |
f323c4d8 JB |
95 | runhaskell Setup.hs configure -v2 \ |
96 | %{?with_prof:--enable-library-profiling} \ | |
b4bb0115 JR |
97 | --prefix=%{_prefix} \ |
98 | --libdir=%{_libdir} \ | |
99 | --libexecdir=%{_libexecdir} \ | |
100 | --docdir=%{_docdir}/%{name}-%{version} | |
101 | ||
102 | runhaskell Setup.hs build | |
103 | runhaskell Setup.hs haddock --executables | |
104 | ||
105 | %install | |
106 | rm -rf $RPM_BUILD_ROOT | |
107 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
108 | ||
109 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
110 | ||
111 | # work around automatic haddock docs installation | |
112 | %{__rm} -rf %{name}-%{version}-doc | |
113 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
114 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
115 | ||
116 | runhaskell Setup.hs register \ | |
f323c4d8 | 117 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
b4bb0115 JR |
118 | |
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %post | |
123 | %ghc_pkg_recache | |
124 | ||
125 | %postun | |
126 | %ghc_pkg_recache | |
127 | ||
128 | %files | |
129 | %defattr(644,root,root,755) | |
f323c4d8 | 130 | %doc CHANGES README* TODO %{name}-%{version}-doc/* |
b4bb0115 JR |
131 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
132 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
777013fb JR |
133 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSblaze-builder-%{version}-*.so |
134 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSblaze-builder-%{version}-*.a | |
135 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSblaze-builder-%{version}-*_p.a | |
b4bb0115 JR |
136 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze |
137 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString | |
138 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/*.hi | |
777013fb | 139 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/*.dyn_hi |
b4bb0115 JR |
140 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder |
141 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/*.hi | |
777013fb | 142 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/*.dyn_hi |
b4bb0115 JR |
143 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Char |
144 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Char/*.hi | |
777013fb JR |
145 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Char/*.dyn_hi |
146 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Compat | |
147 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Compat/*.hi | |
148 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Compat/*.dyn_hi | |
b4bb0115 JR |
149 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Html |
150 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Html/*.hi | |
777013fb | 151 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Html/*.dyn_hi |
b4bb0115 JR |
152 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Internal |
153 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Internal/*.hi | |
777013fb | 154 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Internal/*.dyn_hi |
b4bb0115 | 155 | |
f323c4d8 | 156 | %if %{with prof} |
b4bb0115 JR |
157 | %files prof |
158 | %defattr(644,root,root,755) | |
777013fb | 159 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSblaze-builder-%{version}-*_p.a |
b4bb0115 JR |
160 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/*.p_hi |
161 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/*.p_hi | |
162 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Char/*.p_hi | |
777013fb | 163 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Compat/*.p_hi |
b4bb0115 JR |
164 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Html/*.p_hi |
165 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Blaze/ByteString/Builder/Internal/*.p_hi | |
f323c4d8 | 166 | %endif |