]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with opencl_amd # AMD OpenCL | |
4 | %bcond_with opencl_intel # Intel OpenCL (64-bit) | |
5 | %bcond_with opencl_nvidia # NVidia OpenCL | |
6 | # | |
7 | Summary: Bullet - collision detection and rigid body dynamics library | |
8 | Summary(pl.UTF-8): Bullet - biblioteka wykrywania kolizji oraz dynamiki ciała sztywnego | |
9 | Name: bullet | |
10 | Version: 2.82 | |
11 | Release: 2 | |
12 | License: Zlib (BSD-like) | |
13 | Group: Libraries | |
14 | #Source0Download: https://code.google.com/p/bullet/downloads/list | |
15 | Source0: http://bullet.googlecode.com/files/%{name}-%{version}-r2704.tgz | |
16 | # Source0-md5: 70b3c8d202dee91a0854b4cbc88173e8 | |
17 | Patch0: %{name}-link.patch | |
18 | URL: http://bulletphysics.org/wordpress/ | |
19 | BuildRequires: OpenCL-devel | |
20 | BuildRequires: OpenGL-GLU-devel | |
21 | BuildRequires: OpenGL-glut-devel | |
22 | BuildRequires: cmake >= 2.4.3 | |
23 | BuildRequires: libstdc++-devel | |
24 | BuildRequires: rpmbuild(macros) >= 1.600 | |
25 | BuildRequires: unzip | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | Bullet is a collision detection and rigid nody dynamics library. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Bullet to biblioteka wykrywania kolizji oraz dynamiki ciała sztywnego. | |
33 | ||
34 | %package devel | |
35 | Summary: Header files for bullet libraries | |
36 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek bullet | |
37 | Group: Development/Libraries | |
38 | Requires: %{name} = %{version}-%{release} | |
39 | Requires: OpenCL-devel | |
40 | Requires: OpenGL-GLU-devel | |
41 | Requires: OpenGL-glut-devel | |
42 | ||
43 | %description devel | |
44 | Header files for bullet libraries. | |
45 | ||
46 | %description devel -l pl.UTF-8 | |
47 | Pliki nagłówkowe bibliotek bullet. | |
48 | ||
49 | %prep | |
50 | %setup -q -n %{name}-%{version}-r2704 | |
51 | %patch0 -p1 | |
52 | ||
53 | %build | |
54 | install -d pkgbuild | |
55 | cd pkgbuild | |
56 | %cmake .. \ | |
57 | %{!?with_opencl_amd:-DAMD_OPENCL_BASE_DIR:BOOL=OFF} \ | |
58 | %{!?with_opencl_intel:-DINTEL_OPENCL_ICD_CFG:BOOL=OFF} \ | |
59 | %{!?with_opencl_nvidia:-DNVIDIA_OPENCL_ICD_CFG:BOOL=OFF} \ | |
60 | -DBUILD_DEMOS=OFF \ | |
61 | -DBUILD_EXTRAS=ON \ | |
62 | -DBUILD_MULTITHREADING=ON \ | |
63 | -DINCLUDE_INSTALL_DIR=%{_includedir}/%{name} \ | |
64 | ||
65 | %{__make} | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %{__make} -C pkgbuild install \ | |
71 | DESTDIR=$RPM_BUILD_ROOT | |
72 | ||
73 | %clean | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %post -p /sbin/ldconfig | |
77 | %postun -p /sbin/ldconfig | |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
81 | %doc AUTHORS COPYING ChangeLog NEWS README | |
82 | %attr(755,root,root) %{_libdir}/libBulletCollision.so.*.* | |
83 | %attr(755,root,root) %{_libdir}/libBulletDynamics.so.*.* | |
84 | %attr(755,root,root) %{_libdir}/libBulletMultiThreaded.so.*.* | |
85 | %attr(755,root,root) %{_libdir}/libBulletSoftBody.so.*.* | |
86 | %attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Mini.so.*.* | |
87 | %{?with_opencl_amd:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_AMD.so.*.*} | |
88 | %{?with_opencl_intel:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Intel.so.*.*} | |
89 | %{?with_opencl_nvidia:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_NVidia.so.*.*} | |
90 | %attr(755,root,root) %{_libdir}/libLinearMath.so.*.* | |
91 | %attr(755,root,root) %{_libdir}/libMiniCL.so.*.* | |
92 | ||
93 | %files devel | |
94 | %defattr(644,root,root,755) | |
95 | %doc Bullet_User_Manual.pdf | |
96 | %attr(755,root,root) %{_libdir}/libBulletCollision.so | |
97 | %attr(755,root,root) %{_libdir}/libBulletDynamics.so | |
98 | %attr(755,root,root) %{_libdir}/libBulletMultiThreaded.so | |
99 | %attr(755,root,root) %{_libdir}/libBulletSoftBody.so | |
100 | %attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Mini.so | |
101 | %{?with_opencl_amd:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_AMD.so} | |
102 | %{?with_opencl_intel:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Intel.so} | |
103 | %{?with_opencl_nvidia:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_NVidia.so} | |
104 | %attr(755,root,root) %{_libdir}/libLinearMath.so | |
105 | %attr(755,root,root) %{_libdir}/libMiniCL.so | |
106 | %{_includedir}/bullet | |
107 | %{_libdir}/cmake/bullet | |
108 | %{_pkgconfigdir}/bullet.pc |