]>
Commit | Line | Data |
---|---|---|
9352f43c JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | # | |
516635ef JB |
5 | Summary: OpenGL Mathematics (GLM) - C++ mathematics library for GLSL |
6 | Summary(pl.UTF-8): OpenGL Mathematics (GLM) - biblioteka matematyczna C++ dla GLSL | |
9352f43c | 7 | Name: GLM |
6a66edba | 8 | Version: 1.0.1 |
c336c0b1 | 9 | Release: 2 |
9352f43c | 10 | License: MIT |
6a66edba | 11 | Group: Libraries |
7cf3de71 | 12 | #Source0Download: https://github.com/g-truc/glm/releases |
6a66edba JB |
13 | Source0: https://github.com/g-truc/glm/archive/%{version}/glm-%{version}.tar.gz |
14 | # Source0-md5: f824ac50e16310a95279032f82cbd341 | |
0979b4b3 | 15 | Patch0: x32.patch |
41ff96a7 | 16 | Patch1: %{name}-types.patch |
7cf3de71 | 17 | URL: https://glm.g-truc.net/ |
6a66edba | 18 | BuildRequires: cmake >= 3.6 |
37e717f7 | 19 | %{?with_tests:BuildRequires: libstdc++-devel} |
681f2195 | 20 | BuildRequires: rpmbuild(macros) >= 1.605 |
37e717f7 | 21 | Requires: libstdc++-devel |
9352f43c JR |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %description | |
25 | OpenGL Mathematics (GLM) is a C++ mathematics library for graphics | |
26 | software based on the OpenGL Shading Language (GLSL) specification. | |
27 | ||
516635ef JB |
28 | %description -l pl.UTF-8 |
29 | OpenGL Mathematics (GLM) to biblioteka matematyczna C++ dla programów | |
30 | graficznych opartych na specyfikacji OpenGL Shading Language (GLSL). | |
31 | ||
6a66edba JB |
32 | %package devel |
33 | Summary: OpenGL Mathematics (GLM) - C++ mathematics library for GLSL (header files) | |
34 | Summary(pl.UTF-8): OpenGL Mathematics (GLM) - biblioteka matematyczna C++ dla GLSL (pliki nagłówkowe) | |
35 | Group: Development/Libraries | |
36 | Requires: libstdc++-devel | |
37 | # no base dependency - can be used as header-only library | |
38 | # not noarch due to paths in cmake configs | |
a4bdb98d | 39 | Obsoletes: GLM < 1.0.1 |
6a66edba JB |
40 | |
41 | %description devel | |
42 | OpenGL Mathematics (GLM) is a C++ mathematics library for graphics | |
43 | software based on the OpenGL Shading Language (GLSL) specification. | |
44 | ||
45 | %description devel -l pl.UTF-8 | |
46 | OpenGL Mathematics (GLM) to biblioteka matematyczna C++ dla programów | |
47 | graficznych opartych na specyfikacji OpenGL Shading Language (GLSL). | |
48 | ||
9352f43c | 49 | %prep |
6a66edba | 50 | %setup -q -n glm-%{version} |
72741b95 | 51 | %patch0 -p1 |
41ff96a7 | 52 | %patch1 -p1 |
9352f43c JR |
53 | |
54 | %build | |
55 | mkdir build | |
56 | cd build | |
6a66edba | 57 | # change CMAKE_INSTALL_DATAROOTDIR to arch-dependent (files contain arch-dependent libglm.so paths) |
516635ef | 58 | %cmake .. \ |
6a66edba | 59 | -DCMAKE_INSTALL_DATAROOTDIR=%{_libdir}/cmake \ |
9352f43c JR |
60 | -DGLM_TEST_ENABLE:BOOL=%{!?with_tests:OFF}%{?with_tests:ON} |
61 | ||
aeef72e1 | 62 | %{__make} |
6a66edba JB |
63 | |
64 | %if %{with tests} | |
aeef72e1 BS |
65 | %{__make} test |
66 | %endif | |
9352f43c JR |
67 | |
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
9352f43c | 70 | |
344ac6d5 JP |
71 | %{__make} -C build install \ |
72 | DESTDIR=$RPM_BUILD_ROOT | |
9352f43c JR |
73 | |
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
6a66edba JB |
77 | %post -p /sbin/ldconfig |
78 | %postun -p /sbin/ldconfig | |
79 | ||
9352f43c JR |
80 | %files |
81 | %defattr(644,root,root,755) | |
7cf3de71 | 82 | %doc manual.md readme.md |
6a66edba JB |
83 | %attr(755,root,root) %{_libdir}/libglm.so |
84 | ||
85 | %files devel | |
86 | %defattr(644,root,root,755) | |
87 | %doc manual.md readme.md | |
aeef72e1 | 88 | %{_includedir}/glm |
344ac6d5 | 89 | %{_libdir}/cmake/glm |