]> git.pld-linux.org Git - packages/OpenColorIO.git/blob - OpenColorIO.spec
- added libsuffix patch to fix libOpenColorIO.a install path
[packages/OpenColorIO.git] / OpenColorIO.spec
1 # TODO (proprietary?):
2 # - truelight http://www.filmlight.ltd.uk/products/truelight/overview_tl.php
3 # - nuke: http://docs.thefoundry.co.uk/products/nuke/
4 #
5 # Conditional build:
6 %bcond_without  oiio    # OpenImageIO-dependent apps (ocioconvert,ociodisplay)
7 %bcond_without  opengl  # OpenGL-dependent app (ociodisplay)
8 %bcond_without  java    # JNI glue
9 %bcond_without  docs    # documentation
10 %bcond_with     sse2    # use SSE2 instructions
11 #
12 %ifarch %{x8664} pentrium4
13 %define with_sse2       1
14 %endif
15 Summary:        Complete color management solution
16 Summary(pl.UTF-8):      Kompletny pakiet do zarządzania kolorami
17 Name:           OpenColorIO
18 Version:        1.0.6
19 Release:        1
20 License:        BSD
21 Group:          Libraries
22 Source0:        https://github.com/imageworks/OpenColorIO/tarball/v%{version}#/%{name}-%{version}.tar.gz
23 # Source0-md5:  7bd5521d8671be9f9f92339b32497908
24 Patch0:         %{name}-system-libs.patch
25 Patch1:         %{name}-java.patch
26 Patch2:         %{name}-libsuffix.patch
27 URL:            http://opencolorio.org/
28 # g++ with tr1 support or...
29 #BuildRequires: boost-devel >= 1.34
30 BuildRequires:  cmake >= 2.8
31 %{?with_java:BuildRequires:     jdk}
32 BuildRequires:  libstdc++-devel
33 BuildRequires:  pkgconfig
34 BuildRequires:  python-devel
35 %{?with_docs:BuildRequires:     sphinx-pdg >= 1.1}
36 BuildRequires:  tinyxml-devel >= 2.6.1
37 BuildRequires:  yaml-cpp-devel >= 0.2.6
38 %if %{with opengl}
39 BuildRequires:  OpenGL-devel
40 BuildRequires:  OpenGL-glut-devel
41 BuildRequires:  glew-devel >= 1.5.1
42 %endif
43 %if %{with oiio}
44 BuildRequires:  OpenImageIO-devel
45 BuildRequires:  lcms2-devel >= 2.1
46 %endif
47 Requires:       tinyxml >= 2.6.1
48 Requires:       yaml-cpp >= 0.2.6
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 OpenColorIO (OCIO) is a complete color management solution geared
53 towards motion picture production with an emphasis on visual effects
54 and computer animation. OCIO provides a straightforward and consistent
55 user experience across all supporting applications while allowing for
56 sophisticated back-end configuration options suitable for high-end
57 production usage. OCIO is compatible with the Academy Color Encoding
58 Specification (ACES) and is LUT-format agnostic, supporting many
59 popular formats.
60
61 %description -l pl.UTF-8
62 OpenColorIO (OCIO) to kompletne rozwiązanie zarządzania kolorami
63 przeznaczone do tworzenia obrazów ruchomych, w szczególności efektów
64 wizualnych i animacji komputerowej. OCIO zapewnia proste i spójne
65 elementy we wszystkich współpracujących aplikacjach, pozwalając na
66 wyszukane opcje konfiguracyjne backendu, nadające się do zastosowań
67 produkcyjnych wysokiej jakości. OCIO jest zgodne ze specyfikacją ACES
68 (Academy Color Encoding Specification) i jest niezależne od formatu
69 LUT dzięki obsłudze wielu popularnych formatów.
70
71 %package convert
72 Summary:        OpenColorIO convert tool
73 Summary(pl.UTF-8):      Narzędzie OpenColorIO do konwersji
74 Group:          Applications/Graphics
75 Requires:       %{name} = %{version}-%{release}
76
77 %description convert
78 OpenColorIO convert tool.
79
80 %description convert -l pl.UTF-8
81 Narzędzie OpenColorIO do konwersji.
82
83 %package display
84 Summary:        OpenColorIO viewer based on OpenGL
85 Summary(pl.UTF-8):      Przeglądarka OpenColorIO oparta na OpenGL-u
86 Group:          X11/Applications/Graphics
87 Requires:       %{name} = %{version}-%{release}
88
89 %description display
90 OpenColorIO viewer based on OpenGL.
91
92 %description display -l pl.UTF-8
93 Przeglądarka OpenColorIO oparta na OpenGL-u.
94
95 %package devel
96 Summary:        Header files for OpenColorIO library
97 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki OpenColorIO
98 Group:          Development/Libraries
99 Requires:       %{name} = %{version}-%{release}
100 Requires:       libstdc++-devel
101
102 %description devel
103 Header files for OpenColorIO library.
104
105 %description devel -l pl.UTF-8
106 Pliki nagłówkowe biblioteki OpenColorIO.
107
108 %package static
109 Summary:        Static OpenColorIO library
110 Summary(pl.UTF-8):      Statyczna biblioteka OpenColorIO
111 Group:          Development/Libraries
112 Requires:       %{name}-devel = %{version}-%{release}
113
114 %description static
115 Static OpenColorIO library.
116
117 %description static -l pl.UTF-8
118 Statyczna biblioteka OpenColorIO.
119
120 %package -n java-OpenColorIO
121 Summary:        Java binding for OpenColorIO library
122 Summary(pl.UTF-8):      Wiązanie Javy do biblioteki OpenColorIO
123 Group:          Libraries/Java
124 Requires:       %{name} = %{version}-%{release}
125
126 %description -n java-OpenColorIO
127 Java binding for OpenColorIO library.
128
129 %description -n java-OpenColorIO -l pl.UTF-8
130 Wiązanie Javy do biblioteki OpenColorIO.
131
132 %package -n python-OpenColorIO
133 Summary:        Python binding for OpenColorIO library
134 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki OpenColorIO
135 Group:          Libraries/Python
136 Requires:       %{name} = %{version}-%{release}
137
138 %description -n python-OpenColorIO
139 Python binding for OpenColorIO library.
140
141 %description -n python-OpenColorIO -l pl.UTF-8
142 Wiązanie Pythona do biblioteki OpenColorIO.
143
144 %package -n python-OpenColorIO-devel
145 Summary:        Header file for PyOpenColorIO API
146 Summary(pl.UTF-8):      Plik nagłówkowy API PyOpenColorIO
147 Group:          Development/Libraries
148 Requires:       %{name}-devel = %{version}-%{release}
149 Requires:       python-OpenColorIO = %{version}-%{release}
150
151 %description -n python-OpenColorIO-devel
152 Header file for PyOpenColorIO API.
153
154 %description -n python-OpenColorIO-devel -l pl.UTF-8
155 Plik nagłówkowy API PyOpenColorIO.
156
157 %prep
158 %setup -q -n imageworks-OpenColorIO-a16d9ac
159 %patch0 -p1
160 %patch1 -p1
161 %patch2 -p1
162
163 %build
164 %{?with_java:export JAVA_HOME=%{_jvmlibdir}/java}
165
166 install -d build
167 cd build
168 %cmake .. \
169         -DOCIO_BUILD_DOCS=ON \
170 %if %{with java}
171         -DOCIO_BUILD_JNIGLUE=ON \
172         -DOCIO_STATIC_JNIGLUE=OFF \
173 %endif
174         %{!?with_sse2:-DOCIO_USE_SSE=OFF} \
175         -DPYTHON_INCLUDE_LIB_PREFIX=ON
176
177 %{__make}
178
179 %install
180 rm -rf $RPM_BUILD_ROOT
181
182 %{__make} -C build install \
183         DESTDIR=$RPM_BUILD_ROOT
184
185 # we use PYTHON_INCLUDE_LIB_PREFIX=ON so library is useful as C++ API
186 # but allow it to be loaded without lib prefix
187 ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libPyOpenColorIO.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/PyOpenColorIO.so
188
189 # not needed when installing to /usr
190 %{__rm} $RPM_BUILD_ROOT%{_datadir}/ocio/setup_ocio.sh
191 # packaged as %doc
192 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/OpenColorIO
193
194 %clean
195 rm -rf $RPM_BUILD_ROOT
196
197 %post   -p /sbin/ldconfig
198 %postun -p /sbin/ldconfig
199
200 %post   -n java-OpenColorIO -p /sbin/ldconfig
201 %postun -n java-OpenColorIO -p /sbin/ldconfig
202
203 %post   -n python-OpenColorIO -p /sbin/ldconfig
204 %postun -n python-OpenColorIO -p /sbin/ldconfig
205
206 %files
207 %defattr(644,root,root,755)
208 %doc ChangeLog LICENSE README
209 %attr(755,root,root) %{_bindir}/ociobakelut
210 %attr(755,root,root) %{_bindir}/ociocheck
211 %attr(755,root,root) %{_libdir}/libOpenColorIO.so.*.*.*
212 %attr(755,root,root) %ghost %{_libdir}/libOpenColorIO.so.1
213
214 %if %{with oiio}
215 %files convert
216 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_bindir}/ocioconvert
218 %endif
219
220 %if %{with oiio} && %{with opengl}
221 %files display
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_bindir}/ociodisplay
224 %endif
225
226 %files devel
227 %defattr(644,root,root,755)
228 %doc build/docs/build-html/*
229 %attr(755,root,root) %{_libdir}/libOpenColorIO.so
230 %{_includedir}/OpenColorIO
231 %{_pkgconfigdir}/OpenColorIO.pc
232
233 %files static
234 %defattr(644,root,root,755)
235 %{_libdir}/libOpenColorIO.a
236
237 %if %{with java}
238 %files -n java-OpenColorIO
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libOpenColorIO-JNI.so.*.*.*
241 %attr(755,root,root) %ghost %{_libdir}/libOpenColorIO-JNI.so.1
242 %attr(755,root,root) %{_libdir}/libOpenColorIO-JNI.so
243 %dir %{_datadir}/ocio
244 %{_datadir}/ocio/OpenColorIO-1.0.6.jar
245 %endif
246
247 %files -n python-OpenColorIO
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_libdir}/libPyOpenColorIO.so.*.*.*
250 %attr(755,root,root) %ghost %{_libdir}/libPyOpenColorIO.so.1
251 %attr(755,root,root) %{_libdir}/PyOpenColorIO.so
252
253 %files -n python-OpenColorIO-devel
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_libdir}/libPyOpenColorIO.so
256 %{_includedir}/PyOpenColorIO
This page took 0.189196 seconds and 4 git commands to generate.