]>
Commit | Line | Data |
---|---|---|
52901ddc JB |
1 | # TODO: |
2 | # - OpenFX plugin | |
3 | # - truelight http://www.filmlight.ltd.uk/products/truelight/overview_tl.php (proprietary?) | |
4 | # - nuke: http://docs.thefoundry.co.uk/products/nuke/ (proprietary) | |
27b6cb64 JB |
5 | # |
6 | # Conditional build: | |
52901ddc | 7 | %bcond_without oiio # use OpenImageIO in apps (ocioconvert,ociodisplay,ociolutimage) instead of OpenEXR |
27b6cb64 | 8 | %bcond_without opengl # OpenGL-dependent app (ociodisplay) |
52901ddc JB |
9 | %bcond_with java # JNI glue (outdated as of 2.2.1) |
10 | %bcond_without doc # documentation | |
27b6cb64 JB |
11 | %bcond_with sse2 # use SSE2 instructions |
12 | # | |
52901ddc | 13 | %ifarch %{x8664} pentium4 x32 |
27b6cb64 JB |
14 | %define with_sse2 1 |
15 | %endif | |
16 | Summary: Complete color management solution | |
17 | Summary(pl.UTF-8): Kompletny pakiet do zarządzania kolorami | |
18 | Name: OpenColorIO | |
52901ddc JB |
19 | Version: 2.2.1 |
20 | Release: 0.1 | |
27b6cb64 JB |
21 | License: BSD |
22 | Group: Libraries | |
9158e0fc | 23 | #Source0Download: https://github.com/imageworks/OpenColorIO/releases |
b9df10ac | 24 | Source0: https://github.com/imageworks/OpenColorIO/archive/v%{version}/%{name}-%{version}.tar.gz |
52901ddc JB |
25 | # Source0-md5: 372d6982cf01818a21a12f9628701a91 |
26 | Patch0: %{name}-java.patch | |
27b6cb64 | 27 | URL: http://opencolorio.org/ |
0da099bd | 28 | BuildRequires: Imath-devel >= 3.1.2 |
52901ddc JB |
29 | BuildRequires: OpenEXR-devel >= 3.0 |
30 | BuildRequires: cmake >= 3.12 | |
31 | BuildRequires: expat-devel >= 2.4.1 | |
27b6cb64 | 32 | %{?with_java:BuildRequires: jdk} |
52901ddc JB |
33 | BuildRequires: libstdc++-devel >= 6:5 |
34 | BuildRequires: minizip-ng-devel >= 3.0.7 | |
27b6cb64 | 35 | BuildRequires: pkgconfig |
52901ddc | 36 | BuildRequires: pystring-devel >= 1.1.3 |
0da099bd | 37 | BuildRequires: python3-devel |
52901ddc JB |
38 | BuildRequires: python3-pybind11 >= 2.9.2 |
39 | BuildRequires: rpm-build >= 4.6 | |
40 | BuildRequires: rpmbuild(macros) >= 1.742 | |
41 | BuildRequires: tinyxml-devel >= 2.6.1 | |
42 | BuildRequires: yaml-cpp-devel >= 0.7.0 | |
43 | BuildRequires: zlib-devel >= 1.2.13 | |
b3e55b33 | 44 | %if %{with doc} |
52901ddc | 45 | BuildRequires: python3-breathe |
0da099bd | 46 | BuildRequires: python3-recommonmark |
52901ddc JB |
47 | BuildRequires: python3-six |
48 | BuildRequires: python3-sphinx_press_theme | |
49 | BuildRequires: python3-sphinx_tabs | |
0da099bd | 50 | BuildRequires: python3-testresources |
68f4aba6 | 51 | BuildRequires: sphinx-pdg >= 1.1 |
68f4aba6 | 52 | %endif |
27b6cb64 | 53 | %if %{with opengl} |
52901ddc | 54 | BuildRequires: OpenGL-GLX-devel |
27b6cb64 JB |
55 | BuildRequires: OpenGL-devel |
56 | BuildRequires: OpenGL-glut-devel | |
57 | BuildRequires: glew-devel >= 1.5.1 | |
58 | %endif | |
59 | %if %{with oiio} | |
52901ddc JB |
60 | BuildRequires: OpenImageIO-devel >= 2.2.14 |
61 | BuildRequires: lcms2-devel >= 2.2 | |
27b6cb64 | 62 | %endif |
52901ddc JB |
63 | Requires: expat >= 2.4.1 |
64 | Requires: minizip-ng >= 3.0.7 | |
27b6cb64 | 65 | Requires: tinyxml >= 2.6.1 |
52901ddc JB |
66 | Requires: yaml-cpp >= 0.7.0 |
67 | Requires: zlib >= 1.2.13 | |
68 | %if %{without java} | |
69 | Obsoletes: java-OpenColorIO < 2 | |
70 | %endif | |
27b6cb64 JB |
71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
72 | ||
73 | %description | |
74 | OpenColorIO (OCIO) is a complete color management solution geared | |
75 | towards motion picture production with an emphasis on visual effects | |
76 | and computer animation. OCIO provides a straightforward and consistent | |
77 | user experience across all supporting applications while allowing for | |
78 | sophisticated back-end configuration options suitable for high-end | |
79 | production usage. OCIO is compatible with the Academy Color Encoding | |
80 | Specification (ACES) and is LUT-format agnostic, supporting many | |
81 | popular formats. | |
82 | ||
83 | %description -l pl.UTF-8 | |
84 | OpenColorIO (OCIO) to kompletne rozwiązanie zarządzania kolorami | |
85 | przeznaczone do tworzenia obrazów ruchomych, w szczególności efektów | |
86 | wizualnych i animacji komputerowej. OCIO zapewnia proste i spójne | |
87 | elementy we wszystkich współpracujących aplikacjach, pozwalając na | |
88 | wyszukane opcje konfiguracyjne backendu, nadające się do zastosowań | |
89 | produkcyjnych wysokiej jakości. OCIO jest zgodne ze specyfikacją ACES | |
90 | (Academy Color Encoding Specification) i jest niezależne od formatu | |
91 | LUT dzięki obsłudze wielu popularnych formatów. | |
92 | ||
93 | %package convert | |
94 | Summary: OpenColorIO convert tool | |
95 | Summary(pl.UTF-8): Narzędzie OpenColorIO do konwersji | |
96 | Group: Applications/Graphics | |
97 | Requires: %{name} = %{version}-%{release} | |
52901ddc | 98 | Requires: lcms2 >= 2.2 |
27b6cb64 JB |
99 | |
100 | %description convert | |
101 | OpenColorIO convert tool. | |
102 | ||
103 | %description convert -l pl.UTF-8 | |
104 | Narzędzie OpenColorIO do konwersji. | |
105 | ||
106 | %package display | |
107 | Summary: OpenColorIO viewer based on OpenGL | |
108 | Summary(pl.UTF-8): Przeglądarka OpenColorIO oparta na OpenGL-u | |
109 | Group: X11/Applications/Graphics | |
110 | Requires: %{name} = %{version}-%{release} | |
111 | ||
112 | %description display | |
113 | OpenColorIO viewer based on OpenGL. | |
114 | ||
115 | %description display -l pl.UTF-8 | |
116 | Przeglądarka OpenColorIO oparta na OpenGL-u. | |
117 | ||
118 | %package devel | |
119 | Summary: Header files for OpenColorIO library | |
120 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenColorIO | |
121 | Group: Development/Libraries | |
122 | Requires: %{name} = %{version}-%{release} | |
52901ddc | 123 | Requires: libstdc++-devel >= 6:5 |
27b6cb64 JB |
124 | |
125 | %description devel | |
126 | Header files for OpenColorIO library. | |
127 | ||
128 | %description devel -l pl.UTF-8 | |
129 | Pliki nagłówkowe biblioteki OpenColorIO. | |
130 | ||
52901ddc JB |
131 | %package apidocs |
132 | Summary: API documentation for OpenColorIO library | |
133 | Summary(pl.UTF-8): Dokumentacja API biblioteki OpenColorIO | |
134 | Group: Documentation | |
135 | BuildArch: noarch | |
136 | ||
137 | %description apidocs | |
138 | API documentation for OpenColorIO library. | |
139 | ||
140 | %description apidocs -l pl.UTF-8 | |
141 | Dokumentacja API biblioteki OpenColorIO. | |
142 | ||
27b6cb64 JB |
143 | %package -n java-OpenColorIO |
144 | Summary: Java binding for OpenColorIO library | |
145 | Summary(pl.UTF-8): Wiązanie Javy do biblioteki OpenColorIO | |
146 | Group: Libraries/Java | |
147 | Requires: %{name} = %{version}-%{release} | |
148 | ||
149 | %description -n java-OpenColorIO | |
150 | Java binding for OpenColorIO library. | |
151 | ||
152 | %description -n java-OpenColorIO -l pl.UTF-8 | |
153 | Wiązanie Javy do biblioteki OpenColorIO. | |
154 | ||
0da099bd | 155 | %package -n python3-OpenColorIO |
27b6cb64 JB |
156 | Summary: Python binding for OpenColorIO library |
157 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenColorIO | |
158 | Group: Libraries/Python | |
159 | Requires: %{name} = %{version}-%{release} | |
160 | ||
0da099bd | 161 | %description -n python3-OpenColorIO |
27b6cb64 JB |
162 | Python binding for OpenColorIO library. |
163 | ||
0da099bd | 164 | %description -n python3-OpenColorIO -l pl.UTF-8 |
27b6cb64 JB |
165 | Wiązanie Pythona do biblioteki OpenColorIO. |
166 | ||
27b6cb64 | 167 | %prep |
b9df10ac | 168 | %setup -q |
52901ddc | 169 | %patch0 -p1 |
27b6cb64 JB |
170 | |
171 | %build | |
1ebfdec0 | 172 | # required for cmake to find JNI headers/libs when lib64 is in use |
29d4f210 JB |
173 | %{?with_java:export JAVA_HOME=%{_jvmlibdir}/java} |
174 | ||
27b6cb64 JB |
175 | install -d build |
176 | cd build | |
177 | %cmake .. \ | |
0da099bd | 178 | -DCMAKE_CONFIGURATION_TYPES=PLD \ |
e9435103 | 179 | -DCMAKE_CXX_STANDARD=14 \ |
52901ddc JB |
180 | %{cmake_on_off doc OCIO_BUILD_DOCS} \ |
181 | %{cmake_on_off java OCIO_BUILD_JAVA} \ | |
182 | %{?with_oiio:-DOCIO_USE_OIIO_FOR_APPS=ON} \ | |
183 | %{!?with_sse2:-DOCIO_USE_SSE=OFF} | |
27b6cb64 JB |
184 | |
185 | %{__make} | |
186 | ||
187 | %install | |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
190 | %{__make} -C build install \ | |
191 | DESTDIR=$RPM_BUILD_ROOT | |
192 | ||
27b6cb64 JB |
193 | # not needed when installing to /usr |
194 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/ocio/setup_ocio.sh | |
52901ddc JB |
195 | # packaged as %doc |
196 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/OpenColorIO | |
27b6cb64 JB |
197 | |
198 | %clean | |
199 | rm -rf $RPM_BUILD_ROOT | |
200 | ||
201 | %post -p /sbin/ldconfig | |
202 | %postun -p /sbin/ldconfig | |
203 | ||
204 | %post -n java-OpenColorIO -p /sbin/ldconfig | |
205 | %postun -n java-OpenColorIO -p /sbin/ldconfig | |
206 | ||
0da099bd JR |
207 | %post -n python3-OpenColorIO -p /sbin/ldconfig |
208 | %postun -n python3-OpenColorIO -p /sbin/ldconfig | |
27b6cb64 JB |
209 | |
210 | %files | |
211 | %defattr(644,root,root,755) | |
0da099bd | 212 | %doc CHANGELOG.md LICENSE README.md |
52901ddc | 213 | %attr(755,root,root) %{_bindir}/ocioarchive |
27b6cb64 JB |
214 | %attr(755,root,root) %{_bindir}/ociobakelut |
215 | %attr(755,root,root) %{_bindir}/ociocheck | |
0da099bd JR |
216 | %attr(755,root,root) %{_bindir}/ociochecklut |
217 | %attr(755,root,root) %{_bindir}/ociomakeclf | |
52901ddc | 218 | %attr(755,root,root) %{_bindir}/ocioperf |
0da099bd | 219 | %attr(755,root,root) %{_bindir}/ociowrite |
27b6cb64 | 220 | %attr(755,root,root) %{_libdir}/libOpenColorIO.so.*.*.* |
52901ddc | 221 | %attr(755,root,root) %ghost %{_libdir}/libOpenColorIO.so.2.2 |
27b6cb64 | 222 | |
27b6cb64 JB |
223 | %files convert |
224 | %defattr(644,root,root,755) | |
225 | %attr(755,root,root) %{_bindir}/ocioconvert | |
d8e33fed | 226 | %attr(755,root,root) %{_bindir}/ociolutimage |
27b6cb64 | 227 | |
52901ddc | 228 | %if %{with opengl} |
27b6cb64 JB |
229 | %files display |
230 | %defattr(644,root,root,755) | |
231 | %attr(755,root,root) %{_bindir}/ociodisplay | |
232 | %endif | |
233 | ||
234 | %files devel | |
235 | %defattr(644,root,root,755) | |
27b6cb64 | 236 | %attr(755,root,root) %{_libdir}/libOpenColorIO.so |
52901ddc | 237 | %{_libdir}/libOpenColorIOimageioapphelpers.a |
0da099bd | 238 | %{_libdir}/libOpenColorIOoglapphelpers.a |
a7185576 | 239 | %{?with_oiio:%{_libdir}/libOpenColorIOoiiohelpers.a} |
27b6cb64 JB |
240 | %{_includedir}/OpenColorIO |
241 | %{_pkgconfigdir}/OpenColorIO.pc | |
b9df10ac | 242 | %{_libdir}/cmake/OpenColorIO |
27b6cb64 | 243 | |
52901ddc JB |
244 | %files apidocs |
245 | %defattr(644,root,root,755) | |
246 | %doc build/docs/build-html/{_images,_static,api,aswf,concepts,configurations,guides,quick_start,releases,tutorials,*.html,*.js} | |
247 | ||
27b6cb64 JB |
248 | %if %{with java} |
249 | %files -n java-OpenColorIO | |
250 | %defattr(644,root,root,755) | |
251 | %attr(755,root,root) %{_libdir}/libOpenColorIO-JNI.so.*.*.* | |
252 | %attr(755,root,root) %ghost %{_libdir}/libOpenColorIO-JNI.so.1 | |
253 | %attr(755,root,root) %{_libdir}/libOpenColorIO-JNI.so | |
254 | %dir %{_datadir}/ocio | |
a05bc41e | 255 | %{_datadir}/ocio/OpenColorIO-%{version}.jar |
27b6cb64 JB |
256 | %endif |
257 | ||
0da099bd | 258 | %files -n python3-OpenColorIO |
27b6cb64 | 259 | %defattr(644,root,root,755) |
0da099bd | 260 | %attr(755,root,root) %{py3_sitedir}/PyOpenColorIO.so |