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