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