]>
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 |
fc9ce7cd | 10 | Release: 2 |
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 | |
147 | Requires: xorg-lib-libXxf86misc-devel | |
148 | Requires: xorg-lib-libxkbfile | |
149 | ||
150 | %description devel | |
151 | OpenCASCADE CAE platform library development files | |
152 | ||
153 | %prep | |
154 | %setup -q -n oce-%{name}-%{version} | |
155 | ||
156 | %build | |
157 | install -d build | |
158 | cd build | |
159 | %{cmake} \ | |
160 | -DOCE_INSTALL_PREFIX=%{_prefix} \ | |
161 | -DOCE_INSTALL_LIB_DIR=%{_lib} \ | |
162 | -DOCE_WITH_FREEIMAGE=ON \ | |
163 | -DOCE_WITH_GL2PS=ON \ | |
917cf92b | 164 | -DOCE_MULTITHREAD_LIBRARY:STRING=%{?with_tbb:TBB}%{!?with_tbb:%{?with_openmp:OPENMP}%{!?with_openmp:NONE}} \ |
085a5397 AM |
165 | -DOCE_DRAW=ON \ |
166 | -DOCE_TESTING=ON \ | |
167 | ../ | |
168 | ||
169 | %{__make} | |
170 | ||
171 | %if %{with tests} | |
172 | export CTEST_OUTPUT_ON_FAILURE=1 | |
173 | %{__make} -C test test | |
174 | %endif | |
175 | ||
176 | %install | |
177 | rm -rf $RPM_BUILD_ROOT | |
178 | ||
179 | %{__make} -C build install \ | |
180 | DESTDIR=$RPM_BUILD_ROOT | |
181 | ||
182 | # Install manpage for DRAWEXE | |
183 | install -Dm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/man1/DRAWEXE.1 | |
184 | ||
185 | # Install and validate desktop file | |
186 | desktop-file-install \ | |
187 | --dir=$RPM_BUILD_ROOT%{_desktopdir} \ | |
188 | %{SOURCE2} | |
189 | ||
190 | # Install icons | |
191 | for size in 256 128 64 48; do | |
192 | icon=%{_sourcedir}/oce-${size}.png | |
193 | install -Dm 0644 $icon \ | |
194 | $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}x${size}/apps/oce.png | |
195 | done | |
196 | ||
197 | %post foundation -p /sbin/ldconfig | |
198 | %postun foundation -p /sbin/ldconfig | |
199 | ||
200 | %post modeling -p /sbin/ldconfig | |
201 | %postun modeling -p /sbin/ldconfig | |
202 | ||
203 | %post ocaf -p /sbin/ldconfig | |
204 | %postun ocaf -p /sbin/ldconfig | |
205 | ||
206 | %post visualization -p /sbin/ldconfig | |
207 | %postun visualization -p /sbin/ldconfig | |
208 | ||
209 | %post draw | |
210 | %update_icon_cache hicolor | |
211 | ||
212 | %postun draw | |
213 | if [ $1 -eq 0 ] ; then | |
214 | %update_icon_cache hicolor | |
215 | fi | |
216 | ||
217 | %clean | |
218 | rm -rf $RPM_BUILD_ROOT | |
219 | ||
220 | %files foundation | |
221 | %defattr(644,root,root,755) | |
c8d4370e | 222 | %doc AUTHORS.md LICENSE_LGPL_21.txt NEWS.md OCCT_LGPL_EXCEPTION.txt |
085a5397 AM |
223 | # Foundation |
224 | %attr(755,root,root) %{_libdir}/libTKernel.so.* | |
225 | %attr(755,root,root) %{_libdir}/libTKMath.so.* | |
085a5397 AM |
226 | %{_datadir}/oce-*.*/ |
227 | ||
228 | %files modeling | |
229 | %defattr(644,root,root,755) | |
230 | # Modeling Data | |
231 | %attr(755,root,root) %{_libdir}/libTKG2d.so.* | |
232 | %attr(755,root,root) %{_libdir}/libTKG3d.so.* | |
233 | %attr(755,root,root) %{_libdir}/libTKGeomBase.so.* | |
234 | %attr(755,root,root) %{_libdir}/libTKBRep.so.* | |
235 | # Modeling Algorithm s | |
236 | %attr(755,root,root) %{_libdir}/libTKGeomAlgo.so.* | |
237 | %attr(755,root,root) %{_libdir}/libTKTopAlgo.so.* | |
238 | %attr(755,root,root) %{_libdir}/libTKPrim.so.* | |
239 | %attr(755,root,root) %{_libdir}/libTKBO.so.* | |
240 | %attr(755,root,root) %{_libdir}/libTKHLR.so.* | |
241 | %attr(755,root,root) %{_libdir}/libTKMesh.so.* | |
242 | %attr(755,root,root) %{_libdir}/libTKShHealing.so.* | |
243 | %attr(755,root,root) %{_libdir}/libTKXMesh.so.* | |
244 | %attr(755,root,root) %{_libdir}/libTKBool.so.* | |
245 | %attr(755,root,root) %{_libdir}/libTKFillet.so.* | |
246 | %attr(755,root,root) %{_libdir}/libTKFeat.so.* | |
247 | %attr(755,root,root) %{_libdir}/libTKOffset.so.* | |
248 | # Data exchange | |
249 | %attr(755,root,root) %{_libdir}/libTKSTL.so.* | |
250 | %attr(755,root,root) %{_libdir}/libTKXSBase.so.* | |
251 | %attr(755,root,root) %{_libdir}/libTKSTEPBase.so.* | |
252 | %attr(755,root,root) %{_libdir}/libTKIGES.so.* | |
253 | %attr(755,root,root) %{_libdir}/libTKSTEPAttr.so.* | |
254 | %attr(755,root,root) %{_libdir}/libTKSTEP209.so.* | |
255 | %attr(755,root,root) %{_libdir}/libTKSTEP.so.* | |
256 | %attr(755,root,root) %{_libdir}/libTKVRML.so.* | |
257 | %attr(755,root,root) %{_libdir}/libTKXCAF.so.* | |
258 | %attr(755,root,root) %{_libdir}/libTKXCAFSchema.so.* | |
259 | %attr(755,root,root) %{_libdir}/libTKXmlXCAF.so.* | |
260 | %attr(755,root,root) %{_libdir}/libTKBinXCAF.so.* | |
261 | %attr(755,root,root) %{_libdir}/libTKXDEIGES.so.* | |
262 | %attr(755,root,root) %{_libdir}/libTKXDESTEP.so.* | |
263 | ||
264 | %files visualization | |
265 | %defattr(644,root,root,755) | |
266 | # Visualization Dependents | |
267 | %attr(755,root,root) %{_libdir}/libTKService.so.* | |
268 | %attr(755,root,root) %{_libdir}/libTKV3d.so.* | |
269 | # Visualization | |
270 | %attr(755,root,root) %{_libdir}/libTKOpenGl.so.* | |
271 | %attr(755,root,root) %{_libdir}/libTKMeshVS.so.* | |
272 | %attr(755,root,root) %{_libdir}/libTKNIS.so.* | |
273 | %attr(755,root,root) %{_libdir}/libTKVoxel.so.* | |
274 | ||
275 | %files ocaf | |
276 | %defattr(644,root,root,755) | |
277 | # Application framework | |
278 | %attr(755,root,root) %{_libdir}/libTKCDF.so.* | |
279 | %attr(755,root,root) %{_libdir}/libPTKernel.so.* | |
280 | %attr(755,root,root) %{_libdir}/libTKLCAF.so.* | |
281 | %attr(755,root,root) %{_libdir}/libFWOSPlugin.so.* | |
282 | %attr(755,root,root) %{_libdir}/libTKPShape.so.* | |
283 | %attr(755,root,root) %{_libdir}/libTKBinL.so.* | |
284 | %attr(755,root,root) %{_libdir}/libTKXmlL.so.* | |
285 | %attr(755,root,root) %{_libdir}/libTKPLCAF.so.* | |
286 | %attr(755,root,root) %{_libdir}/libTKTObj.so.* | |
287 | %attr(755,root,root) %{_libdir}/libTKShapeSchema.so.* | |
288 | %attr(755,root,root) %{_libdir}/libTKStdLSchema.so.* | |
289 | %attr(755,root,root) %{_libdir}/libTKCAF.so.* | |
290 | %attr(755,root,root) %{_libdir}/libTKBin.so.* | |
291 | %attr(755,root,root) %{_libdir}/libTKXml.so.* | |
292 | %attr(755,root,root) %{_libdir}/libTKPCAF.so.* | |
293 | %attr(755,root,root) %{_libdir}/libTKBinTObj.so.* | |
294 | %attr(755,root,root) %{_libdir}/libTKXmlTObj.so.* | |
295 | %attr(755,root,root) %{_libdir}/libTKStdSchema.so.* | |
296 | ||
297 | %files draw | |
298 | %defattr(644,root,root,755) | |
299 | # Draw Libraries | |
300 | %dir %{_libdir}/oce-*.* | |
301 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKDraw.so.* | |
302 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKTopTest.so.* | |
303 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKViewerTest.so.* | |
304 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKXSDRAW.so.* | |
305 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKDCAF.so.* | |
306 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKXDEDRAW.so.* | |
307 | %attr(755,root,root) %{_libdir}/oce-*.*/libTKTObjDRAW.so.* | |
308 | # DRAWEXE application | |
309 | %attr(755,root,root) %{_bindir}/DRAWEXE | |
310 | %{_mandir}/man1/DRAWEXE.1* | |
311 | %{_desktopdir}/opencascade-draw.desktop | |
312 | %{_iconsdir}/hicolor/*/apps/* | |
313 | ||
314 | %files devel | |
315 | %defattr(644,root,root,755) | |
316 | %doc examples | |
317 | %{_includedir}/* | |
318 | %attr(755,root,root) %{_libdir}/*.so | |
319 | %attr(755,root,root) %{_libdir}/oce-*.*/*.so | |
320 | %{_libdir}/oce-*.*/*.cmake |