]> git.pld-linux.org Git - packages/OpenCASCADE.git/blob - OpenCASCADE.spec
- no java before pentium, so no wrappers for i486
[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 # TODO: separate libs-x (80% of libraries)
12
13 Summary:        OpenCASCADE CAE platform
14 Name:           OpenCASCADE
15 # The 6.3.1 is a maintenance release, only available for OCC customers
16 Version:        6.3.0
17 Release:         40.3
18 License:        LGPL-like, see http://www.opencascade.org/occ/license/
19 Group:          Applications/Engineering
20 Source0:        http://files.opencascade.com/OCC_6.3_release/%{name}_src.tgz
21 # Source0-md5:  52778127974cb3141c2827f9d40d1f11
22 Patch0:         %{name}6.3.0-obs-check.patch
23 Patch1:         %{name}6.3.0-strcmp.patch
24 Patch2:          OpenCASCADE6.3.0-occ6.3.0.patch
25 Patch3:         %{name}6.3.0-casroot.patch
26 Patch5:          OpenCASCADE6.3.0-tkernel-ld.patch
27 Patch6:          OpenCASCADE6.3.0-mft-disable-mmap.patch
28 Patch7:          OpenCASCADE6.3.0-no-bitmaps-icon.patch
29 Patch8:         %{name}6.3.0-DESTDIR.patch
30 Patch9:          OpenCASCADE6.3.0-maint-mode.patch
31 Patch10:         OpenCASCADE6.3.0-dep-libs.patch
32 Patch11:         OpenCASCADE6.3.0-move-vrml-vis.patch
33 Patch12:        %{name}6.3.0-make-wok-libs-private.patch
34 Patch13:        %{name}6.3.0-make-draw-libs-private.patch
35 Patch14:         OpenCASCADE6.3.0-wok-install.patch
36 Patch15:         OpenCASCADE6.3.0-udlist.patch
37 Patch16:         OpenCASCADE6.3.0-WOKUnix_FDescr.patch
38 URL:            http://www.opencascade.org/
39 BuildRequires:  autoconf
40 BuildRequires:  automake
41 BuildRequires:  bison
42 BuildRequires:  flex
43 %ifnarch i486
44 BuildRequires:  java-sun-jdk-base
45 %endif
46 BuildRequires:  libstdc++-devel
47 BuildRequires:  libtool
48 BuildRequires:  Mesa-libGLU-devel
49 BuildRequires:  tk-devel
50 BuildRequires:  xorg-lib-libX11-devel
51 BuildRequires:  xorg-lib-libXmu-devel
52 BuildRequires:  xorg-proto-xproto-devel
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 libs
62 Summary:        OpenCASCADE shared libraries
63 Group:          Libraries
64
65 %description libs
66 OpenCASCADE shared libraries.
67
68 %package devel
69 Summary:        OpenCASCADE development files
70 Group:          Development/Libraries
71 Requires:       %{name}-libs = %{version}-%{release}
72
73 %description devel
74 OpenCASCADE development files.
75
76 %package doc
77 Summary:        OpenCASCADE documentation
78 Group:          Documentation
79
80 %description doc
81 OpenCASCADE help and html documentation.
82
83 %package samples
84 Summary:        OpenCASCADE samples
85 Group:          Documentation
86
87 %description samples
88 OpenCASCADE samples.
89
90 %prep
91 %setup -q -n %{name}%{version}
92 %patch0 -p1
93 %patch1 -p1
94 %patch2 -p1
95 %patch3 -p1
96 %patch5 -p1
97 %patch6 -p1
98 %patch7 -p1
99 %patch8 -p1
100 %patch9 -p1
101 %patch10 -p1
102 %patch11 -p1
103 %patch12 -p1
104 %patch13 -p1
105 %patch14 -p1
106 %patch15 -p1
107 %patch16 -p1
108 cd ros/src/ExprIntrp
109 bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
110 flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
111 mv ExprIntrp.tab.h ../../inc/
112 cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/
113
114 %build
115 cd ros
116 %{__libtoolize}
117 %{__aclocal}
118 %{__autoconf}
119 %{__autoheader}
120 %{__automake}
121
122 %ifarch x86_64 ppc64
123 export CFLAGS="%{rpmcflags} -D_OCC64 -fno-strict-aliasing"
124 export CXXFLAGS="%{rpmcflags} -D_OCC64 -fno-strict-aliasing"
125 %else
126 export CFLAGS="%{rpmcflags} -fno-strict-aliasing"
127 export CXXFLAGS="%{rpmcflags} -fno-strict-aliasing"
128 %endif
129 LDFLAGS=-lpthread %configure \
130         %{?debug:--disable-production  --enable-debug} \
131         %{!?debug:--enable-production --disable-debug} \
132         --with-java-include="%{java_home}"/include
133
134 %{__make}
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_includedir}}
139
140 cd ros
141 %{__make} install \
142         DESTDIR=$RPM_BUILD_ROOT
143 cd ..
144
145 cp -a data $RPM_BUILD_ROOT%{_datadir}/%{name}
146 mv $RPM_BUILD_ROOT{%{_prefix}/{src,wok,config.h,env_DRAW.sh},%{_datadir}/%{name}}
147 mv $RPM_BUILD_ROOT{%{_prefix}/inc,%{_includedir}/%{name}}
148 rm -r $RPM_BUILD_ROOT%{_prefix}/{Linux,lin}
149
150 mkdir -p $RPM_BUILD_ROOT/usr/src
151 for i in doc samples; do
152 mkdir -p $i-i
153 [ -d $i ] && mv $i $i-i/%{name}-%{version} || :
154 done
155 ln -s %{_builddir}/%{name}%{version}/doc-i   $RPM_BUILD_ROOT%{_defaultdocdir}
156 ln -s %{_builddir}/%{name}%{version}/samples-i $RPM_BUILD_ROOT%{_examplesdir}
157
158 %post   libs -p /sbin/ldconfig
159 %postun libs -p /sbin/ldconfig
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %files
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_bindir}/DRAWEXE
167 %attr(755,root,root) %{_bindir}/wok*
168 %dir %{_datadir}/%{name}
169 %{_datadir}/%{name}/config.h
170 %{_datadir}/%{name}/data
171 %attr(755,root,root) %{_datadir}/%{name}/env_DRAW.sh
172 %dir %{_datadir}/%{name}/src
173 %dir %{_datadir}/%{name}/src/UnitsAPI
174 %{_datadir}/%{name}/src/UnitsAPI/*.dat
175 %{_datadir}/%{name}/wok
176 %dir %{_libdir}/opencas
177 %attr(755,root,root) %{_libdir}/opencas/*.so.*.*.*
178 %attr(755,root,root) %ghost %{_libdir}/opencas/*.so.0
179
180 %files libs
181 %defattr(644,root,root,755)
182 %doc LICENSE ros/README.txt
183 %attr(755,root,root) %{_libdir}/*.so.*.*.*
184 %attr(755,root,root) %ghost %{_libdir}/*.so.0
185
186 %files devel
187 %defattr(644,root,root,755)
188 %{_includedir}/%{name}
189 %{_libdir}/opencas/*.la
190 %{_libdir}/*.la
191 %attr(755,root,root) %{_libdir}/opencas/*.so
192 %attr(755,root,root) %{_libdir}/*.so
193 %{_datadir}/%{name}/src/*
194 %exclude %{_datadir}/%{name}/src/UnitsAPI/*.dat
195
196 %files doc
197 %defattr(644,root,root,755)
198 %{_docdir}/%{name}-%{version}
199
200 %files samples
201 %defattr(644,root,root,755)
202 %{_examplesdir}/%{name}-%{version}
This page took 0.106633 seconds and 4 git commands to generate.