68fbd63
%global svnrev 1071
68fbd63
68fbd63
Name:           assimp
68fbd63
Version:        2.0.863
68fbd63
Release:        5.20110824svn%{?dist}
68fbd63
Summary:        Library to import various 3D model formats into applications
68fbd63
68fbd63
Group:          Development/Libraries
68fbd63
License:        BSD
68fbd63
URL:            http://assimp.sourceforge.net
68fbd63
# Used 'assimp_generate_tarball svnrev' to generate source
68fbd63
Source0:        %{name}-%{svnrev}.tar.bz2
68fbd63
Source1:        assimp_generate_tarball.sh
68fbd63
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
68fbd63
68fbd63
# Strips bundled irrXML out of build files, and allows project to build
68fbd63
# against system versions of the libraries (not yet submitted upstream) 
68fbd63
Patch0:         %{name}-2.0.863.unbundleirrxml.patch
68fbd63
# Change a doxygen setting so CHM help isn't generated
68fbd63
Patch1:         %{name}-1.1.700.docfix.patch
68fbd63
Patch2:         %{name}-2.0.863.pkgconfig.patch
68fbd63
Patch3:         %{name}-1071-gcc47.patch
68fbd63
BuildRequires:  boost-devel
68fbd63
BuildRequires:  cmake
68fbd63
BuildRequires:  dos2unix
68fbd63
BuildRequires:  irrlicht-devel
68fbd63
BuildRequires:  irrXML-devel
68fbd63
BuildRequires:  zlib-devel
68fbd63
BuildRequires:  doxygen
68fbd63
BuildRequires:  minizip-devel
68fbd63
68fbd63
%description
68fbd63
Assimp, the Open Asset Import Library, is a free library to import 
68fbd63
various well-known 3D model formats into applications.  Assimp aims 
68fbd63
to provide a full asset conversion pipeline for use in game 
68fbd63
engines and real-time rendering systems, but is not limited 
68fbd63
to these applications.
68fbd63
68fbd63
%package devel
68fbd63
Summary: Header files and libraries for assimp
68fbd63
Group: Development/Libraries
68fbd63
Requires: %{name} = %{version}-%{release}
68fbd63
68fbd63
%description devel
68fbd63
This package contains the header files and libraries
68fbd63
for assimp. If you would like to develop programs using assimp,
68fbd63
you will need to install assimp-devel.
68fbd63
68fbd63
%prep
68fbd63
%setup -q -n %{name}
68fbd63
# Get rid of bundled libs so we can't accidently build against them
68fbd63
rm -rf contrib/irrXML
68fbd63
rm -rf contrib/zlib
68fbd63
rm -rf contrib/unzip
68fbd63
rm -rf code/fast_atof.h
68fbd63
%patch0 -p0
68fbd63
%patch1 -p1
68fbd63
%patch2 -p1
68fbd63
%patch3 -p0
68fbd63
68fbd63
%build
68fbd63
mkdir build
68fbd63
pushd build
68fbd63
%cmake  -DLIB_INSTALL_DIR=%{_libdir} -DINCLUDE_INSTALL_DIR=%{_includedir} -DBIN_INSTALL_DIR=%{_bindir} -DIRRXML_LIB_PATH=${_libdir} -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ -DUSE_EXTERNAL_LIBS=ON ..
68fbd63
popd
68fbd63
make %{?_smp_mflags} -C build
68fbd63
68fbd63
# Generate docs, copy assimp logo image and stylesheet into generated docs
68fbd63
pushd doc
68fbd63
doxygen Doxyfile
68fbd63
dos2unix style.css
68fbd63
cp style.css html/style.css
68fbd63
cp AssimpDoc_Html/dragonsplash.png html/dragonsplash.png
68fbd63
popd
68fbd63
68fbd63
# Fix file encoding
68fbd63
dos2unix README LICENSE CREDITS
68fbd63
iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS
68fbd63
68fbd63
%install
68fbd63
rm -rf %{buildroot}
68fbd63
make -C build install DESTDIR=%{buildroot}
68fbd63
68fbd63
68fbd63
%clean
68fbd63
rm -rf %{buildroot}
68fbd63
68fbd63
%post -p /sbin/ldconfig
68fbd63
68fbd63
%postun -p /sbin/ldconfig
68fbd63
68fbd63
68fbd63
%files
68fbd63
%defattr(-,root,root,-)
68fbd63
%doc README LICENSE CREDITS
68fbd63
%{_bindir}/assimp
68fbd63
%{_libdir}/*.so.*
68fbd63
68fbd63
%files devel
68fbd63
%defattr(-,root,root,-)
68fbd63
%doc doc/html
68fbd63
%{_includedir}/assimp
68fbd63
%{_libdir}/*.so
68fbd63
%{_libdir}/pkgconfig/*.pc
68fbd63
68fbd63
68fbd63
%changelog
68fbd63
* Wed Apr 11 2012 Rich Mattes <richmattes@gmail.com> - 2.0.863-5.20110824svn
68fbd63
- Changed spec to use buildroot macro
68fbd63
68fbd63
* Sat Dec 17 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-4.20110824svn
68fbd63
- Fixed pkgconfig paths
68fbd63
68fbd63
* Wed Aug 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-3.20110824svn
68fbd63
- Upgrade to latest svn snapshot
68fbd63
- Port changes to link against system irrXML
68fbd63
- Removed upstreamed zlib/unzip unbundling patches
68fbd63
68fbd63
* Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-2.20110324svn
68fbd63
- Upgrade to latest svn snapshot
68fbd63
- Port changes to link against libIrrXML
68fbd63
68fbd63
* Sat Dec 18 2010 Rich Mattes <richmattes@gmail.com> - 2.0.863-1
68fbd63
- Upgrade to release 2.0
68fbd63
68fbd63
* Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-3
68fbd63
- Remove extra buildrequires
68fbd63
- Generate doxygen docs manually
68fbd63
68fbd63
* Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-2
68fbd63
- Included doxygen-generated docs
68fbd63
- Using original .zip file from project download page
68fbd63
68fbd63
* Sun Sep 19 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-1
68fbd63
- First build