1 |
%define major 3 |
2 |
%define minor 1 |
3 |
%define libname %mklibname %{name} %{major} |
4 |
%define devname %mklibname %{name} -d |
5 |
|
6 |
Name: assimp |
7 |
Version: 3.1.1 |
8 |
Release: %mkrel 1 |
9 |
Summary: Library to import various 3D model formats into applications |
10 |
Group: Graphics/3D |
11 |
License: BSD |
12 |
URL: http://assimp.sourceforge.net |
13 |
Source0: http://downloads.sourceforge.net/project/assimp/%{name}-%{major}.%{minor}/%{name}-%{version}_no_test_models.zip |
14 |
# Change a doxygen setting so CHM help isn't generated |
15 |
Patch0: assimp-3.1.1-mga-fdr-doxyfile.patch |
16 |
Patch1: assimp-3.1-mga-fdr-system-unzip-poly2tri-clipper.patch |
17 |
|
18 |
BuildRequires: boost-devel |
19 |
BuildRequires: cmake |
20 |
BuildRequires: dos2unix |
21 |
BuildRequires: doxygen |
22 |
BuildRequires: pkgconfig(minizip) |
23 |
BuildRequires: pkgconfig(poly2tri) |
24 |
# assimp 3.1 seems not to build with the most recent version of polyclipping |
25 |
#BuildRequires: pkgconfig(polyclipping) |
26 |
BuildRequires: pkgconfig(zlib) |
27 |
|
28 |
%description |
29 |
Assimp, the Open Asset Import Library, is a free library to import various |
30 |
well-known 3D model formats into applications. Assimp aims to provide a full |
31 |
asset conversion pipeline for use in game engines and real-time rendering |
32 |
systems, but is not limited to these applications. |
33 |
|
34 |
This package contains the assimp binary, a tool to work with various formats. |
35 |
|
36 |
%files |
37 |
%{_bindir}/%{name} |
38 |
|
39 |
#---------------------------------------------------------------------------- |
40 |
|
41 |
%package -n %{libname} |
42 |
Summary: Library to import various 3D model formats into applications |
43 |
Group: System/Libraries |
44 |
|
45 |
%description -n %{libname} |
46 |
Assimp, the Open Asset Import Library, is a free library to import various |
47 |
well-known 3D model formats into applications. Assimp aims to provide a full |
48 |
asset conversion pipeline for use in game engines and real-time rendering |
49 |
systems, but is not limited to these applications. |
50 |
|
51 |
%files -n %{libname} |
52 |
%doc Readme.md LICENSE CREDITS CHANGES |
53 |
%{_libdir}/lib%{name}.so.%{major}* |
54 |
|
55 |
#---------------------------------------------------------------------------- |
56 |
|
57 |
%package -n %{devname} |
58 |
Summary: Header files and development libraries for assimp |
59 |
Group: Development/C++ |
60 |
Provides: %{name}-devel = %{version}-%{release} |
61 |
Requires: %{libname} = %{version}-%{release} |
62 |
|
63 |
%description -n %{devname} |
64 |
This package contains the header files and development libraries for assimp. |
65 |
You need to install it if you want to develop programs using assimp. |
66 |
|
67 |
%files -n %{devname} |
68 |
%doc doc/AssimpDoc_Html |
69 |
%{_includedir}/%{name} |
70 |
%{_libdir}/lib%{name}.so |
71 |
%{_libdir}/cmake/%{name}-%{major}.%{minor} |
72 |
%{_libdir}/pkgconfig/%{name}.pc |
73 |
|
74 |
#---------------------------------------------------------------------------- |
75 |
|
76 |
%prep |
77 |
%setup -q |
78 |
%apply_patches |
79 |
|
80 |
# Get rid of bundled libs so we can't accidently build against them |
81 |
#rm -rf contrib/clipper |
82 |
rm -rf contrib/cppunit-1.12.1 |
83 |
rm -rf contrib/poly2tri |
84 |
rm -rf contrib/unzip |
85 |
rm -rf contrib/zlib |
86 |
|
87 |
dos2unix CHANGES CREDITS LICENSE Readme.md |
88 |
|
89 |
%build |
90 |
%cmake -DASSIMP_LIB_INSTALL_DIR:PATH=%{_lib} \ |
91 |
-DASSIMP_ENABLE_BOOST_WORKAROUND=OFF \ |
92 |
-DPOLY2TRI_LIB_PATH:PATH=%{_libdir} \ |
93 |
-DPOLY2TRI_INCLUDE_PATH:PATH=%{_includedir}/poly2tri |
94 |
# -DCLIPPER_LIB_PATH:PATH=%%{_libdir} \ |
95 |
# -DCLIPPER_INCLUDE_PATH:PATH=%%{_includedir}/polyclipping |
96 |
%make |
97 |
|
98 |
# Generate html doc |
99 |
pushd ../doc |
100 |
doxygen Doxyfile |
101 |
popd |
102 |
|
103 |
%install |
104 |
%makeinstall_std -C build |