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