]> git.pld-linux.org Git - packages/OpenCASCADE.git/blob - OpenCASCADE.spec
8f8c999477dc34301485d0d0e1831720ed5f063b
[packages/OpenCASCADE.git] / OpenCASCADE.spec
1 #
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.
10
11 %define _prefix /opt/OpenCASCADE
12
13 Summary:        OpenCASCADE CAE platform
14 Name:           OpenCASCADE
15 Group:           Productivity/Other
16 # The 6.3.1 is a maintenance release, only available for OCC customers
17 Version:        6.3.0
18 Release:         40.3
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
23 Source1:         %name.conf
24 Source2:         OpenCASCADE-rpmlintrc
25 Patch0:         %{name}6.3.0-obs-check.patch
26 Patch1:         %{name}6.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/
43
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
46 %ifarch i586
47 BuildRequires:   compat
48 %else
49 BuildRequires:   compat-32bit
50 %endif
51 BuildRequires:   java-1_5_0-gcj-compat-devel
52 Requires:        tcsh
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
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.
60
61 %package devel
62 Group:          Development/Libraries/C and C++
63 Summary:        Devel package for %{name}
64 Requires:       %{name} = %{version}
65
66 %description devel
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.
71
72 %prep
73 %setup -q -n %{name}%{version}
74 %patch0 -p1
75 %patch1 -p1
76 %patch2 -p1
77 %patch3 -p1
78 %patch4 -p1
79 %patch5 -p1
80 %patch6 -p1
81 %patch7 -p1
82 %patch8 -p1
83 %patch9 -p1
84 %patch10 -p1
85 %patch11 -p1
86 %patch12 -p1
87 %patch13 -p1
88 %patch14 -p1
89 %patch15 -p1
90 %patch16 -p1
91
92 %build
93 cd ros
94 %{__libtoolize}
95 %{__aclocal} -I m4
96 %{__autoconf}
97 %{__autoheader}
98 %{__automake}
99
100 cd ros/src/ExprIntrp
101 bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
102 flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
103 mv ExprIntrp.tab.h ../../inc/
104 cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/
105 cd ../..
106 %ifarch x86_64 ppc64
107 export CFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
108 export CXXFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
109 %else
110 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
111 export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
112 %endif
113 LDFLAGS=-lpthread %configure \
114    --with-gl-include=/usr/include \
115    --with-gl-library=/usr/%{_lib} \
116    --with-xmu-include=/usr/include/X11 \
117    --with-xmu-library=/usr/%{_lib} \
118    --with-tcl=/usr/%{_lib} \
119    --with-tk=/usr/%{_lib} \
120    --disable-static \
121    --disable-debug \
122    --enable-production \
123    --enable-wok \
124    --enable-wrappers \
125    --enable-draw
126
127 %{__make}
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131 cd ros
132 %makeinstall
133
134 cd ..
135 cp -a data %{buildroot}%{_prefix}/
136 cp -a doc %{buildroot}%{_prefix}/
137 cp -a samples %{buildroot}%{_prefix}/
138
139 %ifarch x86_64
140 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/Linux/lib
141 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/lin/lib
142 %endif
143
144 # add symlinks for compatibility resons
145 %__mkdir -p %{buildroot}/usr/share/opencascade/
146 %__mkdir -p %{buildroot}/usr/include/
147 %__mkdir -p %{buildroot}/usr/share/doc/packages/
148 %__mkdir -p %{buildroot}/usr/%{_lib}
149
150 %__ln_s %{_prefix} %{buildroot}/usr/share/opencascade/%{version}
151 %__ln_s %{_prefix}/inc  %{buildroot}/usr/include/opencascade
152 %__ln_s %{_prefix}/doc  %{buildroot}/usr/share/doc/packages/opencascade
153 `for i in $(ls  %{buildroot}/%{_libdir}); do %__ln_s %{_libdir}/$i %{buildroot}/usr/%{_lib}/$i; done`
154
155 %__mkdir -p %buildroot/etc/ld.so.conf.d/
156 %__cp %SOURCE1 %buildroot/etc/ld.so.conf.d/
157
158 %post   -p /sbin/ldconfig
159 %postun -p /sbin/ldconfig
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %files
165 %defattr(644,root,root,755)
166 %dir %{_prefix}
167 %dir %{_bindir}
168 %dir %{_prefix}/lin
169 %dir %{_prefix}/Linux
170 %dir %{_prefix}/wok
171 %dir %{_prefix}/wok/lib/
172 %dir %{_prefix}/wok/site/
173 %dir %{_prefix}/data
174 %dir %{_prefix}/doc
175 %dir %{_libdir}/
176 %dir %{_libdir}/opencas/
177 %dir /usr/share/opencascade/
178 %{_bindir}/DRAWEXE
179 %{_bindir}/wokprocess
180 %{_bindir}/woksh
181 %{_prefix}/lin/bin
182 %{_prefix}/lin/lib
183 %{_prefix}/Linux/bin
184 %{_prefix}/Linux/lib
185 %{_prefix}/data/*
186 %{_prefix}/doc/*
187 %{_prefix}/wok/lib/*
188 %{_prefix}/wok/site/*
189 %{_prefix}/config.h
190 %{_prefix}/env_DRAW.sh
191 %{_libdir}/*.so
192 %{_libdir}/opencas/*.so
193 /usr/%_lib/*
194 /usr/share/opencascade/%{version}
195 /usr/share/doc/packages/opencascade
196 %config /etc/ld.so.conf.d/%name.conf
197 %dir %{_prefix}/src/UnitsAPI
198 %dir %{_prefix}/src
199 %{_prefix}/src/UnitsAPI/*.dat
200
201 %files devel
202 %defattr(644,root,root,755)
203 %dir /usr/include/opencascade/
204 %{_libdir}/*.la
205 %{_libdir}/opencas/*.la
206 %dir %{_prefix}/src/
207 %{_prefix}/src/*
208 %dir %{_prefix}/inc/
209 %{_prefix}/inc/*
210 %dir %{_prefix}/samples
211 %{_prefix}/samples/*
212 %exclude %{_prefix}/src/UnitsAPI/*.dat
This page took 0.04133 seconds and 3 git commands to generate.