]>
Commit | Line | Data |
---|---|---|
20734182 JB |
1 | # TODO: |
2 | # - Field3D (in progress) | |
3 | # and if possible: | |
4 | # - system libcineon in cineon plugin | |
5 | # - system libsquish in dds plugin | |
6 | # - system libdpx in dpx plugin | |
7 | # - system ptex library in ptex plugin | |
8 | # | |
9 | # Conditional build: | |
10 | %bcond_without static_libs # don't build static libraries | |
11 | %bcond_without tbb # Threading Building Blocks | |
12 | # | |
13 | Summary: Library for reading and writing images | |
14 | Summary(pl.UTF-8): Biblioteka do odczytu i zapisu obrazów | |
15 | Name: OpenImageIO | |
16 | Version: 0.10.3 | |
17 | Release: 1 | |
18 | License: BSD | |
19 | Group: Libraries | |
20 | Source0: https://github.com/OpenImageIO/oiio/tarball/Release-%{version}#/%{name}-%{version}.tar.gz | |
21 | # Source0-md5: 20c0867864ee6b1cfccc45a0460c12bc | |
22 | Patch0: %{name}-soname.patch | |
23 | Patch1: %{name}-python.patch | |
24 | URL: https://sites.google.com/site/openimageio/home | |
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 | |
35 | # for FIELD3D (Field3D/Field.h, -lField3D) | |
36 | #BuildRequires: hdf5-devel | |
37 | BuildRequires: ilmbase-devel >= 1.0.1 | |
38 | BuildRequires: jasper-devel | |
39 | BuildRequires: libjpeg-devel | |
40 | BuildRequires: libpng-devel | |
41 | BuildRequires: libtiff-devel | |
42 | BuildRequires: python-devel >= 1:2.6 | |
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 | ||
82 | %package plugin-ico | |
83 | Summary: ICO plugin for OpenImageIO library | |
84 | Summary(pl.UTF-8): Wtyczka ICO dla biblioteki OpenImageIO | |
85 | Group: Libraries | |
86 | Requires: %{name} = %{version}-%{release} | |
87 | ||
88 | %description plugin-ico | |
89 | OpenImageIO plugin to read and write ICO files. | |
90 | ||
91 | %description plugin-ico -l pl.UTF-8 | |
92 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki ICO. | |
93 | ||
94 | %package plugin-jpeg | |
95 | Summary: JPEG plugin for OpenImageIO library | |
96 | Summary(pl.UTF-8): Wtyczka JPEG dla biblioteki OpenImageIO | |
97 | Group: Libraries | |
98 | Requires: %{name} = %{version}-%{release} | |
99 | ||
100 | %description plugin-jpeg | |
101 | OpenImageIO plugin to read and write JPEG files (with TIFF/EXIF | |
102 | information). | |
103 | ||
104 | %description plugin-jpeg -l pl.UTF-8 | |
105 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki JPEG | |
106 | (wraz z informacjami TIFF/EXIF). | |
107 | ||
108 | %package plugin-jpeg2000 | |
109 | Summary: JPEG2000 plugin for OpenImageIO library | |
110 | Summary(pl.UTF-8): Wtyczka JPEG2000 dla biblioteki OpenImageIO | |
111 | Group: Libraries | |
112 | Requires: %{name} = %{version}-%{release} | |
113 | ||
114 | %description plugin-jpeg2000 | |
115 | OpenImageIO plugin to read and write JPEG2000 files. | |
116 | ||
117 | %description plugin-jpeg2000 -l pl.UTF-8 | |
118 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki JPEG2000. | |
119 | ||
120 | %package plugin-openexr | |
121 | Summary: OpenEXR plugin for OpenImageIO library | |
122 | Summary(pl.UTF-8): Wtyczka OpenEXR dla biblioteki OpenImageIO | |
123 | Group: Libraries | |
124 | Requires: %{name} = %{version}-%{release} | |
125 | Requires: OpenEXR >= 1.6.1 | |
126 | ||
127 | %description plugin-openexr | |
128 | OpenImageIO plugin to read and write OpenEXR files. | |
129 | ||
130 | %description plugin-openexr -l pl.UTF-8 | |
131 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki OpenEXR. | |
132 | ||
133 | %package plugin-png | |
134 | Summary: PNG plugin for OpenImageIO library | |
135 | Summary(pl.UTF-8): Wtyczka PNG dla biblioteki OpenImageIO | |
136 | Group: Libraries | |
137 | Requires: %{name} = %{version}-%{release} | |
138 | ||
139 | %description plugin-png | |
140 | OpenImageIO plugin to read and write PNG files. | |
141 | ||
142 | %description plugin-png -l pl.UTF-8 | |
143 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki PNG. | |
144 | ||
145 | %package plugin-tiff | |
146 | Summary: TIFF plugin for OpenImageIO library | |
147 | Summary(pl.UTF-8): Wtyczka TIFF dla biblioteki OpenImageIO | |
148 | Group: Libraries | |
149 | Requires: %{name} = %{version}-%{release} | |
150 | ||
151 | %description plugin-tiff | |
152 | OpenImageIO plugin to read and write TIFF files. | |
153 | ||
154 | %description plugin-tiff -l pl.UTF-8 | |
155 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki TIFF. | |
156 | ||
157 | %package apidocs | |
158 | Summary: Programmer documentation for OpenImageIO library | |
159 | Summary(pl.UTF-8): Dokumentacja programisty do biblioteki OpenImageIO | |
160 | Group: Documentation | |
161 | ||
162 | %description apidocs | |
163 | Programmer documentation for OpenImageIO library. | |
164 | ||
165 | %description apidocs -l pl.UTF-8 | |
166 | Dokumentacja programisty do biblioteki OpenImageIO. | |
167 | ||
168 | %package iv | |
169 | Summary: Qt/OpenImageIO-based Image Viewer | |
170 | Summary(pl.UTF-8): Przeglądarka obrazków (IV) oparta o Qt i OpenImageIO | |
171 | Group: X11/Applications/Graphics | |
172 | Requires: %{name} = %{version}-%{release} | |
173 | Requires: glew >= 1.5.1 | |
174 | ||
175 | %description iv | |
176 | IV is an image viewer based on ImageIO plugins; therefore it can read | |
177 | images of any format for which an appropriate plugin may be found. | |
178 | ||
179 | %description iv -l pl.UTF-8 | |
180 | IV to przeglądarka obrazków oparta na wtyczkach ImageIO; dzięki temu | |
181 | jest w stanie odczytać obrazy w dowolnym formacie, dla którego | |
182 | istnieje właściwa wtyczka. | |
183 | ||
184 | %package -n python-OpenImageIO | |
185 | Summary: Python binding for OpenImageIO library | |
186 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenImageIO | |
187 | Group: Libraries/Python | |
188 | Requires: %{name} = %{version}-%{release} | |
189 | ||
190 | %description -n python-OpenImageIO | |
191 | Python binding for OpenImageIO library. | |
192 | ||
193 | %description -n python-OpenImageIO -l pl.UTF-8 | |
194 | Wiązanie Pythona do biblioteki OpenImageIO. | |
195 | ||
196 | %prep | |
197 | %setup -q -n OpenImageIO-oiio-7d98ca6 | |
198 | %patch0 -p1 | |
199 | %patch1 -p1 | |
200 | ||
201 | %build | |
202 | install -d build | |
203 | cd build | |
204 | %cmake ../src \ | |
205 | -DEMBEDPLUGINS=OFF \ | |
206 | -DLIBDIR=%{_libdir} \ | |
207 | -DPYLIBDIR=%{py_sitedir} \ | |
208 | -DPYTHON_VERSION=%{py_ver} \ | |
209 | -DSOVERSION:STRING=0 \ | |
210 | %{!?with_tbb:-DUSE_TBB=OFF} \ | |
211 | # FIELD3D ? | |
212 | ||
213 | %{__make} | |
214 | ||
215 | %install | |
216 | rm -rf $RPM_BUILD_ROOT | |
217 | ||
218 | %{__make} -C build install \ | |
219 | DESTDIR=$RPM_BUILD_ROOT | |
220 | ||
221 | # name clash with iv | |
222 | mv -f $RPM_BUILD_ROOT%{_bindir}/{iv,oiiv} | |
223 | ||
224 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/{CHANGES,INSTALL,LICENSE} | |
225 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/doc/{CLA-*,openimageio.pdf} | |
226 | ||
227 | %clean | |
228 | rm -rf $RPM_BUILD_ROOT | |
229 | ||
230 | %post -p /sbin/ldconfig | |
231 | %postun -p /sbin/ldconfig | |
232 | ||
233 | %files | |
234 | %defattr(644,root,root,755) | |
235 | %doc CHANGES CREDITS LICENSE README | |
236 | %attr(755,root,root) %{_bindir}/iconvert | |
237 | %attr(755,root,root) %{_bindir}/idiff | |
238 | %attr(755,root,root) %{_bindir}/igrep | |
239 | %attr(755,root,root) %{_bindir}/iinfo | |
240 | %attr(755,root,root) %{_bindir}/iprocess | |
241 | %attr(755,root,root) %{_bindir}/maketx | |
242 | %attr(755,root,root) %{_libdir}/libOpenImageIO.so.*.*.* | |
243 | %attr(755,root,root) %ghost %{_libdir}/libOpenImageIO.so.0 | |
244 | %attr(755,root,root) %{_libdir}/bmp.imageio.so | |
245 | %attr(755,root,root) %{_libdir}/dds.imageio.so | |
246 | %attr(755,root,root) %{_libdir}/dpx.imageio.so | |
247 | %attr(755,root,root) %{_libdir}/fits.imageio.so | |
248 | %attr(755,root,root) %{_libdir}/hdr.imageio.so | |
249 | %attr(755,root,root) %{_libdir}/pnm.imageio.so | |
250 | %attr(755,root,root) %{_libdir}/ptex.imageio.so | |
251 | %attr(755,root,root) %{_libdir}/sgi.imageio.so | |
252 | %attr(755,root,root) %{_libdir}/socket.imageio.so | |
253 | %attr(755,root,root) %{_libdir}/softimage.imageio.so | |
254 | %attr(755,root,root) %{_libdir}/targa.imageio.so | |
255 | %attr(755,root,root) %{_libdir}/zfile.imageio.so | |
256 | ||
257 | %files devel | |
258 | %defattr(644,root,root,755) | |
259 | %attr(755,root,root) %{_libdir}/libOpenImageIO.so | |
260 | %{_includedir}/OpenImageIO | |
261 | ||
262 | %files plugin-ico | |
263 | %defattr(644,root,root,755) | |
264 | %attr(755,root,root) %{_libdir}/ico.imageio.so | |
265 | ||
266 | %files plugin-jpeg | |
267 | %defattr(644,root,root,755) | |
268 | %attr(755,root,root) %{_libdir}/jpeg.imageio.so | |
269 | ||
270 | %files plugin-jpeg2000 | |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) %{_libdir}/jpeg2000.imageio.so | |
273 | ||
274 | %files plugin-openexr | |
275 | %defattr(644,root,root,755) | |
276 | %attr(755,root,root) %{_libdir}/openexr.imageio.so | |
277 | ||
278 | %files plugin-png | |
279 | %defattr(644,root,root,755) | |
280 | %attr(755,root,root) %{_libdir}/png.imageio.so | |
281 | ||
282 | %files plugin-tiff | |
283 | %defattr(644,root,root,755) | |
284 | %attr(755,root,root) %{_libdir}/tiff.imageio.so | |
285 | ||
286 | %files apidocs | |
287 | %defattr(644,root,root,755) | |
288 | %doc src/doc/openimageio.pdf | |
289 | ||
290 | %files iv | |
291 | %defattr(644,root,root,755) | |
292 | %attr(755,root,root) %{_bindir}/oiiv | |
293 | ||
294 | %files -n python-OpenImageIO | |
295 | %defattr(644,root,root,755) | |
296 | %attr(755,root,root) %{py_sitedir}/OpenImageIO.so |