assimp-vl.spec 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. %global commit0 c318d648ff73aa2e32b783709d69740ac3e8c072
  2. %global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
  3. %{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
  4. %{!?python3_version: %define python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
  5. Name: assimp
  6. Version: 3.2.0
  7. Release: 5%{?_dist_release}
  8. Summary: Library to import various 3D model formats into applications
  9. Group: Development/Libraries
  10. # Assimp is BSD, the bundled openddlparser is MIT.
  11. License: BSD and MIT
  12. URL: http://assimp.sourceforge.net
  13. Vendor: Project Vine
  14. Distribution: Vine Linux
  15. #Source0: https://github.com/assimp/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
  16. # Github releases include nonfree models, source tarball must be re-generated
  17. # using assimp_generate_tarball.sh
  18. Source0: %{name}-%{commit0}-free.tar.bz2
  19. # Strips bundled irrXML out of build files, and allows project to build
  20. # against system versions of the libraries (not yet submitted upstream)
  21. Patch0: %{name}-3.2.0-unbundle.patch
  22. # Change a doxygen setting so CHM help isn't generated. Fedora-only
  23. Patch1: %{name}-3.1.1-docfix.patch
  24. # Add /usr/lib64 to library lookup paths for python modules
  25. Patch4: %{name}-3.2.0-pythonpath.patch
  26. # Fix library and include paths in assimp-config.cmake
  27. # Fixes rhbz#1263698, not submitted upstream
  28. Patch5: %{name}-3.2.0-cmakefix.patch
  29. # Fix big endian platforms
  30. Patch6: %{name}-3.2.0-bigendian.patch
  31. BuildRequires: libboost-devel
  32. BuildRequires: cmake
  33. BuildRequires: dos2unix
  34. #BuildRequires: irrlicht-devel
  35. #BuildRequires: irrXML-devel
  36. BuildRequires: zlib-devel
  37. BuildRequires: doxygen
  38. #BuildRequires: minizip-devel
  39. #BuildRequires: poly2tri-devel
  40. #BuildRequires: polyclipping-devel
  41. BuildRequires: python-devel
  42. BuildRequires: python3-devel
  43. BuildRequires: gtest-devel
  44. Provides: bundled(openddl-parser)
  45. %description
  46. Assimp, the Open Asset Import Library, is a free library to import
  47. various well-known 3D model formats into applications. Assimp aims
  48. to provide a full asset conversion pipeline for use in game
  49. engines and real-time rendering systems, but is not limited
  50. to these applications.
  51. %package devel
  52. Summary: Header files and libraries for assimp
  53. Group: Development/Libraries
  54. Requires: %{name}%{?_isa} = %{version}-%{release}
  55. %description devel
  56. This package contains the header files and libraries
  57. for assimp. If you would like to develop programs using assimp,
  58. you will need to install assimp-devel.
  59. %package -n python2-%{name}
  60. Summary: Python bindings for assimp
  61. Group: Development/Libraries
  62. BuildArch: noarch
  63. Requires: %{name} = %{version}-%{release}
  64. Requires: python
  65. Provides: %{name}-python = %{version}-%{release}
  66. Obsoletes: %{name}-python < 3.1.1
  67. %description -n python2-%{name}
  68. This package contains the PyAssimp python bindings
  69. %package -n python3-%{name}
  70. Summary: Python 3 bindings for assimp
  71. Group: Development/Libraries
  72. BuildArch: noarch
  73. Requires: %{name} = %{version}-%{release}
  74. Requires: python3
  75. Provides: %{name}-python3 = %{version}-%{release}
  76. Obsoletes: %{name}-python3 < 3.1.1
  77. %description -n python3-%{name}
  78. This package contains the PyAssimp3 python bindings
  79. %prep
  80. %setup -q -n %{name}-%{commit0}
  81. # Get rid of bundled libs so we can't accidently build against them
  82. #rm -f code/fast_atof.h
  83. #rm -rf contrib/cppunit-1.12.1
  84. #rm -rf contrib/irrXML
  85. #rm -rf contrib/zlib
  86. #rm -rf contrib/unzip
  87. #rm -rf contrib/poly2tri
  88. #%patch0 -p1 -b .unbundle
  89. %patch1 -p1 -b .docfix
  90. %patch4 -p1 -b .pythonpath
  91. %patch5 -p0 -b .cmakefix
  92. %patch6 -p1 -b .bigendian
  93. %build
  94. mkdir build
  95. pushd build
  96. %cmake .. \
  97. -DASSIMP_LIB_INSTALL_DIR=%{_libdir} \
  98. -DASSIMP_BIN_INSTALL_DIR=%{_bindir} \
  99. -DASSIMP_INCLUDE_INSTALL_DIR=%{_includedir} \
  100. -DIRRXML_LIB_PATH=%{_libdir} \
  101. -DIRRXML_INCLUDE_PATH=%{_includedir}/irrlicht/ \
  102. -DUSE_EXTERNAL_LIBS=ON \
  103. -DASSIMP_ENABLE_BOOST_WORKAROUND=OFF
  104. # -DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri \
  105. # -DCLIPPER_INCLUDE_PATH=%{_includedir}/clipper \
  106. popd
  107. make %{?_smp_mflags} -C build
  108. # Generate docs, copy assimp logo image and stylesheet into generated docs
  109. pushd doc
  110. doxygen Doxyfile
  111. cp AssimpDoc_Html/dragonsplash.png html/dragonsplash.png
  112. popd
  113. # Fix file encoding
  114. dos2unix README LICENSE CREDITS port/PyAssimp/README.md
  115. iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS
  116. %install
  117. rm -rf %{buildroot}
  118. make -C build install DESTDIR=%{buildroot}
  119. mkdir -p %{buildroot}%{python_sitelib}/pyassimp/
  120. install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python_sitelib}/pyassimp/
  121. mkdir -p %{buildroot}%{python3_sitelib}/pyassimp/
  122. install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyassimp/
  123. %clean
  124. rm -rf %{buildroot}
  125. %post -p /sbin/ldconfig
  126. %postun -p /sbin/ldconfig
  127. %files
  128. %license LICENSE
  129. %doc README CREDITS
  130. %{_bindir}/assimp
  131. %{_libdir}/*.so.*
  132. %files devel
  133. %doc doc/html
  134. %{_includedir}/assimp
  135. %{_libdir}/*.so
  136. %{_libdir}/pkgconfig/*.pc
  137. %{_libdir}/cmake/%{name}-3.2
  138. %files -n python2-%{name}
  139. %doc port/PyAssimp/README.md
  140. %{python_sitelib}/pyassimp
  141. %files -n python3-%{name}
  142. %doc port/PyAssimp/README.md
  143. %{python3_sitelib}/pyassimp
  144. %changelog
  145. * Mon Jul 11 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.2.0-5
  146. - added tags: Vendor and Distribution.
  147. * Mon Jul 11 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.2.0-4
  148. - initial build for Vine Linux.
  149. * Fri Jul 01 2016 Dan Horák <dan[at]danny.cz> - 3.2.0-3
  150. - Fix build on big endian platforms
  151. * Fri Jun 03 2016 Rich Mattes <richmattes@gmail.com> - 3.2.0-2
  152. - Fix pkgconfig and cmake files (rhbz#1340656)
  153. * Mon May 09 2016 Rich Mattes <richmattes@gmail.com> - 3.2.0-1
  154. - Update to release 3.2.0 (rhbz#1332434)
  155. * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-9
  156. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  157. * Thu Jan 14 2016 Jonathan Wakely <jwakely@redhat.com> - 3.1.1-8
  158. - Rebuilt for Boost 1.60
  159. * Wed Dec 09 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-7
  160. - Add patch to fix build on big-endian architectures
  161. * Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-6
  162. - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
  163. * Thu Sep 17 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-5
  164. - Fix assimp-config paths (rhbz#1263698)
  165. - Build against system boost instead of using included workaround
  166. * Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 3.1.1-4
  167. - Rebuilt for Boost 1.59
  168. * Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-3
  169. - Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
  170. * Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 3.1.1-2
  171. - rebuild for Boost 1.58
  172. * Fri Jul 03 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-1
  173. - Update to release 3.1.1 (rhbz#1206371)
  174. - Remove upstreamed patches
  175. - Correct python package names
  176. - Use license macro
  177. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-11
  178. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  179. * Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.0.1270-10
  180. - Rebuilt for GCC 5 C++11 ABI change
  181. * Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 3.0.1270-9
  182. - Rebuild for boost 1.57.0
  183. * Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-8
  184. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
  185. * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-7
  186. - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
  187. * Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 3.0.1270-6
  188. - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
  189. * Thu May 22 2014 Petr Machata <pmachata@redhat.com> - 3.0.1270-5
  190. - Rebuild for boost 1.55.0
  191. * Sun Mar 02 2014 Scott K Logan <logans@cottsay.net> - 3.0.1270-4
  192. - Changed upstream source to Github
  193. - Un-commented assimp-python, added python-devel to build deps
  194. - Added assimp-python3 subpackage
  195. * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-3
  196. - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
  197. * Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 3.0.1270-2
  198. - Rebuild for boost 1.54.0
  199. * Wed May 01 2013 Rich Mattes <richmattes@gmail.com> 3.0.1270-1
  200. - Update to release 3.0.1270
  201. * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.863-9.20110824svn
  202. - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
  203. * Thu Oct 25 2012 Rich Mattes <richmattes@gmail.com> - 2.0.863-8.20110824svn
  204. - Install python bindings
  205. * Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.863-7.20110824svn
  206. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  207. * Tue Jul 3 2012 Tom Callaway <spot@fedoraproject.org> - 2.0.863-6.20110824svn
  208. - rebuild against new irrlicht/irrxml
  209. * Wed Apr 11 2012 Rich Mattes <richmattes@gmail.com> - 2.0.863-5.20110824svn
  210. - Changed spec to use buildroot macro
  211. * Sat Dec 17 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-4.20110824svn
  212. - Fixed pkgconfig paths
  213. * Wed Aug 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-3.20110824svn
  214. - Upgrade to latest svn snapshot
  215. - Port changes to link against system irrXML
  216. - Removed upstreamed zlib/unzip unbundling patches
  217. * Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-2.20110324svn
  218. - Upgrade to latest svn snapshot
  219. - Port changes to link against libIrrXML
  220. * Sat Dec 18 2010 Rich Mattes <richmattes@gmail.com> - 2.0.863-1
  221. - Upgrade to release 2.0
  222. * Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-3
  223. - Remove extra buildrequires
  224. - Generate doxygen docs manually
  225. * Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-2
  226. - Included doxygen-generated docs
  227. - Using original .zip file from project download page
  228. * Sun Sep 19 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-1
  229. - First build