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