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