Name: coldet
Version: 1.2
Release: 4%{?dist}
Summary: 3D Collision Detection Library
Group: System Environment/Libraries
License: LGPLv2+
URL: http://coldet.sourceforge.net/
Source0: http://downloads.sourceforge.net/coldet/coldet12.zip
Patch0: coldet-1.1-fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
This library is an effort to provide a free collision detection library for
generic polyhedra. Its purpose is mainly for 3D games where accurate detection
is needed between two non-simple objects.
Features:
* Works on any model, even polygon soups.
* Uses bounding box hierarchies for fast detection.
* Uses additional triangle intersection tests for 100% accuracy.
* Provides (upon request) exact point of collision, plus the pair of
triangles that collided.
* Supports timeout setting, to limit detection time.
* Model-Model collision test.
* Ray-Model collision test.
* Segment-Model collision test.
* Sphere-Model collision test.
* Ray-Sphere and Sphere-Sphere primitive collision tests.
%package devel
Summary: Development libraries and headers for coldet
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The developmental files that must be installed in order to compile
applications which use coldet.
%prep
%setup -q -n %{name}
%patch0 -p1 -z .fixes
# for %doc
sed -i 's/\r//' readme.txt COPYING doc/quickstart.html doc/html/{*.html,*.css}
mv doc/quickstart.html doc/html
%build
pushd src
make %{?_smp_mflags} -f makefile.g++ OPT="$RPM_OPT_FLAGS"
popd
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir}/%{name}
install -m 755 src/lib%{name}.so.0 $RPM_BUILD_ROOT%{_libdir}
ln -s lib%{name}.so.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
install -m 644 src/coldet.h src/math3d.h $RPM_BUILD_ROOT%{_includedir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING readme.txt
%{_libdir}/lib%{name}.so.0
%files devel
%defattr(-,root,root,-)
%doc doc/html
%{_includedir}/%{name}
%{_libdir}/lib%{name}.so
%changelog
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2-4
- Autorebuild for GCC 4.3
* Wed Aug 22 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.2-3
- Fix Source0 URL
* Mon Aug 6 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.2-2
- Update License tag for new Licensing Guidelines compliance
* Sun May 20 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.2-1
- New upstream release 1.2
- Fix URL field (bz 240645)
* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.1-4
- FE6 Rebuild
* Fri Jul 7 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.1-3
- Make -devel package Requires on the main package fully versioned.
* Mon Jun 26 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.1-2
- Put headers under /usr/include/coldet instead of straight under /usr/include.
* Mon Jun 26 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.1-1
- Initial Fedora Extras package