]>
Commit | Line | Data |
---|---|---|
9352f43c JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
516635ef | 4 | %bcond_with p7zip # plain p7zip (compatible with both rpm4/rpm5) |
9352f43c | 5 | # |
516635ef JB |
6 | Summary: OpenGL Mathematics (GLM) - C++ mathematics library for GLSL |
7 | Summary(pl.UTF-8): OpenGL Mathematics (GLM) - biblioteka matematyczna C++ dla GLSL | |
9352f43c | 8 | Name: GLM |
7cf3de71 | 9 | Version: 0.9.9.0 |
9352f43c JR |
10 | Release: 1 |
11 | License: MIT | |
516635ef | 12 | Group: Development/Libraries |
7cf3de71 JB |
13 | #Source0Download: https://github.com/g-truc/glm/releases |
14 | Source0: https://github.com/g-truc/glm/releases/download/%{version}/glm-%{version}.7z | |
15 | # Source0-md5: a1b8a83ec4a35d3662e4be9a4b915127 | |
72741b95 | 16 | Patch0: %{name}-opt.patch |
7cf3de71 JB |
17 | Patch1: %{name}-cmake.patch |
18 | URL: https://glm.g-truc.net/ | |
9352f43c | 19 | BuildRequires: cmake |
516635ef JB |
20 | %if %{with p7zip} |
21 | BuildRequires: p7zip | |
22 | %else | |
a760c65a | 23 | BuildRequires: p7zip-standalone |
516635ef JB |
24 | BuildRequires: rpm-build >= 5 |
25 | %endif | |
9352f43c JR |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
29 | OpenGL Mathematics (GLM) is a C++ mathematics library for graphics | |
30 | software based on the OpenGL Shading Language (GLSL) specification. | |
31 | ||
eb3f4301 AM |
32 | GLM is a header only library, there is nothing to build, just include |
33 | it. | |
9352f43c | 34 | |
516635ef JB |
35 | %description -l pl.UTF-8 |
36 | OpenGL Mathematics (GLM) to biblioteka matematyczna C++ dla programów | |
37 | graficznych opartych na specyfikacji OpenGL Shading Language (GLSL). | |
38 | ||
9352f43c | 39 | %prep |
516635ef | 40 | %if %{with p7zip} |
4e88ad7b | 41 | %setup -q -c -T -n glm |
516635ef JB |
42 | 7z x %{SOURCE0} -o.. |
43 | %else | |
4e88ad7b | 44 | %setup -q -n glm |
516635ef | 45 | %endif |
72741b95 | 46 | %patch0 -p1 |
7cf3de71 | 47 | %patch1 -p1 |
9352f43c JR |
48 | |
49 | %build | |
50 | mkdir build | |
51 | cd build | |
516635ef | 52 | %cmake .. \ |
9352f43c JR |
53 | -DGLM_TEST_ENABLE:BOOL=%{!?with_tests:OFF}%{?with_tests:ON} |
54 | ||
55 | %{?with_tests:%{__make}} | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
9352f43c | 59 | |
516635ef | 60 | %{__make} -C build install \ |
9352f43c JR |
61 | DESTDIR=$RPM_BUILD_ROOT |
62 | ||
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
7cf3de71 | 68 | %doc manual.md readme.md |
9352f43c | 69 | %attr(755,root,root) %{_includedir}/glm |
7cf3de71 JB |
70 | %{_pkgconfigdir}/glm.pc |
71 | %{_libdir}/cmake/glm |