]>
Commit | Line | Data |
---|---|---|
90bb36d7 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname aeson | |
6 | Summary: Fast JSON parsing and encoding | |
7 | Summary(pl.UTF-8): Szybkie analizowanie i kodowanie JSON | |
8 | Name: ghc-%{pkgname} | |
b1df0668 | 9 | Version: 1.4.7.1 |
6e7018e2 | 10 | Release: 2 |
90bb36d7 JB |
11 | License: BSD |
12 | Group: Development/Languages | |
13 | #Source0Download: http://hackage.haskell.org/package/aeson | |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
b1df0668 | 15 | # Source0-md5: b83f55bb279c0659228931816c7a3af1 |
90bb36d7 | 16 | URL: http://hackage.haskell.org/package/aeson |
7e533398 JP |
17 | BuildRequires: ghc >= 8.6 |
18 | BuildRequires: ghc-attoparsec >= 0.13.2.2 | |
19 | BuildRequires: ghc-base >= 4.7.0.0 | |
b1df0668 | 20 | BuildRequires: ghc-base-compat-batteries >= 0.10.0 |
7e533398 JP |
21 | BuildRequires: ghc-bytestring >= 0.10.4.0 |
22 | BuildRequires: ghc-containers >= 0.5.5.1 | |
23 | BuildRequires: ghc-deepseq >= 1.3.0.0 | |
24 | BuildRequires: ghc-dlist >= 0.8.0.4 | |
25 | BuildRequires: ghc-ghc-prim >= 0.2 | |
26 | BuildRequires: ghc-hashable >= 1.2.7.0 | |
27 | BuildRequires: ghc-primitive >= 0.6.3.0 | |
28 | BuildRequires: ghc-scientific >= 0.3.6.2 | |
29 | BuildRequires: ghc-tagged >= 0.8.5 | |
30 | BuildRequires: ghc-template-haskell >= 2.9.0.0 | |
31 | BuildRequires: ghc-text >= 1.2.3.0 | |
32 | BuildRequires: ghc-th-abstraction >= 0.2.8.0 | |
33 | BuildRequires: ghc-time >= 1.4 | |
b1df0668 | 34 | BuildRequires: ghc-time-compat >= 1.9.2.2 |
7e533398 | 35 | BuildRequires: ghc-unordered-containers >= 0.2.8.0 |
b1df0668 | 36 | BuildRequires: ghc-uuid-types >= 1.0.3 |
7e533398 | 37 | BuildRequires: ghc-vector >= 0.12.0.1 |
90bb36d7 JB |
38 | %if %{with prof} |
39 | BuildRequires: ghc-prof >= 6.12.3 | |
7e533398 JP |
40 | BuildRequires: ghc-attoparsec-prof >= 0.13.2.2 |
41 | BuildRequires: ghc-base-prof >= 4.7.0.0 | |
b1df0668 | 42 | BuildRequires: ghc-base-compat-batteries-prof >= 0.10.0 |
7e533398 JP |
43 | BuildRequires: ghc-bytestring-prof >= 0.10.4.0 |
44 | BuildRequires: ghc-containers-prof >= 0.5.5.1 | |
45 | BuildRequires: ghc-deepseq-prof >= 1.3.0.0 | |
46 | BuildRequires: ghc-dlist-prof >= 0.8.0.4 | |
47 | BuildRequires: ghc-ghc-prim-prof >= 0.2 | |
48 | BuildRequires: ghc-hashable-prof >= 1.2.7.0 | |
49 | BuildRequires: ghc-primitive-prof >= 0.6.3.0 | |
50 | BuildRequires: ghc-scientific-prof >= 0.3.6.2 | |
51 | BuildRequires: ghc-tagged-prof >= 0.8.5 | |
52 | BuildRequires: ghc-template-haskell-prof >= 2.9.0.0 | |
53 | BuildRequires: ghc-text-prof >= 1.2.3.0 | |
54 | BuildRequires: ghc-th-abstraction-prof >= 0.2.8.0 | |
55 | BuildRequires: ghc-time-prof >= 1.4 | |
b1df0668 | 56 | BuildRequires: ghc-time-compat-prof >= 1.9.2.2 |
7e533398 | 57 | BuildRequires: ghc-unordered-containers-prof >= 0.2.8.0 |
b1df0668 | 58 | BuildRequires: ghc-uuid-types-prof >= 1.0.3 |
7e533398 | 59 | BuildRequires: ghc-vector-prof >= 0.12.0.1 |
90bb36d7 JB |
60 | %endif |
61 | BuildRequires: rpmbuild(macros) >= 1.608 | |
62 | Requires(post,postun): /usr/bin/ghc-pkg | |
63 | %requires_eq ghc | |
7e533398 JP |
64 | Requires: ghc-attoparsec >= 0.13.2.2 |
65 | Requires: ghc-base >= 4.7.0.0 | |
b1df0668 | 66 | Requires: ghc-base-compat-batteries >= 0.10.0 |
7e533398 JP |
67 | Requires: ghc-bytestring >= 0.10.4.0 |
68 | Requires: ghc-containers >= 0.5.5.1 | |
69 | Requires: ghc-deepseq >= 1.3.0.0 | |
70 | Requires: ghc-dlist >= 0.8.0.4 | |
71 | Requires: ghc-ghc-prim >= 0.2 | |
72 | Requires: ghc-hashable >= 1.2.7.0 | |
73 | Requires: ghc-primitive >= 0.6.3.0 | |
74 | Requires: ghc-scientific >= 0.3.6.2 | |
75 | Requires: ghc-tagged >= 0.8.5 | |
76 | Requires: ghc-template-haskell >= 2.9.0.0 | |
77 | Requires: ghc-text >= 1.2.3.0 | |
78 | Requires: ghc-th-abstraction >= 0.2.8.0 | |
79 | Requires: ghc-time >= 1.4 | |
b1df0668 | 80 | Requires: ghc-time-compat >= 1.9.2.2 |
7e533398 | 81 | Requires: ghc-unordered-containers >= 0.2.8.0 |
b1df0668 | 82 | Requires: ghc-uuid-types >= 1.0.3 |
7e533398 | 83 | Requires: ghc-vector >= 0.12.0.1 |
90bb36d7 JB |
84 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
85 | ||
86 | # debuginfo is not useful for ghc | |
87 | %define _enable_debug_packages 0 | |
88 | ||
89 | # don't compress haddock files | |
90 | %define _noautocompressdoc *.haddock | |
91 | ||
92 | %description | |
93 | A JSON parsing and encoding library optimized for ease of use and high | |
94 | performance. | |
95 | ||
96 | %description -l pl.UTF-8 | |
97 | Biblioteka do analizy i kodowania JSON zoptymalizowana pod kątem | |
98 | łatwości użycia i dużej wydajności. | |
99 | ||
100 | %package prof | |
101 | Summary: Profiling %{pkgname} library for GHC | |
102 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
103 | Group: Development/Libraries | |
104 | Requires: %{name} = %{version}-%{release} | |
7e533398 JP |
105 | Requires: ghc-attoparsec-prof >= 0.13.2.2 |
106 | Requires: ghc-base-prof >= 4.7.0.0 | |
b1df0668 | 107 | Requires: ghc-base-compat-batteries-prof >= 0.10.0 |
7e533398 JP |
108 | Requires: ghc-bytestring-prof >= 0.10.4.0 |
109 | Requires: ghc-containers-prof >= 0.5.5.1 | |
110 | Requires: ghc-deepseq-prof >= 1.3.0.0 | |
111 | Requires: ghc-dlist-prof >= 0.8.0.4 | |
112 | Requires: ghc-ghc-prim-prof >= 0.2 | |
113 | Requires: ghc-hashable-prof >= 1.2.7.0 | |
114 | Requires: ghc-primitive-prof >= 0.6.3.0 | |
115 | Requires: ghc-scientific-prof >= 0.3.6.2 | |
116 | Requires: ghc-tagged-prof >= 0.8.5 | |
117 | Requires: ghc-template-haskell-prof >= 2.9.0.0 | |
118 | Requires: ghc-text-prof >= 1.2.3.0 | |
119 | Requires: ghc-th-abstraction-prof >= 0.2.8.0 | |
120 | Requires: ghc-time-prof >= 1.4 | |
b1df0668 | 121 | Requires: ghc-time-compat-prof >= 1.9.2.2 |
7e533398 | 122 | Requires: ghc-unordered-containers-prof >= 0.2.8.0 |
b1df0668 | 123 | Requires: ghc-uuid-types-prof >= 1.0.3 |
7e533398 | 124 | Requires: ghc-vector-prof >= 0.12.0.1 |
90bb36d7 JB |
125 | |
126 | %description prof | |
127 | Profiling %{pkgname} library for GHC. Should be installed when | |
128 | GHC's profiling subsystem is needed. | |
129 | ||
130 | %description prof -l pl.UTF-8 | |
131 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
132 | kiedy potrzebujemy systemu profilującego z GHC. | |
133 | ||
134 | %package doc | |
135 | Summary: HTML documentation for %{pkgname} ghc package | |
136 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
137 | Group: Documentation | |
138 | ||
139 | %description doc | |
140 | HTML documentation for %{pkgname} ghc package. | |
141 | ||
142 | %description doc -l pl.UTF-8 | |
143 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
144 | ||
145 | %prep | |
146 | %setup -q -n %{pkgname}-%{version} | |
147 | ||
148 | %build | |
149 | runhaskell Setup.lhs configure -v2 \ | |
150 | %{?with_prof:--enable-library-profiling} \ | |
151 | --prefix=%{_prefix} \ | |
152 | --libdir=%{_libdir} \ | |
153 | --libexecdir=%{_libexecdir} \ | |
154 | --docdir=%{_docdir}/%{name}-%{version} | |
155 | ||
156 | runhaskell Setup.lhs build | |
157 | runhaskell Setup.lhs haddock --executables | |
158 | ||
159 | %install | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
162 | ||
163 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
164 | ||
165 | # work around automatic haddock docs installation | |
166 | %{__rm} -rf %{name}-%{version}-doc | |
167 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
168 | %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
169 | ||
170 | runhaskell Setup.lhs register \ | |
171 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
172 | ||
173 | %clean | |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
176 | %post | |
177 | %ghc_pkg_recache | |
178 | ||
179 | %postun | |
180 | %ghc_pkg_recache | |
181 | ||
182 | %files | |
183 | %defattr(644,root,root,755) | |
184 | %doc LICENSE README.markdown | |
185 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
186 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
b1df0668 JR |
187 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSaeson-%{version}-*.so |
188 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSaeson-%{version}-*.a | |
189 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSaeson-%{version}-*_p.a | |
90bb36d7 | 190 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data |
b1df0668 JR |
191 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi |
192 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi | |
90bb36d7 JB |
193 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson |
194 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/*.hi | |
b1df0668 JR |
195 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/*.dyn_hi |
196 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Encoding | |
197 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Encoding/*.hi | |
198 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Encoding/*.dyn_hi | |
199 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Internal | |
200 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Internal/*.hi | |
201 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Internal/*.dyn_hi | |
90bb36d7 JB |
202 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Parser |
203 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Parser/*.hi | |
b1df0668 JR |
204 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Parser/*.dyn_hi |
205 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/QQ | |
206 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/QQ/*.hi | |
207 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/QQ/*.dyn_hi | |
90bb36d7 JB |
208 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Types |
209 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Types/*.hi | |
b1df0668 JR |
210 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Types/*.dyn_hi |
211 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec | |
212 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/*.hi | |
213 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/*.dyn_hi | |
214 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/Time | |
215 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/Time/*.hi | |
216 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/Time/*.dyn_hi | |
90bb36d7 JB |
217 | |
218 | %if %{with prof} | |
219 | %files prof | |
220 | %defattr(644,root,root,755) | |
b1df0668 JR |
221 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSaeson-%{version}-*_p.a |
222 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi | |
90bb36d7 | 223 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/*.p_hi |
b1df0668 JR |
224 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Encoding/*.p_hi |
225 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Internal/*.p_hi | |
90bb36d7 | 226 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Parser/*.p_hi |
b1df0668 | 227 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/QQ/*.p_hi |
90bb36d7 | 228 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Aeson/Types/*.p_hi |
b1df0668 JR |
229 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/*.p_hi |
230 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/Time/*.p_hi | |
90bb36d7 JB |
231 | %endif |
232 | ||
233 | %files doc | |
234 | %defattr(644,root,root,755) | |
235 | %doc %{name}-%{version}-doc/* |