01fbb64
Name:           assimp
8b2f97f
Version:        3.1.1
3364b39
Release:        2%{?dist}
01fbb64
Summary:        Library to import various 3D model formats into applications
01fbb64
01fbb64
Group:          Development/Libraries
01fbb64
License:        BSD
01fbb64
URL:            http://assimp.sourceforge.net
8b2f97f
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}_no_test_models.zip
01fbb64
01fbb64
# Strips bundled irrXML out of build files, and allows project to build
01fbb64
# against system versions of the libraries (not yet submitted upstream) 
8b2f97f
Patch0:         %{name}-3.1.1-unbundle.patch
8b2f97f
# Change a doxygen setting so CHM help isn't generated. Fedora-only
8b2f97f
Patch1:         %{name}-3.1.1-docfix.patch
8b2f97f
# Add /usr/lib64 to library lookup paths for python modules
8b2f97f
Patch4:         %{name}-3.1.1-pythonpath.patch
e51a7be
# Fix build on big-endian architectures
e51a7be
#https://github.com/assimp/assimp/issues/613
e51a7be
Patch5:         %{name}-3.1.1-bigendian.patch
3364b39
# Fix library and include paths in assimp-config.cmake
3364b39
# Fixes rhbz#1263698, not submitted upstream
3364b39
Patch6:         %{name}-3.1.1-cmakefix.patch
8b2f97f
01fbb64
BuildRequires:  boost-devel
01fbb64
BuildRequires:  cmake
01fbb64
BuildRequires:  dos2unix
01fbb64
BuildRequires:  irrlicht-devel
01fbb64
BuildRequires:  irrXML-devel
01fbb64
BuildRequires:  zlib-devel
01fbb64
BuildRequires:  doxygen
01fbb64
BuildRequires:  minizip-devel
220cd92
BuildRequires:  poly2tri-devel
8b2f97f
BuildRequires:  python2-devel
01fbb64
01fbb64
%description
01fbb64
Assimp, the Open Asset Import Library, is a free library to import 
01fbb64
various well-known 3D model formats into applications.  Assimp aims 
01fbb64
to provide a full asset conversion pipeline for use in game 
01fbb64
engines and real-time rendering systems, but is not limited 
01fbb64
to these applications.
01fbb64
01fbb64
%package devel
01fbb64
Summary: Header files and libraries for assimp
01fbb64
Group: Development/Libraries
01fbb64
Requires: %{name} = %{version}-%{release}
01fbb64
01fbb64
%description devel
01fbb64
This package contains the header files and libraries
01fbb64
for assimp. If you would like to develop programs using assimp,
01fbb64
you will need to install assimp-devel.
01fbb64
8b2f97f
%package -n python2-%{name}
e02cb5b
Summary: Python bindings for assimp
e02cb5b
Group: Development/Libraries
e02cb5b
BuildArch: noarch
e02cb5b
Requires: %{name} = %{version}-%{release}
8b2f97f
Requires: python2
8b2f97f
Provides: %{name}-python = %{version}-%{release}
8b2f97f
Obsoletes: %{name}-python < 3.1.1
e02cb5b
8b2f97f
%description -n python2-%{name}
e02cb5b
This package contains the PyAssimp python bindings
e02cb5b
01fbb64
%prep
8b2f97f
%setup -q 
01fbb64
# Get rid of bundled libs so we can't accidently build against them
8b2f97f
rm -f code/fast_atof.h
04b8c9f
rm -rf contrib/cppunit-1.12.1
01fbb64
rm -rf contrib/irrXML
01fbb64
rm -rf contrib/zlib
01fbb64
rm -rf contrib/unzip
220cd92
rm -rf contrib/poly2tri
3fc8809
%patch0 -p1 -b .unbundle
8b2f97f
%patch1 -p1 -b .docfix
8b2f97f
%patch4 -p1 -b .pythonpath
e51a7be
%patch5 -p1 -b .bigendian
3364b39
%patch6 -p0 -b .cmakefix
01fbb64
01fbb64
%build
01fbb64
mkdir build
01fbb64
pushd build
8b2f97f
%cmake .. \
8b2f97f
 -DASSIMP_LIB_INSTALL_DIR=%{_libdir} \
3364b39
 -DASSIMP_INCLUDE_INSTALL_DIR=%{_includedir} \
8b2f97f
 -DIRRXML_LIB_PATH=%{_libdir} \
8b2f97f
 -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ \
8b2f97f
 -DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri \
8b2f97f
 -DCLIPPER_INCLUDE_PATH=%{_includedir}/clipper \
3364b39
 -DUSE_EXTERNAL_LIBS=ON  \
3364b39
 -DASSIMP_ENABLE_BOOST_WORKAROUND=OFF
01fbb64
popd
01fbb64
make %{?_smp_mflags} -C build
01fbb64
01fbb64
# Generate docs, copy assimp logo image and stylesheet into generated docs
01fbb64
pushd doc
01fbb64
doxygen Doxyfile
01fbb64
cp AssimpDoc_Html/dragonsplash.png html/dragonsplash.png
01fbb64
popd
01fbb64
01fbb64
# Fix file encoding
8b2f97f
dos2unix README LICENSE CREDITS port/PyAssimp/README.md
01fbb64
iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS
01fbb64
01fbb64
%install
01fbb64
rm -rf %{buildroot}
01fbb64
make -C build install DESTDIR=%{buildroot}
ed7b020
mkdir -p %{buildroot}%{python2_sitelib}/pyassimp/
ed7b020
install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python2_sitelib}/pyassimp/
01fbb64
01fbb64
%clean
01fbb64
rm -rf %{buildroot}
01fbb64
01fbb64
%post -p /sbin/ldconfig
01fbb64
01fbb64
%postun -p /sbin/ldconfig
01fbb64
01fbb64
01fbb64
%files
8b2f97f
%license LICENSE
8b2f97f
%doc README CREDITS
01fbb64
%{_bindir}/assimp
01fbb64
%{_libdir}/*.so.*
01fbb64
01fbb64
%files devel
01fbb64
%doc doc/html
01fbb64
%{_includedir}/assimp
01fbb64
%{_libdir}/*.so
01fbb64
%{_libdir}/pkgconfig/*.pc
8b2f97f
%{_libdir}/cmake/%{name}-3.1
01fbb64
8b2f97f
%files -n python2-%{name}
8b2f97f
%doc port/PyAssimp/README.md
e02cb5b
%{python_sitelib}/pyassimp
01fbb64
01fbb64
%changelog
3364b39
* Thu Sep 17 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-2
3364b39
- Fix assimp-config paths (rhbz#1263698)
3364b39
- Build against system boost instead of using included workaround
3364b39
8b2f97f
* Fri Jul 03 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-1
8b2f97f
- Update to release 3.1.1 (rhbz#1206371)
8b2f97f
- Remove upstreamed patches
8b2f97f
- Correct python package names
8b2f97f
- Use license macro
8b2f97f
bf007ab
* Sun Mar 02 2014 Scott K Logan <logans@cottsay.net> - 2.0.863-11.20110824svn
bf007ab
- Added missing python-devel build dep which resulted in pyassimp installing to /
bf007ab
- Added README for assimp-python
bf007ab
bf007ab
* Fri Jul 05 2013 Rich Mattes <richmattes@gmail.com> - 2.0.863-10.20110824svn
1426a45
- Update project version in pkgconfig to reflect SVN snapshot version (rhbz#972536)
1426a45
1e08944
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.863-9.20110824svn
1e08944
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1e08944
e02cb5b
* Thu Oct 25 2012 Rich Mattes <richmattes@gmail.com> - 2.0.863-8.20110824svn
e02cb5b
- Install python bindings
e02cb5b
60a2fef
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.863-7.20110824svn
60a2fef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
60a2fef
20437ea
* Tue Jul  3 2012 Tom Callaway <spot@fedoraproject.org> - 2.0.863-6.20110824svn
20437ea
- rebuild against new irrlicht/irrxml
20437ea
01fbb64
* Wed Apr 11 2012 Rich Mattes <richmattes@gmail.com> - 2.0.863-5.20110824svn
01fbb64
- Changed spec to use buildroot macro
01fbb64
01fbb64
* Sat Dec 17 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-4.20110824svn
01fbb64
- Fixed pkgconfig paths
01fbb64
01fbb64
* Wed Aug 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-3.20110824svn
01fbb64
- Upgrade to latest svn snapshot
01fbb64
- Port changes to link against system irrXML
01fbb64
- Removed upstreamed zlib/unzip unbundling patches
01fbb64
01fbb64
* Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-2.20110324svn
01fbb64
- Upgrade to latest svn snapshot
01fbb64
- Port changes to link against libIrrXML
01fbb64
01fbb64
* Sat Dec 18 2010 Rich Mattes <richmattes@gmail.com> - 2.0.863-1
01fbb64
- Upgrade to release 2.0
01fbb64
01fbb64
* Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-3
01fbb64
- Remove extra buildrequires
01fbb64
- Generate doxygen docs manually
01fbb64
01fbb64
* Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-2
01fbb64
- Included doxygen-generated docs
01fbb64
- Using original .zip file from project download page
01fbb64
01fbb64
* Sun Sep 19 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-1
01fbb64
- First build