]>
Commit | Line | Data |
---|---|---|
261d3977 JB |
1 | # |
2 | # Conditional build: | |
90a34fd6 | 3 | %bcond_without ixion # ixion-based spreadsheet model support |
cbb865a5 | 4 | %bcond_without python # Python 3 binding |
6f6f60d3 | 5 | %bcond_without apidocs # Sphinx documentation |
261d3977 JB |
6 | %bcond_without static_libs # static library |
7 | # | |
81a745c4 | 8 | Summary: Standalone file import filter library for spreadsheet documents |
261d3977 | 9 | Summary(pl.UTF-8): Biblioteka samodzielnego filtra importującego pliki dla arkuszy kalkulacyjnych |
81a745c4 | 10 | Name: liborcus |
d5164cc8 JB |
11 | # keep in sync with BuildRequires in libreoffice.spec |
12 | Version: 0.17.2 | |
5bcc3045 | 13 | Release: 2 |
d4854844 | 14 | License: MPL v2.0 |
81a745c4 | 15 | Group: Libraries |
2a3e9db7 | 16 | #Source0Download: https://gitlab.com/orcus/orcus/-/releases |
d5164cc8 JB |
17 | Source0: https://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz |
18 | # Source0-md5: 4df3646ca736fa0d04965e25fee4898e | |
d4854844 | 19 | Patch0: %{name}-flags.patch |
6f4df475 | 20 | Patch1: gcc-13.patch |
8d927631 | 21 | URL: https://gitlab.com/orcus/orcus |
90a34fd6 JB |
22 | BuildRequires: autoconf >= 2.65 |
23 | BuildRequires: automake >= 1:1.11 | |
806b8082 | 24 | BuildRequires: boost-devel >= 1.36 |
d5164cc8 JB |
25 | %if %{with ixion} |
26 | BuildRequires: ixion-devel >= 0.17.0 | |
27 | BuildRequires: ixion-devel < 0.18 | |
28 | %endif | |
29 | BuildRequires: libstdc++-devel >= 6:7 | |
90a34fd6 | 30 | BuildRequires: libtool >= 2:1.5 |
d5164cc8 JB |
31 | BuildRequires: mdds-devel >= 2.0.0 |
32 | BuildRequires: mdds-devel < 2.1 | |
261d3977 | 33 | BuildRequires: pkgconfig >= 1:0.20 |
cbb865a5 | 34 | %{?with_python:BuildRequires: python3-devel >= 1:3.2} |
d5164cc8 | 35 | BuildRequires: rpm-build >= 4.6 |
8d927631 JB |
36 | BuildRequires: tar >= 1:1.22 |
37 | BuildRequires: xz | |
81a745c4 | 38 | BuildRequires: zlib-devel |
6f6f60d3 JB |
39 | %if %{with apidocs} |
40 | BuildRequires: doxygen | |
41 | BuildRequires: python3-breathe | |
2a3e9db7 | 42 | BuildRequires: python3-sphinx_argparse |
eabbfed3 | 43 | BuildRequires: python3-sphinx_rtd_theme |
6f6f60d3 JB |
44 | BuildRequires: sphinx-pdg-3 |
45 | %endif | |
81a745c4 AM |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
261d3977 | 49 | liborcus is a standalone file import filter library for spreadsheet |
81a745c4 AM |
50 | documents. Currently under development are ODS, XLSX and CSV import |
51 | filters. | |
52 | ||
261d3977 JB |
53 | %description -l pl.UTF-8 |
54 | liborcus to biblioteka samodzielnego filtra importującego pliki dla | |
55 | arkuszy kalkulacyjnych. Obecnie rozwijane są filtry importujące | |
56 | dokumenty ODS, XLSX i CSV. | |
57 | ||
81a745c4 | 58 | %package devel |
261d3977 JB |
59 | Summary: Header files for liborcus |
60 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki liborcus | |
81a745c4 AM |
61 | Group: Development/Libraries |
62 | Requires: %{name} = %{version}-%{release} | |
806b8082 | 63 | Requires: boost-devel >= 1.36 |
d5164cc8 | 64 | Requires: libstdc++-devel >= 6:7 |
81a745c4 AM |
65 | |
66 | %description devel | |
261d3977 JB |
67 | This package contains the header files for developing applications |
68 | that use liborcus. | |
69 | ||
70 | %description devel -l pl.UTF-8 | |
71 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
72 | wykorzystujących bibliotekę liborcus. | |
73 | ||
74 | %package static | |
75 | Summary: Static liborcus library | |
76 | Summary(pl.UTF-8): Statyczna biblioteka liborcus | |
77 | Group: Development/Libraries | |
78 | Requires: %{name}-devel = %{version}-%{release} | |
79 | ||
80 | %description static | |
81 | Static liborcus library. | |
82 | ||
83 | %description static -l pl.UTF-8 | |
84 | Statyczna biblioteka liborcus. | |
81a745c4 | 85 | |
90a34fd6 JB |
86 | %package spreadsheet |
87 | Summary: liborcus spreadsheet model library | |
88 | Summary(pl.UTF-8): Biblioteka liborcus spreadsheet model | |
89 | Group: Libraries | |
90 | Requires: %{name} = %{version}-%{release} | |
d5164cc8 | 91 | Requires: ixion >= 0.17.0 |
90a34fd6 JB |
92 | |
93 | %description spreadsheet | |
94 | liborcus spreadsheet model library. | |
95 | ||
96 | %description spreadsheet -l pl.UTF-8 | |
97 | Biblioteka liborcus spreadsheet model (modelu arkuszy kalkulacyjnych). | |
98 | ||
99 | %package spreadsheet-devel | |
100 | Summary: Development files for liborcus spreadsheet model library | |
101 | Summary(pl.UTF-8): Pliki programistyczne biblioteki liborcus spreadsheet model | |
102 | Group: Development/Libraries | |
103 | Requires: %{name}-devel = %{version}-%{release} | |
104 | Requires: %{name}-spreadsheet = %{version}-%{release} | |
d5164cc8 | 105 | Requires: ixion-devel >= 0.17.0 |
90a34fd6 JB |
106 | |
107 | %description spreadsheet-devel | |
108 | Development files for liborcus spreadsheet model library. | |
109 | ||
110 | %description spreadsheet-devel -l pl.UTF-8 | |
111 | Pliki programistyczne biblioteki liborcus spreadsheet model. | |
112 | ||
113 | %package spreadsheet-static | |
114 | Summary: Static liborcus spreadsheet model library | |
115 | Summary(pl.UTF-8): Biblioteka statyczna liborcus spreadsheet model | |
116 | Group: Development/Libraries | |
117 | Requires: %{name}-spreadsheet-devel = %{version}-%{release} | |
118 | ||
119 | %description spreadsheet-static | |
120 | Static liborcus spreadsheet model library. | |
121 | ||
122 | %description spreadsheet-static -l pl.UTF-8 | |
123 | Biblioteka statyczna liborcus spreadsheet model. | |
124 | ||
6f6f60d3 JB |
125 | %package apidocs |
126 | Summary: API documentation for orcus libraries | |
127 | Summary(pl.UTF-8): Dokumentacja API bibliotek orcus | |
128 | Group: Documentation | |
d5164cc8 | 129 | BuildArch: noarch |
6f6f60d3 JB |
130 | |
131 | %description apidocs | |
132 | API documentation for orcus libraries. | |
133 | ||
134 | %description apidocs -l pl.UTF-8 | |
135 | Dokumentacja API bibliotek orcus. | |
136 | ||
cbb865a5 JB |
137 | %package -n python3-orcus |
138 | Summary: Python 3 binding for liborcus library | |
139 | Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki liborcus | |
140 | Group: Libraries/Python | |
141 | Requires: %{name} = %{version}-%{release} | |
142 | Requires: python3-libs >= 1:3.2 | |
143 | ||
144 | %description -n python3-orcus | |
145 | Python 3 binding for liborcus library. | |
146 | ||
147 | %description -n python3-orcus -l pl.UTF-8 | |
148 | Wiązanie Pythona 3 do biblioteki liborcus. | |
149 | ||
81a745c4 | 150 | %prep |
6cb5819d | 151 | %setup -q |
d4854844 | 152 | %patch0 -p1 |
6f4df475 | 153 | %patch1 -p1 |
81a745c4 AM |
154 | |
155 | %build | |
90a34fd6 JB |
156 | %{__libtoolize} |
157 | %{__aclocal} -I m4 | |
158 | %{__autoconf} | |
159 | %{__autoheader} | |
160 | %{__automake} | |
81a745c4 | 161 | %configure \ |
d4854844 | 162 | am_cv_python_pyexecdir=%{py3_sitedir} \ |
e84b8743 | 163 | am_cv_python_pythondir=%{py3_sitescriptdir} \ |
81a745c4 | 164 | --disable-debug \ |
cbb865a5 | 165 | %{!?with_python:--disable-python} \ |
261d3977 JB |
166 | --disable-silent-rules \ |
167 | %{!?with_ixion:--disable-spreadsheet-model} \ | |
168 | %{!?with_static_libs:--disable-static} \ | |
81a745c4 | 169 | --disable-werror \ |
8d927631 JB |
170 | --with-pic |
171 | ||
81a745c4 AM |
172 | %{__make} |
173 | ||
6f6f60d3 JB |
174 | %if %{with apidocs} |
175 | cd doc | |
176 | doxygen doxygen.conf | |
177 | sphinx-build-3 -b html . _build | |
178 | %endif | |
81a745c4 AM |
179 | |
180 | %install | |
181 | rm -rf $RPM_BUILD_ROOT | |
182 | ||
183 | %{__make} install \ | |
184 | DESTDIR=$RPM_BUILD_ROOT | |
185 | ||
261d3977 JB |
186 | # obsoleted by pkg-config |
187 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/liborcus-*.la | |
188 | ||
cbb865a5 JB |
189 | %if %{with python} |
190 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la | |
191 | %if %{with static_libs} | |
192 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.a | |
193 | %endif | |
194 | %endif | |
195 | ||
81a745c4 AM |
196 | %clean |
197 | rm -rf $RPM_BUILD_ROOT | |
198 | ||
261d3977 JB |
199 | %post -p /sbin/ldconfig |
200 | %postun -p /sbin/ldconfig | |
81a745c4 | 201 | |
90a34fd6 JB |
202 | %post spreadsheet -p /sbin/ldconfig |
203 | %postun spreadsheet -p /sbin/ldconfig | |
204 | ||
81a745c4 AM |
205 | %files |
206 | %defattr(644,root,root,755) | |
d4854844 | 207 | %doc AUTHORS CHANGELOG ChangeLog LICENSE README.md |
8d927631 | 208 | %attr(755,root,root) %{_bindir}/orcus-css-dump |
806b8082 | 209 | %attr(755,root,root) %{_bindir}/orcus-detect |
888286fb JB |
210 | %if %{without ixion} |
211 | # when building with ixion, orcus-json supports map mode which uses spreadsheet-model library, so it's packaged in -spreadsheet then | |
cbb865a5 | 212 | %attr(755,root,root) %{_bindir}/orcus-json |
888286fb | 213 | %endif |
6cb5819d | 214 | %attr(755,root,root) %{_bindir}/orcus-mso-encryption |
cbb865a5 | 215 | %attr(755,root,root) %{_bindir}/orcus-yaml |
6cb5819d | 216 | %attr(755,root,root) %{_bindir}/orcus-zip-dump |
d5164cc8 JB |
217 | %attr(755,root,root) %{_libdir}/liborcus-0.17.so.*.*.* |
218 | %attr(755,root,root) %ghost %{_libdir}/liborcus-0.17.so.0 | |
219 | %attr(755,root,root) %{_libdir}/liborcus-mso-0.17.so.*.*.* | |
220 | %attr(755,root,root) %ghost %{_libdir}/liborcus-mso-0.17.so.0 | |
221 | %attr(755,root,root) %{_libdir}/liborcus-parser-0.17.so.*.*.* | |
222 | %attr(755,root,root) %ghost %{_libdir}/liborcus-parser-0.17.so.0 | |
81a745c4 AM |
223 | |
224 | %files devel | |
225 | %defattr(644,root,root,755) | |
d5164cc8 JB |
226 | %attr(755,root,root) %{_libdir}/liborcus-0.17.so |
227 | %attr(755,root,root) %{_libdir}/liborcus-mso-0.17.so | |
228 | %attr(755,root,root) %{_libdir}/liborcus-parser-0.17.so | |
229 | %{_includedir}/liborcus-0.17 | |
230 | %{_pkgconfigdir}/liborcus-0.17.pc | |
261d3977 JB |
231 | |
232 | %if %{with static_libs} | |
233 | %files static | |
234 | %defattr(644,root,root,755) | |
d5164cc8 JB |
235 | %{_libdir}/liborcus-0.17.a |
236 | %{_libdir}/liborcus-mso-0.17.a | |
237 | %{_libdir}/liborcus-parser-0.17.a | |
90a34fd6 JB |
238 | %endif |
239 | ||
240 | %if %{with ixion} | |
241 | %files spreadsheet | |
242 | %defattr(644,root,root,755) | |
243 | %attr(755,root,root) %{_bindir}/orcus-csv | |
244 | %attr(755,root,root) %{_bindir}/orcus-gnumeric | |
888286fb | 245 | %attr(755,root,root) %{_bindir}/orcus-json |
73b4d81c | 246 | %attr(755,root,root) %{_bindir}/orcus-styles-ods |
90a34fd6 | 247 | %attr(755,root,root) %{_bindir}/orcus-ods |
806b8082 | 248 | %attr(755,root,root) %{_bindir}/orcus-xls-xml |
90a34fd6 JB |
249 | %attr(755,root,root) %{_bindir}/orcus-xlsx |
250 | %attr(755,root,root) %{_bindir}/orcus-xml | |
d5164cc8 JB |
251 | %attr(755,root,root) %{_libdir}/liborcus-spreadsheet-model-0.17.so.*.*.* |
252 | %attr(755,root,root) %ghost %{_libdir}/liborcus-spreadsheet-model-0.17.so.0 | |
90a34fd6 JB |
253 | |
254 | %files spreadsheet-devel | |
255 | %defattr(644,root,root,755) | |
d5164cc8 JB |
256 | %attr(755,root,root) %{_libdir}/liborcus-spreadsheet-model-0.17.so |
257 | %{_pkgconfigdir}/liborcus-spreadsheet-model-0.17.pc | |
90a34fd6 | 258 | |
b2495070 | 259 | %if %{with static_libs} |
90a34fd6 JB |
260 | %files spreadsheet-static |
261 | %defattr(644,root,root,755) | |
d5164cc8 | 262 | %{_libdir}/liborcus-spreadsheet-model-0.17.a |
cbb865a5 | 263 | %endif |
b2495070 | 264 | %endif |
cbb865a5 | 265 | |
6f6f60d3 JB |
266 | %if %{with apidocs} |
267 | %files apidocs | |
268 | %defattr(644,root,root,755) | |
269 | %doc doc/_build/{_static,cpp,overview,python,*.html,*.js} | |
270 | %endif | |
271 | ||
cbb865a5 JB |
272 | %if %{with python} |
273 | %files -n python3-orcus | |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{py3_sitedir}/_orcus.so | |
276 | %attr(755,root,root) %{py3_sitedir}/_orcus_json.so | |
e84b8743 | 277 | %{py3_sitescriptdir}/orcus |
90a34fd6 | 278 | %endif |