]>
Commit | Line | Data |
---|---|---|
ab499437 TP |
1 | # |
2 | # spec file for package OpenCASCADE | |
3 | # | |
4 | # All modifications and additions to the file contributed by third parties | |
5 | # remain the property of their copyright owners, unless otherwise agreed | |
6 | # upon. The license for this file, and modifications and additions to the | |
7 | # file, is the same license as for the pristine package itself (unless the | |
8 | # license for the pristine package is not an Open Source License, in which | |
9 | # case the license is the MIT License). An "Open Source License" is a | |
10 | # license that conforms to the Open Source Definition (Version 1.9) | |
11 | # published by the Open Source Initiative. | |
12 | ||
13 | # norootforbuild | |
14 | ||
15 | %define _prefix /opt/OpenCASCADE | |
16 | ||
17 | Name: OpenCASCADE | |
18 | Summary: OpenCASCADE CAE platform | |
19 | Url: http://www.opencascade.org/ | |
20 | Group: Productivity/Other | |
21 | Version: 6.3.0 | |
22 | Release: 40.3 | |
23 | License: LGPL-like, see http://www.opencascade.org/occ/license/ | |
24 | Packager: Andrea Florio <andrea@opensuse.org> | |
25 | Source0: %{name}%{version}.tar.bz2 | |
26 | Source1: %name.conf | |
27 | Source2: OpenCASCADE-rpmlintrc | |
28 | Patch0: OpenCASCADE6.3.0-obs-check.patch | |
29 | Patch1: OpenCASCADE6.3.0-strcmp.patch | |
30 | Patch2: OpenCASCADE6.3.0-occ6.3.0.patch | |
31 | Patch3: OpenCASCADE6.3.0-casroot.patch | |
32 | Patch4: OpenCASCADE6.3.0-lib-release.patch | |
33 | Patch5: OpenCASCADE6.3.0-tkernel-ld.patch | |
34 | Patch6: OpenCASCADE6.3.0-mft-disable-mmap.patch | |
35 | Patch7: OpenCASCADE6.3.0-no-bitmaps-icon.patch | |
36 | Patch8: OpenCASCADE6.3.0-DESTDIR.patch | |
37 | Patch9: OpenCASCADE6.3.0-maint-mode.patch | |
38 | Patch10: OpenCASCADE6.3.0-dep-libs.patch | |
39 | Patch11: OpenCASCADE6.3.0-move-vrml-vis.patch | |
40 | Patch12: OpenCASCADE6.3.0-make-wok-libs-private.patch | |
41 | Patch13: OpenCASCADE6.3.0-make-draw-libs-private.patch | |
42 | Patch14: OpenCASCADE6.3.0-wok-install.patch | |
43 | Patch15: OpenCASCADE6.3.0-udlist.patch | |
44 | Patch16: OpenCASCADE6.3.0-WOKUnix_FDescr.patch | |
45 | ||
46 | BuildRequires: Mesa-devel autoconf automake bison gcc-c++ xorg-x11-devel | |
47 | BuildRequires: flex libtool tcl-devel tk-devel xorg-x11-libXmu-devel fdupes | |
48 | %ifarch i586 | |
49 | BuildRequires: compat | |
50 | %else | |
51 | BuildRequires: compat-32bit | |
52 | %endif | |
53 | %if %suse_version >= 1100 | |
54 | BuildRequires: java-1_5_0-gcj-compat-devel | |
55 | %else | |
56 | BuildRequires: java-1_4_2-gcj-compat-devel | |
57 | %endif | |
58 | Requires: tcsh | |
59 | BuildRoot: %{_tmppath}/%{name}-%{version}-build | |
60 | ||
61 | %description | |
62 | OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data | |
63 | exchange and rapid application development. It is an excellent platform for | |
64 | development of numerical simulation software including CAD/CAM/CAE, AEC and | |
65 | GIS, as well as PDM applications. | |
66 | ||
67 | %package devel | |
68 | ||
69 | Group: Development/Libraries/C and C++ | |
70 | Summary: Devel package for %{name} | |
71 | Requires: %{name} = %{version} | |
72 | ||
73 | %description devel | |
74 | OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data | |
75 | exchange and rapid application development. It is an excellent platform for | |
76 | development of numerical simulation software including CAD/CAM/CAE, AEC and | |
77 | GIS, as well as PDM applications. | |
78 | ||
79 | %prep | |
80 | %setup -q -n %{name}%{version} | |
81 | # all patches must applied in that order or some of them could fail | |
82 | %patch0 -p1 | |
83 | %patch1 -p1 | |
84 | %patch2 -p1 | |
85 | %patch3 -p1 | |
86 | %patch4 -p1 | |
87 | %patch5 -p1 | |
88 | %patch6 -p1 | |
89 | %patch7 -p1 | |
90 | %patch8 -p1 | |
91 | %patch9 -p1 | |
92 | %patch10 -p1 | |
93 | %patch11 -p1 | |
94 | %patch12 -p1 | |
95 | %patch13 -p1 | |
96 | %patch14 -p1 | |
97 | %patch15 -p1 | |
98 | %patch16 -p1 | |
99 | ||
100 | %build | |
101 | cd ros/src/ExprIntrp | |
102 | bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc | |
103 | flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex | |
104 | mv ExprIntrp.tab.h ../../inc/ | |
105 | cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/ | |
106 | cd ../.. | |
107 | %ifarch x86_64 ppc64 | |
108 | export CFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing" | |
109 | export CXXFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing" | |
110 | %else | |
111 | export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" | |
112 | export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" | |
113 | %endif | |
114 | autoreconf -f -i | |
115 | LDFLAGS=-lpthread %configure \ | |
116 | --with-gl-include=/usr/include \ | |
117 | --with-gl-library=/usr/%{_lib} \ | |
118 | --with-xmu-include=/usr/include/X11 \ | |
119 | --with-xmu-library=/usr/%{_lib} \ | |
120 | --with-tcl=/usr/%{_lib} \ | |
121 | --with-tk=/usr/%{_lib} \ | |
122 | --disable-static \ | |
123 | --disable-debug \ | |
124 | --enable-production \ | |
125 | --enable-wok \ | |
126 | --enable-wrappers \ | |
127 | --enable-draw | |
128 | ||
129 | %__make %{?jobs:-j%{jobs}} | |
130 | ||
131 | %install | |
132 | cd ros | |
133 | %makeinstall | |
134 | ||
135 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.h'); do chmod -x $i; done` | |
136 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.hxx'); do chmod -x $i; done` | |
137 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.lxx'); do chmod -x $i; done` | |
138 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.gxx'); do chmod -x $i; done` | |
139 | ||
140 | chmod -x %{buildroot}%{_prefix}/wok/lib/config.h | |
141 | chmod -x %{buildroot}%{_libdir}/*.la | |
142 | chmod -x %{buildroot}%{_libdir}/opencas/*.la | |
143 | chmod -x %{buildroot}%{_prefix}/src/UnitsAPI/UnitsAPI.cxx | |
144 | chmod -x %{buildroot}%{_prefix}/src/DrawResources/Filtre.c | |
145 | chmod -x %{buildroot}%{_prefix}/src/DrawResources/TestDraw.cxx | |
146 | chmod -x %{buildroot}%{_prefix}/src/DrawResources/DIFF.c | |
147 | ||
148 | cd .. | |
149 | mv data %{buildroot}%{_prefix}/ | |
150 | mv doc %{buildroot}%{_prefix}/ | |
151 | mv samples %{buildroot}%{_prefix}/ | |
152 | find %{buildroot}%{_prefix}/data -type f -print0 |xargs -0 chmod a-x | |
153 | find %{buildroot}%{_prefix}/doc -type f -print0 |xargs -0 chmod a-x | |
154 | find %{buildroot}%{_prefix}/samples -type f -print0 |xargs -0 chmod a-x | |
155 | ||
156 | %ifarch x86_64 | |
157 | %__ln_s %{_libdir} %{buildroot}/%{_prefix}/Linux/lib | |
158 | %__ln_s %{_libdir} %{buildroot}/%{_prefix}/lin/lib | |
159 | %endif | |
160 | ||
161 | # add synlinks for compatibility resons | |
162 | %__mkdir -p %{buildroot}/usr/share/opencascade/ | |
163 | %__mkdir -p %{buildroot}/usr/include/ | |
164 | %__mkdir -p %{buildroot}/usr/share/doc/packages/ | |
165 | %__mkdir -p %{buildroot}/usr/%{_lib} | |
166 | ||
167 | %__ln_s %{_prefix} %{buildroot}/usr/share/opencascade/%{version} | |
168 | %__ln_s %{_prefix}/inc %{buildroot}/usr/include/opencascade | |
169 | %__ln_s %{_prefix}/doc %{buildroot}/usr/share/doc/packages/opencascade | |
170 | `for i in $(ls %{buildroot}/%{_libdir}); do %__ln_s %{_libdir}/$i %{buildroot}/usr/%{_lib}/$i; done` | |
171 | ||
172 | %__mkdir -p %buildroot/etc/ld.so.conf.d/ | |
173 | %__cp %SOURCE1 %buildroot/etc/ld.so.conf.d/ | |
174 | ||
175 | %fdupes -s %{buildroot} | |
176 | ||
177 | ||
178 | %post -p /sbin/ldconfig | |
179 | ||
180 | %postun -p /sbin/ldconfig | |
181 | ||
182 | %clean | |
183 | rm -rf %buildroot | |
184 | ||
185 | %files | |
186 | %defattr(-,root,root) | |
187 | %dir %{_prefix} | |
188 | %dir %{_bindir} | |
189 | %dir %{_prefix}/lin | |
190 | %dir %{_prefix}/Linux | |
191 | %dir %{_prefix}/wok | |
192 | %dir %{_prefix}/wok/lib/ | |
193 | %dir %{_prefix}/wok/site/ | |
194 | %dir %{_prefix}/data | |
195 | %dir %{_prefix}/doc | |
196 | %dir %{_libdir}/ | |
197 | %dir %{_libdir}/opencas/ | |
198 | %dir /usr/share/opencascade/ | |
199 | %{_bindir}/DRAWEXE | |
200 | %{_bindir}/wokprocess | |
201 | %{_bindir}/woksh | |
202 | %{_prefix}/lin/bin | |
203 | %{_prefix}/lin/lib | |
204 | %{_prefix}/Linux/bin | |
205 | %{_prefix}/Linux/lib | |
206 | %{_prefix}/data/* | |
207 | %{_prefix}/doc/* | |
208 | %{_prefix}/wok/lib/* | |
209 | %{_prefix}/wok/site/* | |
210 | %{_prefix}/config.h | |
211 | %{_prefix}/env_DRAW.sh | |
212 | %{_libdir}/*.so | |
213 | %{_libdir}/opencas/*.so | |
214 | /usr/%_lib/* | |
215 | /usr/share/opencascade/%{version} | |
216 | /usr/share/doc/packages/opencascade | |
217 | %config /etc/ld.so.conf.d/%name.conf | |
218 | %dir %{_prefix}/src/UnitsAPI | |
219 | %dir %{_prefix}/src | |
220 | %{_prefix}/src/UnitsAPI/*.dat | |
221 | ||
222 | %files devel | |
223 | %defattr(-,root,root) | |
224 | %dir /usr/include/opencascade/ | |
225 | %{_libdir}/*.la | |
226 | %{_libdir}/opencas/*.la | |
227 | %dir %{_prefix}/src/ | |
228 | %{_prefix}/src/* | |
229 | %dir %{_prefix}/inc/ | |
230 | %{_prefix}/inc/* | |
231 | %dir %{_prefix}/samples | |
232 | %{_prefix}/samples/* | |
233 | %exclude %{_prefix}/src/UnitsAPI/*.dat | |
234 | ||
235 | %changelog | |
236 | * Fri Dec 4 2009 andrea@opensuse.org | |
237 | - enabled wrappers | |
238 | * Sat May 2 2009 andrea@opensuse.org | |
239 | - added some symlink to provide compatibility with soma packages | |
240 | * Tue Feb 10 2009 andrea@opensuse.org | |
241 | - moved *.dat to main package, not sources and some packages need them | |
242 | * Wed Oct 29 2008 lars@linux-schulserver.de | |
243 | - ignore post-build-checks until /opt is allowed again | |
244 | * Sat Sep 27 2008 Andrea Florio <andrea@opensuse.org> 6.3.0 | |
245 | - new package |