2 # All modifications and additions to the file contributed by third parties
3 # remain the property of their copyright owners, unless otherwise agreed
4 # upon. The license for this file, and modifications and additions to the
5 # file, is the same license as for the pristine package itself (unless the
6 # license for the pristine package is not an Open Source License, in which
7 # case the license is the MIT License). An "Open Source License" is a
8 # license that conforms to the Open Source Definition (Version 1.9)
9 # published by the Open Source Initiative.
11 %define _prefix /opt/OpenCASCADE
14 Summary: OpenCASCADE CAE platform
15 Group: Productivity/Other
16 # The 6.3.1 is a maintenance release, only available for OCC customers
19 License: LGPL-like, see http://www.opencascade.org/occ/license/
20 Packager: Andrea Florio <andrea@opensuse.org>
21 Source0: http://files.opencascade.com/OCC_6.3_release/%{name}_src.tgz
22 # Source0-md5: 52778127974cb3141c2827f9d40d1f11
24 Source2: OpenCASCADE-rpmlintrc
25 Patch0: OpenCASCADE6.3.0-obs-check.patch
26 Patch1: OpenCASCADE6.3.0-strcmp.patch
27 Patch2: OpenCASCADE6.3.0-occ6.3.0.patch
28 Patch3: OpenCASCADE6.3.0-casroot.patch
29 Patch4: OpenCASCADE6.3.0-lib-release.patch
30 Patch5: OpenCASCADE6.3.0-tkernel-ld.patch
31 Patch6: OpenCASCADE6.3.0-mft-disable-mmap.patch
32 Patch7: OpenCASCADE6.3.0-no-bitmaps-icon.patch
33 Patch8: OpenCASCADE6.3.0-DESTDIR.patch
34 Patch9: OpenCASCADE6.3.0-maint-mode.patch
35 Patch10: OpenCASCADE6.3.0-dep-libs.patch
36 Patch11: OpenCASCADE6.3.0-move-vrml-vis.patch
37 Patch12: OpenCASCADE6.3.0-make-wok-libs-private.patch
38 Patch13: OpenCASCADE6.3.0-make-draw-libs-private.patch
39 Patch14: OpenCASCADE6.3.0-wok-install.patch
40 Patch15: OpenCASCADE6.3.0-udlist.patch
41 Patch16: OpenCASCADE6.3.0-WOKUnix_FDescr.patch
42 URL: http://www.opencascade.org/
44 BuildRequires: Mesa-devel autoconf automake bison gcc-c++ xorg-x11-devel
45 BuildRequires: flex libtool tcl-devel tk-devel xorg-x11-libXmu-devel fdupes
49 BuildRequires: compat-32bit
51 BuildRequires: java-1_5_0-gcj-compat-devel
53 BuildRoot: %{_tmppath}/%{name}-%{version}-build
56 OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data
57 exchange and rapid application development. It is an excellent platform for
58 development of numerical simulation software including CAD/CAM/CAE, AEC and
59 GIS, as well as PDM applications.
62 Group: Development/Libraries/C and C++
63 Summary: Devel package for %{name}
64 Requires: %{name} = %{version}
67 OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data
68 exchange and rapid application development. It is an excellent platform for
69 development of numerical simulation software including CAD/CAM/CAE, AEC and
70 GIS, as well as PDM applications.
73 %setup -q -n %{name}%{version}
94 bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
95 flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
96 mv ExprIntrp.tab.h ../../inc/
97 cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/
100 export CFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
101 export CXXFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
103 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
104 export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
107 LDFLAGS=-lpthread %configure \
108 --with-gl-include=/usr/include \
109 --with-gl-library=/usr/%{_lib} \
110 --with-xmu-include=/usr/include/X11 \
111 --with-xmu-library=/usr/%{_lib} \
112 --with-tcl=/usr/%{_lib} \
113 --with-tk=/usr/%{_lib} \
116 --enable-production \
124 rm -rf $RPM_BUILD_ROOT
128 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.h'); do chmod -x $i; done`
129 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.hxx'); do chmod -x $i; done`
130 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.lxx'); do chmod -x $i; done`
131 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.gxx'); do chmod -x $i; done`
133 chmod -x %{buildroot}%{_prefix}/wok/lib/config.h
134 chmod -x %{buildroot}%{_libdir}/*.la
135 chmod -x %{buildroot}%{_libdir}/opencas/*.la
136 chmod -x %{buildroot}%{_prefix}/src/UnitsAPI/UnitsAPI.cxx
137 chmod -x %{buildroot}%{_prefix}/src/DrawResources/Filtre.c
138 chmod -x %{buildroot}%{_prefix}/src/DrawResources/TestDraw.cxx
139 chmod -x %{buildroot}%{_prefix}/src/DrawResources/DIFF.c
142 cp -a data %{buildroot}%{_prefix}/
143 cp -a doc %{buildroot}%{_prefix}/
144 cp -a samples %{buildroot}%{_prefix}/
145 find %{buildroot}%{_prefix}/data -type f -print0 |xargs -0 chmod a-x
146 find %{buildroot}%{_prefix}/doc -type f -print0 |xargs -0 chmod a-x
147 find %{buildroot}%{_prefix}/samples -type f -print0 |xargs -0 chmod a-x
150 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/Linux/lib
151 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/lin/lib
154 # add symlinks for compatibility resons
155 %__mkdir -p %{buildroot}/usr/share/opencascade/
156 %__mkdir -p %{buildroot}/usr/include/
157 %__mkdir -p %{buildroot}/usr/share/doc/packages/
158 %__mkdir -p %{buildroot}/usr/%{_lib}
160 %__ln_s %{_prefix} %{buildroot}/usr/share/opencascade/%{version}
161 %__ln_s %{_prefix}/inc %{buildroot}/usr/include/opencascade
162 %__ln_s %{_prefix}/doc %{buildroot}/usr/share/doc/packages/opencascade
163 `for i in $(ls %{buildroot}/%{_libdir}); do %__ln_s %{_libdir}/$i %{buildroot}/usr/%{_lib}/$i; done`
165 %__mkdir -p %buildroot/etc/ld.so.conf.d/
166 %__cp %SOURCE1 %buildroot/etc/ld.so.conf.d/
168 %post -p /sbin/ldconfig
169 %postun -p /sbin/ldconfig
172 rm -rf $RPM_BUILD_ROOT
175 %defattr(644,root,root,755)
179 %dir %{_prefix}/Linux
181 %dir %{_prefix}/wok/lib/
182 %dir %{_prefix}/wok/site/
186 %dir %{_libdir}/opencas/
187 %dir /usr/share/opencascade/
189 %{_bindir}/wokprocess
198 %{_prefix}/wok/site/*
200 %{_prefix}/env_DRAW.sh
202 %{_libdir}/opencas/*.so
204 /usr/share/opencascade/%{version}
205 /usr/share/doc/packages/opencascade
206 %config /etc/ld.so.conf.d/%name.conf
207 %dir %{_prefix}/src/UnitsAPI
209 %{_prefix}/src/UnitsAPI/*.dat
212 %defattr(644,root,root,755)
213 %dir /usr/include/opencascade/
215 %{_libdir}/opencas/*.la
220 %dir %{_prefix}/samples
222 %exclude %{_prefix}/src/UnitsAPI/*.dat