]>
Commit | Line | Data |
---|---|---|
8a5e279e | 1 | # TODO if possible: |
20734182 | 2 | # - system libcineon in cineon plugin |
20734182 | 3 | # - system libdpx in dpx plugin |
20734182 JB |
4 | # |
5 | # Conditional build: | |
6 | %bcond_without static_libs # don't build static libraries | |
7 | %bcond_without tbb # Threading Building Blocks | |
8 | # | |
9 | Summary: Library for reading and writing images | |
10 | Summary(pl.UTF-8): Biblioteka do odczytu i zapisu obrazów | |
11 | Name: OpenImageIO | |
12 | Version: 0.10.3 | |
13 | Release: 1 | |
14 | License: BSD | |
15 | Group: Libraries | |
16 | Source0: https://github.com/OpenImageIO/oiio/tarball/Release-%{version}#/%{name}-%{version}.tar.gz | |
17 | # Source0-md5: 20c0867864ee6b1cfccc45a0460c12bc | |
18 | Patch0: %{name}-soname.patch | |
19 | Patch1: %{name}-python.patch | |
8a5e279e | 20 | Patch2: %{name}-hdf.patch |
fc6d7d67 | 21 | Patch3: %{name}-system-squish.patch |
d46df4d1 | 22 | Patch4: %{name}-system-ptex.patch |
20734182 | 23 | URL: https://sites.google.com/site/openimageio/home |
8a5e279e | 24 | BuildRequires: Field3D-devel |
20734182 JB |
25 | BuildRequires: OpenEXR-devel >= 1.6.1 |
26 | BuildRequires: OpenGL-devel | |
27 | BuildRequires: QtCore-devel | |
28 | BuildRequires: QtGui-devel | |
29 | BuildRequires: QtOpenGL-devel | |
30 | # filesystem, regex, system, thread | |
31 | BuildRequires: boost-devel >= 1.35 | |
32 | BuildRequires: boost-python-devel >= 1.35 | |
33 | BuildRequires: cmake >= 2.6 | |
34 | BuildRequires: glew-devel >= 1.5.1 | |
8a5e279e | 35 | BuildRequires: hdf5-devel |
20734182 JB |
36 | BuildRequires: ilmbase-devel >= 1.0.1 |
37 | BuildRequires: jasper-devel | |
38 | BuildRequires: libjpeg-devel | |
39 | BuildRequires: libpng-devel | |
40 | BuildRequires: libtiff-devel | |
d46df4d1 | 41 | BuildRequires: ptex-devel >= 2 |
20734182 | 42 | BuildRequires: python-devel >= 1:2.6 |
fc6d7d67 | 43 | BuildRequires: squish-devel >= 1.10 |
20734182 JB |
44 | %{?with_tbb:BuildRequires: tbb-devel} |
45 | BuildRequires: zlib-devel | |
46 | Requires: ilmbase >= 1.0.1 | |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %description | |
50 | OpenImageIO is a library for reading and writing images, and a bunch | |
51 | of related classes, utilities, and applications. It has extremely | |
52 | simple but powerful ImageInput and ImageOutput APIs for reading and | |
53 | writing 2D images that is format agnostic; specific formats are | |
54 | implemented by DLL/DSO plugins. | |
55 | ||
56 | Currently there are format plugins for: TIFF, JPEG/JFIF, OpenEXR, PNG, | |
57 | HDR/RGBE, Targa, JPEG-2000, DPX, Cineon, FITS, BMP, ICO, RMan Zfile, | |
58 | Softimage PIC, DDS, SGI, PNM/PPM/PGM/PBM, Field3d, WebP. | |
59 | ||
60 | %description -l pl.UTF-8 | |
61 | OpenImageIO to biblioteka do odczytu i zapisu obrazów oraz wiele | |
62 | powiązanych klas, narzędzi i aplikacji. Ma bardzo proste, ale mające | |
63 | wiele możliwości API ImageInput i ImageOutput służące do odczytu i | |
64 | zapisu obrazów 2D, które jest niezależne od formatu; konkretne formaty | |
65 | są implementowane przez wtyczki DLL/DSO. | |
66 | ||
67 | Obecnie istnieją wtyczki obsługujące formaty: TIFF, JPEG/JFIF, | |
68 | OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000, DPX, Cineon, FITS, BMP, ICO, | |
69 | RMan Zfile, Softimage PIC, DDS, SGI, PNM/PPM/PGM/PBM, Field3d, WebP. | |
70 | ||
71 | %package devel | |
72 | Summary: Header files for OpenImageIO library | |
73 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenImageIO | |
74 | Group: Development/Libraries | |
75 | Requires: %{name} = %{version}-%{release} | |
76 | ||
77 | %description devel | |
78 | Header files for OpenImageIO library. | |
79 | ||
80 | %description devel -l pl.UTF-8 | |
81 | Pliki nagłówkowe biblioteki OpenImageIO. | |
82 | ||
fc6d7d67 JB |
83 | %package plugin-dds |
84 | Summary: DDS plugin for OpenImageIO library | |
85 | Summary(pl.UTF-8): Wtyczka DDS dla biblioteki OpenImageIO | |
86 | Group: Libraries | |
87 | Requires: %{name} = %{version}-%{release} | |
88 | Requires: squish >= 1.10 | |
89 | ||
90 | %description plugin-dds | |
d46df4d1 | 91 | OpenImageIO plugin to read DDS files. |
fc6d7d67 JB |
92 | |
93 | %description plugin-dds -l pl.UTF-8 | |
d46df4d1 | 94 | Wtyczka biblioteki OpenImageIO czytająca pliki DDS. |
fc6d7d67 | 95 | |
8a5e279e JB |
96 | %package plugin-field3d |
97 | Summary: Field3D plugin for OpenImageIO library | |
98 | Summary(pl.UTF-8): Wtyczka Field3D dla biblioteki OpenImageIO | |
99 | Group: Libraries | |
100 | Requires: %{name} = %{version}-%{release} | |
101 | ||
102 | %description plugin-field3d | |
d46df4d1 | 103 | OpenImageIO plugin to read Field3D files. |
8a5e279e JB |
104 | |
105 | %description plugin-field3d -l pl.UTF-8 | |
d46df4d1 | 106 | Wtyczka biblioteki OpenImageIO czytająca pliki Field3D. |
8a5e279e | 107 | |
20734182 JB |
108 | %package plugin-ico |
109 | Summary: ICO plugin for OpenImageIO library | |
110 | Summary(pl.UTF-8): Wtyczka ICO dla biblioteki OpenImageIO | |
111 | Group: Libraries | |
112 | Requires: %{name} = %{version}-%{release} | |
113 | ||
114 | %description plugin-ico | |
115 | OpenImageIO plugin to read and write ICO files. | |
116 | ||
117 | %description plugin-ico -l pl.UTF-8 | |
118 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki ICO. | |
119 | ||
120 | %package plugin-jpeg | |
121 | Summary: JPEG plugin for OpenImageIO library | |
122 | Summary(pl.UTF-8): Wtyczka JPEG dla biblioteki OpenImageIO | |
123 | Group: Libraries | |
124 | Requires: %{name} = %{version}-%{release} | |
125 | ||
126 | %description plugin-jpeg | |
127 | OpenImageIO plugin to read and write JPEG files (with TIFF/EXIF | |
128 | information). | |
129 | ||
130 | %description plugin-jpeg -l pl.UTF-8 | |
131 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki JPEG | |
132 | (wraz z informacjami TIFF/EXIF). | |
133 | ||
134 | %package plugin-jpeg2000 | |
135 | Summary: JPEG2000 plugin for OpenImageIO library | |
136 | Summary(pl.UTF-8): Wtyczka JPEG2000 dla biblioteki OpenImageIO | |
137 | Group: Libraries | |
138 | Requires: %{name} = %{version}-%{release} | |
139 | ||
140 | %description plugin-jpeg2000 | |
141 | OpenImageIO plugin to read and write JPEG2000 files. | |
142 | ||
143 | %description plugin-jpeg2000 -l pl.UTF-8 | |
144 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki JPEG2000. | |
145 | ||
146 | %package plugin-openexr | |
147 | Summary: OpenEXR plugin for OpenImageIO library | |
148 | Summary(pl.UTF-8): Wtyczka OpenEXR dla biblioteki OpenImageIO | |
149 | Group: Libraries | |
150 | Requires: %{name} = %{version}-%{release} | |
151 | Requires: OpenEXR >= 1.6.1 | |
152 | ||
153 | %description plugin-openexr | |
154 | OpenImageIO plugin to read and write OpenEXR files. | |
155 | ||
156 | %description plugin-openexr -l pl.UTF-8 | |
157 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki OpenEXR. | |
158 | ||
159 | %package plugin-png | |
160 | Summary: PNG plugin for OpenImageIO library | |
161 | Summary(pl.UTF-8): Wtyczka PNG dla biblioteki OpenImageIO | |
162 | Group: Libraries | |
163 | Requires: %{name} = %{version}-%{release} | |
164 | ||
165 | %description plugin-png | |
166 | OpenImageIO plugin to read and write PNG files. | |
167 | ||
168 | %description plugin-png -l pl.UTF-8 | |
169 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki PNG. | |
170 | ||
d46df4d1 JB |
171 | %package plugin-ptex |
172 | Summary: Ptex plugin for OpenImageIO library | |
173 | Summary(pl.UTF-8): Wtyczka Ptex dla biblioteki OpenImageIO | |
174 | Group: Libraries | |
175 | Requires: %{name} = %{version}-%{release} | |
176 | Requires: ptex >= 2 | |
177 | ||
178 | %description plugin-ptex | |
179 | OpenImageIO plugin to read Ptex files. | |
180 | ||
181 | %description plugin-ptex -l pl.UTF-8 | |
182 | Wtyczka biblioteki OpenImageIO czytająca pliki Ptex. | |
183 | ||
20734182 JB |
184 | %package plugin-tiff |
185 | Summary: TIFF plugin for OpenImageIO library | |
186 | Summary(pl.UTF-8): Wtyczka TIFF dla biblioteki OpenImageIO | |
187 | Group: Libraries | |
188 | Requires: %{name} = %{version}-%{release} | |
189 | ||
190 | %description plugin-tiff | |
191 | OpenImageIO plugin to read and write TIFF files. | |
192 | ||
193 | %description plugin-tiff -l pl.UTF-8 | |
194 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki TIFF. | |
195 | ||
196 | %package apidocs | |
197 | Summary: Programmer documentation for OpenImageIO library | |
198 | Summary(pl.UTF-8): Dokumentacja programisty do biblioteki OpenImageIO | |
199 | Group: Documentation | |
200 | ||
201 | %description apidocs | |
202 | Programmer documentation for OpenImageIO library. | |
203 | ||
204 | %description apidocs -l pl.UTF-8 | |
205 | Dokumentacja programisty do biblioteki OpenImageIO. | |
206 | ||
207 | %package iv | |
208 | Summary: Qt/OpenImageIO-based Image Viewer | |
209 | Summary(pl.UTF-8): Przeglądarka obrazków (IV) oparta o Qt i OpenImageIO | |
210 | Group: X11/Applications/Graphics | |
211 | Requires: %{name} = %{version}-%{release} | |
212 | Requires: glew >= 1.5.1 | |
213 | ||
214 | %description iv | |
215 | IV is an image viewer based on ImageIO plugins; therefore it can read | |
216 | images of any format for which an appropriate plugin may be found. | |
217 | ||
218 | %description iv -l pl.UTF-8 | |
219 | IV to przeglądarka obrazków oparta na wtyczkach ImageIO; dzięki temu | |
220 | jest w stanie odczytać obrazy w dowolnym formacie, dla którego | |
221 | istnieje właściwa wtyczka. | |
222 | ||
223 | %package -n python-OpenImageIO | |
224 | Summary: Python binding for OpenImageIO library | |
225 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenImageIO | |
226 | Group: Libraries/Python | |
227 | Requires: %{name} = %{version}-%{release} | |
228 | ||
229 | %description -n python-OpenImageIO | |
230 | Python binding for OpenImageIO library. | |
231 | ||
232 | %description -n python-OpenImageIO -l pl.UTF-8 | |
233 | Wiązanie Pythona do biblioteki OpenImageIO. | |
234 | ||
235 | %prep | |
236 | %setup -q -n OpenImageIO-oiio-7d98ca6 | |
237 | %patch0 -p1 | |
238 | %patch1 -p1 | |
8a5e279e | 239 | %patch2 -p1 |
fc6d7d67 | 240 | %patch3 -p1 |
d46df4d1 | 241 | %patch4 -p1 |
fc6d7d67 | 242 | |
d46df4d1 | 243 | %{__rm} -r src/dds.imageio/squish src/ptex.imageio/ptex |
20734182 JB |
244 | |
245 | %build | |
246 | install -d build | |
247 | cd build | |
248 | %cmake ../src \ | |
249 | -DEMBEDPLUGINS=OFF \ | |
250 | -DLIBDIR=%{_libdir} \ | |
251 | -DPYLIBDIR=%{py_sitedir} \ | |
252 | -DPYTHON_VERSION=%{py_ver} \ | |
20734182 | 253 | %{!?with_tbb:-DUSE_TBB=OFF} \ |
20734182 JB |
254 | |
255 | %{__make} | |
256 | ||
257 | %install | |
258 | rm -rf $RPM_BUILD_ROOT | |
259 | ||
260 | %{__make} -C build install \ | |
261 | DESTDIR=$RPM_BUILD_ROOT | |
262 | ||
263 | # name clash with iv | |
264 | mv -f $RPM_BUILD_ROOT%{_bindir}/{iv,oiiv} | |
265 | ||
266 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/{CHANGES,INSTALL,LICENSE} | |
267 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/doc/{CLA-*,openimageio.pdf} | |
268 | ||
269 | %clean | |
270 | rm -rf $RPM_BUILD_ROOT | |
271 | ||
272 | %post -p /sbin/ldconfig | |
273 | %postun -p /sbin/ldconfig | |
274 | ||
275 | %files | |
276 | %defattr(644,root,root,755) | |
277 | %doc CHANGES CREDITS LICENSE README | |
278 | %attr(755,root,root) %{_bindir}/iconvert | |
279 | %attr(755,root,root) %{_bindir}/idiff | |
280 | %attr(755,root,root) %{_bindir}/igrep | |
281 | %attr(755,root,root) %{_bindir}/iinfo | |
282 | %attr(755,root,root) %{_bindir}/iprocess | |
283 | %attr(755,root,root) %{_bindir}/maketx | |
284 | %attr(755,root,root) %{_libdir}/libOpenImageIO.so.*.*.* | |
285 | %attr(755,root,root) %ghost %{_libdir}/libOpenImageIO.so.0 | |
286 | %attr(755,root,root) %{_libdir}/bmp.imageio.so | |
20734182 JB |
287 | %attr(755,root,root) %{_libdir}/dpx.imageio.so |
288 | %attr(755,root,root) %{_libdir}/fits.imageio.so | |
289 | %attr(755,root,root) %{_libdir}/hdr.imageio.so | |
290 | %attr(755,root,root) %{_libdir}/pnm.imageio.so | |
20734182 JB |
291 | %attr(755,root,root) %{_libdir}/sgi.imageio.so |
292 | %attr(755,root,root) %{_libdir}/socket.imageio.so | |
293 | %attr(755,root,root) %{_libdir}/softimage.imageio.so | |
294 | %attr(755,root,root) %{_libdir}/targa.imageio.so | |
295 | %attr(755,root,root) %{_libdir}/zfile.imageio.so | |
296 | ||
297 | %files devel | |
298 | %defattr(644,root,root,755) | |
299 | %attr(755,root,root) %{_libdir}/libOpenImageIO.so | |
300 | %{_includedir}/OpenImageIO | |
301 | ||
fc6d7d67 JB |
302 | %files plugin-dds |
303 | %defattr(644,root,root,755) | |
304 | %attr(755,root,root) %{_libdir}/dds.imageio.so | |
305 | ||
8a5e279e JB |
306 | %files plugin-field3d |
307 | %defattr(644,root,root,755) | |
308 | %attr(755,root,root) %{_libdir}/field3d.imageio.so | |
309 | ||
20734182 JB |
310 | %files plugin-ico |
311 | %defattr(644,root,root,755) | |
312 | %attr(755,root,root) %{_libdir}/ico.imageio.so | |
313 | ||
314 | %files plugin-jpeg | |
315 | %defattr(644,root,root,755) | |
316 | %attr(755,root,root) %{_libdir}/jpeg.imageio.so | |
317 | ||
318 | %files plugin-jpeg2000 | |
319 | %defattr(644,root,root,755) | |
320 | %attr(755,root,root) %{_libdir}/jpeg2000.imageio.so | |
321 | ||
322 | %files plugin-openexr | |
323 | %defattr(644,root,root,755) | |
324 | %attr(755,root,root) %{_libdir}/openexr.imageio.so | |
325 | ||
326 | %files plugin-png | |
327 | %defattr(644,root,root,755) | |
328 | %attr(755,root,root) %{_libdir}/png.imageio.so | |
329 | ||
d46df4d1 JB |
330 | %files plugin-ptex |
331 | %defattr(644,root,root,755) | |
332 | %attr(755,root,root) %{_libdir}/ptex.imageio.so | |
333 | ||
20734182 JB |
334 | %files plugin-tiff |
335 | %defattr(644,root,root,755) | |
336 | %attr(755,root,root) %{_libdir}/tiff.imageio.so | |
337 | ||
338 | %files apidocs | |
339 | %defattr(644,root,root,755) | |
340 | %doc src/doc/openimageio.pdf | |
341 | ||
342 | %files iv | |
343 | %defattr(644,root,root,755) | |
344 | %attr(755,root,root) %{_bindir}/oiiv | |
345 | ||
346 | %files -n python-OpenImageIO | |
347 | %defattr(644,root,root,755) | |
348 | %attr(755,root,root) %{py_sitedir}/OpenImageIO.so |