]>
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 |
0979b4b3 | 9 | Version: 0.9.9.8 |
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 | |
0979b4b3 JB |
15 | # Source0-md5: c8342552801ebeb31497288192c4e793 |
16 | Patch0: x32.patch | |
7cf3de71 | 17 | URL: https://glm.g-truc.net/ |
1369b3b2 | 18 | BuildRequires: cmake >= 3.2 |
516635ef JB |
19 | %if %{with p7zip} |
20 | BuildRequires: p7zip | |
21 | %else | |
a760c65a | 22 | BuildRequires: p7zip-standalone |
516635ef JB |
23 | BuildRequires: rpm-build >= 5 |
24 | %endif | |
9352f43c JR |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | OpenGL Mathematics (GLM) is a C++ mathematics library for graphics | |
29 | software based on the OpenGL Shading Language (GLSL) specification. | |
30 | ||
eb3f4301 AM |
31 | GLM is a header only library, there is nothing to build, just include |
32 | it. | |
9352f43c | 33 | |
516635ef JB |
34 | %description -l pl.UTF-8 |
35 | OpenGL Mathematics (GLM) to biblioteka matematyczna C++ dla programów | |
36 | graficznych opartych na specyfikacji OpenGL Shading Language (GLSL). | |
37 | ||
9352f43c | 38 | %prep |
516635ef | 39 | %if %{with p7zip} |
4e88ad7b | 40 | %setup -q -c -T -n glm |
516635ef JB |
41 | 7z x %{SOURCE0} -o.. |
42 | %else | |
4e88ad7b | 43 | %setup -q -n glm |
516635ef | 44 | %endif |
72741b95 | 45 | %patch0 -p1 |
9352f43c JR |
46 | |
47 | %build | |
48 | mkdir build | |
49 | cd build | |
516635ef | 50 | %cmake .. \ |
9352f43c JR |
51 | -DGLM_TEST_ENABLE:BOOL=%{!?with_tests:OFF}%{?with_tests:ON} |
52 | ||
aeef72e1 BS |
53 | %if %{with tests} |
54 | %{__make} | |
55 | %{__make} test | |
56 | %endif | |
9352f43c JR |
57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
aeef72e1 | 60 | install -d $RPM_BUILD_ROOT%{_includedir} |
9352f43c | 61 | |
aeef72e1 | 62 | cp -a glm $RPM_BUILD_ROOT%{_includedir} |
9352f43c JR |
63 | |
64 | %clean | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
7cf3de71 | 69 | %doc manual.md readme.md |
aeef72e1 | 70 | %{_includedir}/glm |