]>
Commit | Line | Data |
---|---|---|
917cf92b JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build with tests | |
4 | %bcond_with tbb # Use tbb for multithreading | |
5 | %bcond_without openmp # Use openmp for multithreading | |
085a5397 AM |
6 | # |
7 | Summary: OpenCASCADE Community Edition | |
8 | Name: OCE | |
917cf92b | 9 | Version: 0.18.3 |
5864edef | 10 | Release: 3 |
085a5397 AM |
11 | License: LGPLv2 with exception |
12 | Group: Applications/Engineering | |
13 | URL: https://github.com/tpaviot/oce | |
14 | Source0: https://github.com/tpaviot/oce/archive/%{name}-%{version}.tar.gz | |
917cf92b | 15 | # Source0-md5: 1686393c8493bbbb2f3f242330b33cba |
085a5397 AM |
16 | Source1: DRAWEXE.1 |
17 | Source2: opencascade-draw.desktop | |
18 | Source3: oce-256.png | |
19 | Source4: oce-128.png | |
20 | Source5: oce-64.png | |
21 | Source6: oce-48.png | |
22 | # Utilities | |
23 | BuildRequires: cmake | |
24 | BuildRequires: desktop-file-utils | |
25 | # Libraries | |
26 | BuildRequires: FreeImage-devel | |
27 | BuildRequires: Mesa-libGL-devel | |
28 | BuildRequires: Mesa-libGLU-devel | |
29 | BuildRequires: ftgl-devel | |
30 | BuildRequires: gl2ps-devel | |
31 | BuildRequires: libgomp | |
917cf92b JR |
32 | %{?with_openmp:BuildRequires: libopenmpt-devel} |
33 | %{?with_tbb:BuildRequires: tbb-devel} | |
085a5397 AM |
34 | BuildRequires: tcl-devel |
35 | BuildRequires: tk-devel | |
36 | BuildRequires: xorg-lib-libXScrnSaver-devel | |
37 | BuildRequires: xorg-lib-libXcomposite-devel | |
38 | BuildRequires: xorg-lib-libXcursor-devel | |
39 | BuildRequires: xorg-lib-libXdmcp-devel | |
40 | BuildRequires: xorg-lib-libXi-devel | |
41 | BuildRequires: xorg-lib-libXinerama-devel | |
42 | BuildRequires: xorg-lib-libXmu-devel | |
43 | BuildRequires: xorg-lib-libXpm-devel | |
44 | BuildRequires: xorg-lib-libXrandr-devel | |
45 | BuildRequires: xorg-lib-libXres-devel | |
46 | BuildRequires: xorg-lib-libXtst-devel | |
47 | BuildRequires: xorg-lib-libXv-devel | |
085a5397 AM |
48 | BuildRequires: xorg-lib-libxkbfile |
49 | BuildRequires: xorg-proto-xproto-devel | |
50 | ||
51 | %description | |
52 | OpenCASCADE Community Edition (OCE) is a suite for 3D surface and | |
53 | solid modeling, visualization, data exchange and rapid application | |
54 | development. It is an excellent platform for development of numerical | |
55 | simulation software including CAD/CAM/CAE, AEC and GIS, as well as PDM | |
56 | applications. | |
57 | ||
58 | %package foundation | |
59 | Summary: OpenCASCADE CAE platform shared libraries | |
60 | Group: Libraries | |
61 | ||
62 | %description foundation | |
63 | OpenCASCADE CAE platform shared libraries | |
64 | ||
65 | This package contains foundation classes which provide a variety of | |
66 | general-purpose services such as automated management of heap memory, | |
67 | exception handling, classes for manipulating aggregates of data, basic | |
68 | math tools. | |
69 | ||
70 | %package modeling | |
71 | Summary: OpenCASCADE CAE platform shared libraries | |
72 | Group: Libraries | |
73 | ||
74 | %description modeling | |
75 | OpenCASCADE CAE platform shared libraries | |
76 | ||
77 | This package supplies data structures to represent 2D and 3D geometric | |
78 | models, as well as topological and geometrical algorithms. | |
79 | ||
80 | %package ocaf | |
81 | Summary: OpenCASCADE CAE platform shared libraries | |
82 | Group: Libraries | |
83 | ||
84 | %description ocaf | |
85 | OpenCASCADE CAE platform shared libraries | |
86 | ||
87 | This package provides OpenCASCADE Application Framework services and | |
88 | support for data exchange. | |
89 | ||
90 | %package visualization | |
91 | Summary: OpenCASCADE CAE platform shared libraries | |
92 | Group: Libraries | |
93 | ||
94 | %description visualization | |
95 | OpenCASCADE CAE platform shared libraries | |
96 | ||
97 | This package provides services for displaying 2D and 3D graphics. | |
98 | ||
99 | %package examples | |
100 | Summary: OpenCASCADE CAE platform shared libraries | |
101 | Group: Libraries | |
102 | ||
103 | %description examples | |
104 | OpenCASCADE CAE platform shared libraries | |
105 | ||
106 | This package contains example input files for OpenCASCADE in various | |
107 | formats. | |
108 | ||
109 | %package draw | |
110 | Summary: OpenCASCADE CAE platform shared libraries | |
111 | Group: Libraries | |
112 | ||
113 | %description draw | |
114 | OpenCASCADE CAE DRAW test harness. | |
115 | ||
116 | %package devel | |
117 | Summary: OpenCASCADE CAE platform library development files | |
118 | Group: Development/Libraries | |
3a25ad63 | 119 | Requires: %{name}-draw = %{version}-%{release} |
085a5397 AM |
120 | Requires: %{name}-foundation = %{version}-%{release} |
121 | Requires: %{name}-modeling = %{version}-%{release} | |
122 | Requires: %{name}-ocaf = %{version}-%{release} | |
123 | Requires: %{name}-visualization = %{version}-%{release} | |
124 | Requires: FreeImage-devel | |
125 | Requires: Mesa-libGL-devel | |
126 | Requires: Mesa-libGLU-devel | |
127 | Requires: freetype-devel | |
128 | Requires: gl2ps-devel | |
129 | Requires: tbb-devel | |
130 | Requires: tcl-devel | |
131 | Requires: tk-devel | |
132 | Requires: xorg-lib-libICE-devel | |
133 | Requires: xorg-lib-libSM-devel | |
134 | Requires: xorg-lib-libX11-devel | |
135 | Requires: xorg-lib-libXScrnSaver-devel | |
136 | Requires: xorg-lib-libXcomposite-devel | |
137 | Requires: xorg-lib-libXcursor-devel | |
138 | Requires: xorg-lib-libXdmcp-devel | |
139 | Requires: xorg-lib-libXext-devel | |
140 | Requires: xorg-lib-libXi-devel | |
141 | Requires: xorg-lib-libXinerama-devel | |
142 | Requires: xorg-lib-libXpm-devel | |
143 | Requires: xorg-lib-libXrandr-devel | |
144 | Requires: xorg-lib-libXres-devel | |
145 | Requires: xorg-lib-libXtst-devel | |
146 | Requires: xorg-lib-libXv-devel | |
085a5397 AM |
147 | Requires: xorg-lib-libxkbfile |
148 | ||
149 | %description devel | |
150 | OpenCASCADE CAE platform library development files | |
151 | ||
152 | %prep | |
153 | %setup -q -n oce-%{name}-%{version} | |
154 | ||
155 | %build | |
156 | install -d build | |
157 | cd build | |
158 | %{cmake} \ | |
159 | -DOCE_INSTALL_PREFIX=%{_prefix} \ | |
160 | -DOCE_INSTALL_LIB_DIR=%{_lib} \ | |
161 | -DOCE_WITH_FREEIMAGE=ON \ | |
162 | -DOCE_WITH_GL2PS=ON \ | |
917cf92b | 163 | -DOCE_MULTITHREAD_LIBRARY:STRING=%{?with_tbb:TBB}%{!?with_tbb:%{?with_openmp:OPENMP}%{!?with_openmp:NONE}} \ |
085a5397 AM |
164 | -DOCE_DRAW=ON \ |
165 | -DOCE_TESTING=ON \ | |
166 | ../ | |
167 | ||
168 | %{__make} | |
169 | ||
170 | %if %{with tests} | |
171 | export CTEST_OUTPUT_ON_FAILURE=1 | |
172 | %{__make} -C test test | |
173 | %endif | |
174 | ||
175 | %install | |
176 | rm -rf $RPM_BUILD_ROOT | |
177 | ||
178 | %{__make} -C build install \ | |
179 | DESTDIR=$RPM_BUILD_ROOT | |
180 | ||
181 | # Install manpage for DRAWEXE | |
182 | install -Dm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/DRAWEXE.1 | |
183 | ||
184 | # Install and validate desktop file | |
185 | desktop-file-install \ | |
186 | --dir=$RPM_BUILD_ROOT%{_desktopdir} \ | |
187 | %{SOURCE2} | |
188 | ||
189 | # Install icons | |
190 | for size in 256 128 64 48; do | |
191 | icon=%{_sourcedir}/oce-${size}.png | |
192 | install -Dm 0644 $icon \ | |
193 | $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}x${size}/apps/oce.png | |
194 | done | |
195 | ||
196 | %post foundation -p /sbin/ldconfig | |
197 | %postun foundation -p /sbin/ldconfig | |
198 | ||
199 | %post modeling -p /sbin/ldconfig | |
200 | %postun modeling -p /sbin/ldconfig | |
201 | ||
202 | %post ocaf -p /sbin/ldconfig | |
203 | %postun ocaf -p /sbin/ldconfig | |
204 | ||
205 | %post visualization -p /sbin/ldconfig | |
206 | %postun visualization -p /sbin/ldconfig | |
207 | ||
208 | %post draw | |
209 | %update_icon_cache hicolor | |
210 | ||
211 | %postun draw | |
212 | if [ $1 -eq 0 ] ; then | |
213 | %update_icon_cache hicolor | |
214 | fi | |
215 | ||
216 | %clean | |
217 | rm -rf $RPM_BUILD_ROOT | |
218 | ||
219 | %files foundation | |
220 | %defattr(644,root,root,755) | |
c8d4370e | 221 | %doc AUTHORS.md LICENSE_LGPL_21.txt NEWS.md OCCT_LGPL_EXCEPTION.txt |
085a5397 AM |
222 | # Foundation |
223 | %attr(755,root,root) %{_libdir}/libTKernel.so.* | |
224 | %attr(755,root,root) %{_libdir}/libTKMath.so.* | |
085a5397 AM |
225 | %{_datadir}/oce-*.*/ |
226 | ||
227 | %files modeling | |
228 | %defattr(644,root,root,755) | |
229 | # Modeling Data | |
230 | %attr(755,root,root) %{_libdir}/libTKG2d.so.* | |
231 | %attr(755,root,root) %{_libdir}/libTKG3d.so.* | |
232 | %attr(755,root,root) %{_libdir}/libTKGeomBase.so.* | |
233 | %attr(755,root,root) %{_libdir}/libTKBRep.so.* | |
234 | # Modeling Algorithm s | |
235 | %attr(755,root,root) %{_libdir}/libTKGeomAlgo.so.* | |
236 | %attr(755,root,root) %{_libdir}/libTKTopAlgo.so.* | |
237 | %attr(755,root,root) %{_libdir}/libTKPrim.so.* | |
238 | %attr(755,root,root) %{_libdir}/libTKBO.so.* | |
239 | %attr(755,root,root) %{_libdir}/libTKHLR.so.* | |
240 | %attr(755,root,root) %{_libdir}/libTKMesh.so.* | |
241 | %attr(755,root,root) %{_libdir}/libTKShHealing.so.* | |
242 | %attr(755,root,root) %{_libdir}/libTKXMesh.so.* | |
243 | %attr(755,root,root) %{_libdir}/libTKBool.so.* | |
244 | %attr(755,root,root) %{_libdir}/libTKFillet.so.* | |
245 | %attr(755,root,root) %{_libdir}/libTKFeat.so.* | |
246 | %attr(755,root,root) %{_libdir}/libTKOffset.so.* | |
247 | # Data exchange | |
248 | %attr(755,root,root) %{_libdir}/libTKSTL.so.* | |
249 | %attr(755,root,root) %{_libdir}/libTKXSBase.so.* | |
250 | %attr(755,root,root) %{_libdir}/libTKSTEPBase.so.* | |
251 | %attr(755,root,root) %{_libdir}/libTKIGES.so.* | |
252 | %attr(755,root,root) %{_libdir}/libTKSTEPAttr.so.* | |
253 | %attr(755,root,root) %{_libdir}/libTKSTEP209.so.* | |
254 | %attr(755,root,root) %{_libdir}/libTKSTEP.so.* | |
255 | %attr(755,root,root) %{_libdir}/libTKVRML.so.* | |
256 | %attr(755,root,root) %{_libdir}/libTKXCAF.so.* | |
257 | %attr(755,root,root) %{_libdir}/libTKXCAFSchema.so.* | |
258 | %attr(755,root,root) %{_libdir}/libTKXmlXCAF.so.* | |
259 | %attr(755,root,root) %{_libdir}/libTKBinXCAF.so.* | |
260 | %attr(755,root,root) %{_libdir}/libTKXDEIGES.so.* | |
261 | %attr(755,root,root) %{_libdir}/libTKXDESTEP.so.* | |
262 | ||
263 | %files visualization | |
264 | %defattr(644,root,root,755) | |
265 | # Visualization Dependents | |
266 | %attr(755,root,root) %{_libdir}/libTKService.so.* | |
267 | %attr(755,root,root) %{_libdir}/libTKV3d.so.* | |
268 | # Visualization | |
269 | %attr(755,root,root) %{_libdir}/libTKOpenGl.so.* | |
270 | %attr(755,root,root) %{_libdir}/libTKMeshVS.so.* | |
271 | %attr(755,root,root) %{_libdir}/libTKNIS.so.* | |
272 | %attr(755,root,root) %{_libdir}/libTKVoxel.so.* | |
273 | ||
274 | %files ocaf | |
275 | %defattr(644,root,root,755) | |
276 | # Application framework | |
277 | %attr(755,root,root) %{_libdir}/libTKCDF.so.* | |
278 | %attr(755,root,root) %{_libdir}/libPTKernel.so.* | |
279 | %attr(755,root,root) %{_libdir}/libTKLCAF.so.* | |
280 | %attr(755,root,root) %{_libdir}/libFWOSPlugin.so.* | |
281 | %attr(755,root,root) %{_libdir}/libTKPShape.so.* | |
282 | %attr(755,root,root) %{_libdir}/libTKBinL.so.* | |
283 | %attr(755,root,root) %{_libdir}/libTKXmlL.so.* | |
284 | %attr(755,root,root) %{_libdir}/libTKPLCAF.so.* | |
285 | %attr(755,root,root) %{_libdir}/libTKTObj.so.* | |
286 | %attr(755,root,root) %{_libdir}/libTKShapeSchema.so.* | |
287 | %attr(755,root,root) %{_libdir}/libTKStdLSchema.so.* | |
288 | %attr(755,root,root) %{_libdir}/libTKCAF.so.* | |
289 | %attr(755,root,root) %{_libdir}/libTKBin.so.* | |
290 | %attr(755,root,root) %{_libdir}/libTKXml.so.* | |
291 | %attr(755,root,root) %{_libdir}/libTKPCAF.so.* | |
292 | %attr(755,root,root) %{_libdir}/libTKBinTObj.so.* | |
293 | %attr(755,root,root) %{_libdir}/libTKXmlTObj.so.* | |
294 | %attr(755,root,root) %{_libdir}/libTKStdSchema.so.* | |
295 | ||
296 | %files draw | |
297 | %defattr(644,root,root,755) | |
298 | # Draw Libraries | |
299 | %dir %{_libdir}/oce-*.* | |
300 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKDraw.so.* | |
301 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKTopTest.so.* | |
302 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKViewerTest.so.* | |
303 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKXSDRAW.so.* | |
304 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKDCAF.so.* | |
305 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKXDEDRAW.so.* | |
306 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKTObjDRAW.so.* | |
307 | # DRAWEXE application | |
308 | %attr(755,root,root) %{_bindir}/DRAWEXE | |
309 | %{_mandir}/man1/DRAWEXE.1* | |
310 | %{_desktopdir}/opencascade-draw.desktop | |
311 | %{_iconsdir}/hicolor/*/apps/* | |
312 | ||
313 | %files devel | |
314 | %defattr(644,root,root,755) | |
315 | %doc examples | |
316 | %{_includedir}/* | |
317 | %attr(755,root,root) %{_libdir}/*.so | |
318 | %attr(755,root,root) %{_libdir}/oce-*.*/*.so | |
319 | %{_libdir}/oce-*.*/*.cmake |