-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSFEbullet.spec
76 lines (64 loc) · 2.15 KB
/
SFEbullet.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# spec file for package SFEbullet.spec
#
# includes module(s): bullet
#
%include Solaris.inc
%define src_name bullet
%define src_url http://bullet.googlecode.com/files
Name: SFEbullet
Summary: Bullet Physics Library
Version: 2.76
URL: http://code.google.com/p/bullet/
Source: %{src_url}/%{src_name}-%{version}.tgz
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}b-build
%include default-depend.inc
BuildRequires: SFEjam
BuildRequires: SFEfreeglut-devel
Requires: SFEfreeglut
BuildRequires: SUNWcmake
%prep
%setup -q -n %{src_name}-%{version}
#find . -type f -exec dos2unix {} {} \;
%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
export CPPFLAGS="-I/usr/X11/include"
#export CC=/usr/sfw/bin/gcc
#export CXX=/usr/sfw/bin/g++
export CC=/usr/gcc/4.3/bin/gcc
export CXX=/usr/gcc/4.3/bin/g++
export CFLAGS="-O2 -fno-omit-frame-pointer -I%{_prefix}/X11/include "
export CXXFLAGS="-O2 -fno-omit-frame-pointer -I%{_prefix}/X11/include "
export LDFLAGS="-R%{_libdir} -L%{_libdir} -lX11 "
mkdir -p BUILD
cd BUILD
cmake -DCMAKE_LIBRARY_PATH="/opt/SFE/lib:/usr/lib" -DCMAKE_INCLUDE_PATH="/opt/SFE/include:/usr/include" -DHAVE_GCC_VISIBILITY:INTERNAL=0 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DHAVE_VISIBILITY_SWITCH:INTERNAL=0 -DGLUT_INCLUDE_DIR="%{_prefix}/X11/include" -DGLUT_LIBRARIES="-L%{_libdir} -R%{_libdir} -lglut" -DGLUT_glut_LIBRARY="/opt/SFE/lib/libglut.so" -DBUILD_EXTRAS="off" -DBUILD_DEMOS=off -DBUILD_BULLET_MAYA_DYNAMICA_PLUGIN=off -DINSTALL_LIBS="on" .. -G "Unix Makefiles"
make VERBOSE=1
%install
rm -rf $RPM_BUILD_ROOT
cd BUILD
mkdir -p $RPM_BUILD_ROOT/%{_prefix}
make install
mv ./sfw_stage/* $RPM_BUILD_ROOT/%{_prefix}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, bin)
%{_includedir}
%{_libdir}/lib*.a
%changelog
* May 2010 - Gilles DAuphin
- bump release
* Mar 2010 - Gilles Dauphin
- shared is the default
- jam is in _bindir
* Jul 2009 - Gilles Dauphin
- version is b
* April 2008 - Gilles Dauphin
- adjust name for IPS
* Sun May 6 2007 - [email protected]
- Initial version