ed7b020
%global commit f849f6d9bd21efe802fa456184b1c3173e74a050
ed7b020
%global shortcommit %(c=%{commit}; echo ${c:0:7})
01fbb64
01fbb64
Name:           assimp
220cd92
Version:        3.0.1270
b6af50c
Release:        10%{?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
ed7b020
# This is the source location, but use assimp_generate_tarball to remove the non-free
ed7b020
# model files from the source distribution.
ed7b020
#Source0:        https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
ed7b020
Source0:	%{name}-%{commit}-free.tar.bz2
ed7b020
# Assimp tarball comes with non-free models which must be removed from the source distribution
01fbb64
Source1:        assimp_generate_tarball.sh
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) 
220cd92
Patch0:         %{name}-3.0.1270-unbundle.patch
01fbb64
# Change a doxygen setting so CHM help isn't generated
01fbb64
Patch1:         %{name}-1.1.700.docfix.patch
01fbb64
Patch2:         %{name}-2.0.863.pkgconfig.patch
01fbb64
Patch3:         %{name}-1071-gcc47.patch
e02cb5b
Patch4:         %{name}-pythonpath.patch
b6af50c
# Fix library and include paths in assimp-config.cmake
b6af50c
# Fixes rhbz#1263698, not submitted upstream
b6af50c
Patch5:         %{name}-3.0.1270-cmakefix.patch
b6af50c
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
ad9bcd1
BuildRequires:  polyclipping-devel
ed7b020
BuildRequires:  python-devel
ed7b020
BuildRequires:  python3-devel
ed7b020
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
ed7b020
%package python
ed7b020
Summary: Python bindings for assimp
ed7b020
Group: Development/Libraries
ed7b020
BuildArch: noarch
ed7b020
Requires: %{name} = %{version}-%{release}
ed7b020
Requires: python
e02cb5b
ed7b020
%description python
ed7b020
This package contains the PyAssimp python bindings
ed7b020
ed7b020
%package python3
ed7b020
Summary: Python 3 bindings for assimp
ed7b020
Group: Development/Libraries
ed7b020
BuildArch: noarch
ed7b020
Requires: %{name} = %{version}-%{release}
ed7b020
Requires: python3
ed7b020
ed7b020
%description python3
ed7b020
This package contains the PyAssimp3 python bindings
e02cb5b
01fbb64
%prep
ed7b020
%setup -q -n %{name}-%{commit}
01fbb64
# Get rid of bundled libs so we can't accidently build against them
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
220cd92
%patch0 -p1 -b .unbundle
01fbb64
%patch1 -p1
01fbb64
%patch2 -p1
220cd92
#%patch3 -p0
ed7b020
%patch4 -p0
b6af50c
%patch5 -p0 -b .cmakefix
01fbb64
01fbb64
%build
01fbb64
mkdir build
01fbb64
pushd build
ad9bcd1
%cmake  -DLIB_INSTALL_DIR=%{_libdir} -DINCLUDE_INSTALL_DIR=%{_includedir} -DBIN_INSTALL_DIR=%{_bindir} -DIRRXML_LIB_PATH=%{_libdir} -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ -DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri -DUSE_EXTERNAL_LIBS=ON ..
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
ed7b020
dos2unix README LICENSE CREDITS port/PyAssimp/README port/PyAssimp3/README
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/
ed7b020
mkdir -p %{buildroot}%{python3_sitelib}/pyassimp/
ed7b020
install -m0644 port/PyAssimp3/pyassimp/*.py %{buildroot}%{python3_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
01fbb64
%defattr(-,root,root,-)
01fbb64
%doc README LICENSE CREDITS
01fbb64
%{_bindir}/assimp
01fbb64
%{_libdir}/*.so.*
01fbb64
01fbb64
%files devel
01fbb64
%defattr(-,root,root,-)
01fbb64
%doc doc/html
01fbb64
%{_includedir}/assimp
01fbb64
%{_libdir}/*.so
01fbb64
%{_libdir}/pkgconfig/*.pc
220cd92
%{_libdir}/cmake/%{name}-3.0
01fbb64
ed7b020
%files python
ed7b020
%doc port/PyAssimp/README
ed7b020
%{python_sitelib}/pyassimp
ed7b020
ed7b020
%files python3
ed7b020
%doc port/PyAssimp3/README
ed7b020
%{python3_sitelib}/pyassimp
01fbb64
01fbb64
%changelog
b6af50c
* Thu Sep 17 2015 Rich Mattes <richmattes@gmail.com> - 3.0.1270-10
b6af50c
- Fix assimp-config paths (rhbz#1263698)
b6af50c
Petr Machata c934513
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 3.0.1270-9
Petr Machata c934513
- Rebuild for boost 1.57.0
Petr Machata c934513
9d7d68f
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-8
9d7d68f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9d7d68f
d397a4e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-7
d397a4e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d397a4e
61d9d39
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 3.0.1270-6
61d9d39
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
61d9d39
Petr Machata a4e51d8
* Thu May 22 2014 Petr Machata <pmachata@redhat.com> - 3.0.1270-5
Petr Machata a4e51d8
- Rebuild for boost 1.55.0
Petr Machata a4e51d8
ed7b020
* Sun Mar 02 2014 Scott K Logan <logans@cottsay.net> - 3.0.1270-4
ed7b020
- Changed upstream source to Github
ed7b020
- Un-commented assimp-python, added python-devel to build deps
ed7b020
- Added assimp-python3 subpackage
ed7b020
3ade79a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-3
3ade79a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
3ade79a
Petr Machata 8c8d70b
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 3.0.1270-2
Petr Machata 8c8d70b
- Rebuild for boost 1.54.0
Petr Machata 8c8d70b
220cd92
* Wed May 01 2013 Rich Mattes <richmattes@gmail.com> 3.0.1270-1
220cd92
- Update to release 3.0.1270
220cd92
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