Hide
Easily highlight source code for your blog with our Syntax Highlighter. Join Siafoo Now or Learn More

Fedora compatible OpenCASCADE rpm spec file Atom Feed 0

In Brief This is a modified (read hacked) version of the OpenSUSE rpm SPEC file used to build the rpms for the OpenCASCADE library.... more
# 's
  1# norootforbuild
2
3%define _prefix /opt/OpenCASCADE
4
5Name: OpenCASCADE
6URL: http://www.opencascade.org/
7Version: 6.3.0
8Release: 56.1
9License: LGPL-like, see http://www.opencascade.org/occ/license/
10Summary: OpenCASCADE CAE platform
11Source: %{name}%{version}.tar.bz2
12Patch0: OpenCASCADE6.3.0-obs-check.patch
13Patch1: OpenCASCADE6.3.0-strcmp.patch
14Patch2: OpenCASCADE6.3.0-occ6.3.0.patch
15Patch3: OpenCASCADE6.3.0-casroot.patch
16Patch4: OpenCASCADE6.3.0-lib-release.patch
17Patch5: OpenCASCADE6.3.0-tkernel-ld.patch
18Patch6: OpenCASCADE6.3.0-mft-disable-mmap.patch
19Patch7: OpenCASCADE6.3.0-no-bitmaps-icon.patch
20Patch8: OpenCASCADE6.3.0-DESTDIR.patch
21Patch9: OpenCASCADE6.3.0-maint-mode.patch
22Patch10: OpenCASCADE6.3.0-dep-libs.patch
23Patch11: OpenCASCADE6.3.0-move-vrml-vis.patch
24Patch12: OpenCASCADE6.3.0-make-wok-libs-private.patch
25Patch13: OpenCASCADE6.3.0-make-draw-libs-private.patch
26Patch14: OpenCASCADE6.3.0-wok-install.patch
27Patch15: OpenCASCADE6.3.0-udlist.patch
28Patch16: OpenCASCADE6.3.0-WOKUnix_FDescr.patch
29Packager: Andrea Florio <andrea@opensuse.org>
30Group: Productivity/Other
31BuildRoot: %{_tmppath}/%{name}-%{version}-build
32BuildRequires: gcc-c++ autoconf automake bison mesa-libGL-devel
33#BuildRequires: gcc-c++ autoconf automake Mesa-devel bison
34BuildRequires: libtool libXmu-devel tcl-devel tk-devel bison flex
35
36%description
37OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data
38exchange and rapid application development. It is an excellent platform for
39development of numerical simulation software including CAD/CAM/CAE, AEC and
40GIS, as well as PDM applications.
41
42%package devel
43Group: Development/Libraries/C and C++
44Summary: Devel package for %{name}
45Requires: %{name} = %{version}
46
47%description devel
48OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data
49exchange and rapid application development. It is an excellent platform for
50development of numerical simulation software including CAD/CAM/CAE, AEC and
51GIS, as well as PDM applications.
52
53%prep
54%setup -q -n %{name}%{version}
55# all patches must applied in that order or some of them could fail
56%patch0 -p1
57%patch1 -p1
58%patch2 -p1
59%patch3 -p1
60%patch4 -p1
61%patch5 -p1
62%patch6 -p1
63%patch7 -p1
64%patch8 -p1
65%patch9 -p1
66%patch10 -p1
67%patch11 -p1
68%patch12 -p1
69%patch13 -p1
70%patch14 -p1
71%patch15 -p1
72%patch16 -p1
73
74%build
75cd ros/src/ExprIntrp
76bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
77flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
78mv ExprIntrp.tab.h ../../inc/
79cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/
80cd ../..
81%ifarch x86_64 ppc64
82export CFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
83export CXXFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
84%else
85export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
86export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
87%endif
88autoreconf -f -i
89LDFLAGS=-lpthread %configure \
90 --with-gl-include=/usr/include \
91 --with-gl-library=/usr/%{_lib} \
92 --with-xmu-include=/usr/include/X11 \
93 --with-xmu-library=/usr/%{_lib} \
94 --with-tcl=/usr/%{_lib} \
95 --with-tk=/usr/%{_lib} \
96 --disable-static \
97 --disable-debug \
98 --enable-production \
99 --enable-wok \
100 --enable-draw
101
102%__make %{?jobs:-j%{jobs}}
103
104%install
105cd ros
106%makeinstall
107
108`for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.h'); do chmod -x $i; done`
109`for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.hxx'); do chmod -x $i; done`
110`for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.lxx'); do chmod -x $i; done`
111`for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.gxx'); do chmod -x $i; done`
112
113chmod -x %{buildroot}%{_prefix}/wok/lib/config.h
114chmod -x %{buildroot}%{_libdir}/*.la
115chmod -x %{buildroot}%{_libdir}/opencas/*.la
116
117chmod -x %{buildroot}%{_prefix}/src/UnitsAPI/UnitsAPI.cxx
118chmod -x %{buildroot}%{_prefix}/src/DrawResources/Filtre.c
119chmod -x %{buildroot}%{_prefix}/src/DrawResources/TestDraw.cxx
120chmod -x %{buildroot}%{_prefix}/src/DrawResources/DIFF.c
121
122%__mkdir -p %{buildroot}/usr/share/opencascade/
123%__ln_s %{_prefix} %{buildroot}/usr/share/opencascade/6.3.0
124
125%post -p /sbin/ldconfig
126
127%postun -p /sbin/ldconfig
128
129%clean
130rm -rf %buildroot
131
132%files
133%defattr(-,root,root)
134%dir %{_prefix}
135%dir %{_bindir}
136%dir %{_prefix}/lin
137%dir %{_prefix}/Linux
138%dir %{_prefix}/wok
139%dir %{_prefix}/wok/lib/
140%dir %{_prefix}/wok/site/
141%dir %{_libdir}/
142%dir %{_libdir}/opencas/
143%dir /usr/share/opencascade/
144%{_bindir}/DRAWEXE
145%{_bindir}/wokprocess
146%{_bindir}/woksh
147%{_prefix}/lin/*
148%{_prefix}/Linux/*
149%{_prefix}/wok/lib/*
150%{_prefix}/wok/site/*
151%{_prefix}/config.h
152%{_prefix}/env_DRAW.sh
153%{_libdir}/*.so
154%{_libdir}/opencas/*.so
155/usr/share/opencascade/6.3.0
156#%{_libdir}/*.so.*
157#%{_libdir}/opencas/*.so.*
158
159%files devel
160%defattr(-,root,root)
161%{_libdir}/*.la
162%{_libdir}/opencas/*.la
163%dir %{_prefix}/src/
164%{_prefix}/src/*
165%dir %{_prefix}/inc/
166%{_prefix}/inc/*
167
168%changelog
169* Sun Oct 12 2008 - Stou hacked spec file to get it working with Fedora (it will no longer work with suse)
170* Sun Sep 28 2008 - Andrea Florio <andrea@opensuse.org> 6.3.0
171- new package

This is a modified (read hacked) version of the OpenSUSE rpm SPEC file used to build the rpms for the OpenCASCADE library.

How to use:

  1. Get the OpenCASCADE-6.3.0 Source RPM
  2. Install it:
rpm -i OpenCASCADE-6.3.0-56.1.src.rpm
  1. Go to /usr/src/redhat/SPECS and replace the OpenCascade.spec file with this file
  2. Build the RPMs with rpmbuild -bb OpenCascade.spec. This should create three separate RPMs: OpenCascade-6.3.0-??.rpm, OpenCascade-devel, and OpenCascade-debug
  3. Go to /usr/src/redhat/RPMS/x86_64 and install the rpms with something like this:
yum --nogpgcheck install OpenCASCADE-6.3.0-56.1.x86_64.rpm OpenCASCADE-devel-6.3.0-56.1.x86_64.rpm

Note that this has only been slightly tested... on Fedora 9, under x86_64.

You may or may not need to install some more mesa-*-devel packages, I am not really sure what in Fedora corresponds to Mesa-devel in SUSE. It seems to be mesa-libGL-devel but...