]>
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 | # |
344ac6d5 JP |
6 | %define gitref 47585fde0c49fa77a2bf2fb1d2ead06999fd4b6e |
7 | %define snap 20230818 | |
8 | %define rel 1 | |
9 | ||
516635ef JB |
10 | Summary: OpenGL Mathematics (GLM) - C++ mathematics library for GLSL |
11 | Summary(pl.UTF-8): OpenGL Mathematics (GLM) - biblioteka matematyczna C++ dla GLSL | |
9352f43c | 12 | Name: GLM |
344ac6d5 JP |
13 | Version: 0.9.9.9 |
14 | Release: 0.%{snap}.%{rel} | |
9352f43c | 15 | License: MIT |
516635ef | 16 | Group: Development/Libraries |
7cf3de71 | 17 | #Source0Download: https://github.com/g-truc/glm/releases |
344ac6d5 JP |
18 | Source0: https://github.com/g-truc/glm/archive/%{gitref}/%{name}-%{snap}.tar.gz |
19 | # Source0-md5: b288cb704cca5d1cd46be724ce61f428 | |
0979b4b3 | 20 | Patch0: x32.patch |
7cf3de71 | 21 | URL: https://glm.g-truc.net/ |
1369b3b2 | 22 | BuildRequires: cmake >= 3.2 |
37e717f7 | 23 | %{?with_tests:BuildRequires: libstdc++-devel} |
681f2195 | 24 | BuildRequires: rpmbuild(macros) >= 1.605 |
516635ef JB |
25 | %if %{with p7zip} |
26 | BuildRequires: p7zip | |
27 | %else | |
a760c65a | 28 | BuildRequires: p7zip-standalone |
516635ef JB |
29 | BuildRequires: rpm-build >= 5 |
30 | %endif | |
37e717f7 | 31 | Requires: libstdc++-devel |
9352f43c JR |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
8f3f5698 JP |
34 | %define _enable_debug_packages 0 |
35 | ||
9352f43c JR |
36 | %description |
37 | OpenGL Mathematics (GLM) is a C++ mathematics library for graphics | |
38 | software based on the OpenGL Shading Language (GLSL) specification. | |
39 | ||
eb3f4301 AM |
40 | GLM is a header only library, there is nothing to build, just include |
41 | it. | |
9352f43c | 42 | |
516635ef JB |
43 | %description -l pl.UTF-8 |
44 | OpenGL Mathematics (GLM) to biblioteka matematyczna C++ dla programów | |
45 | graficznych opartych na specyfikacji OpenGL Shading Language (GLSL). | |
46 | ||
9352f43c | 47 | %prep |
516635ef | 48 | %if %{with p7zip} |
4e88ad7b | 49 | %setup -q -c -T -n glm |
516635ef JB |
50 | 7z x %{SOURCE0} -o.. |
51 | %else | |
344ac6d5 | 52 | %setup -q -n glm-%{gitref} |
516635ef | 53 | %endif |
72741b95 | 54 | %patch0 -p1 |
9352f43c JR |
55 | |
56 | %build | |
57 | mkdir build | |
58 | cd build | |
344ac6d5 | 59 | CXXFLAGS="%{rpmcxxflags} -fno-ipa-modref" \ |
516635ef | 60 | %cmake .. \ |
9352f43c JR |
61 | -DGLM_TEST_ENABLE:BOOL=%{!?with_tests:OFF}%{?with_tests:ON} |
62 | ||
aeef72e1 BS |
63 | %if %{with tests} |
64 | %{__make} | |
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 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
7cf3de71 | 79 | %doc manual.md readme.md |
aeef72e1 | 80 | %{_includedir}/glm |
344ac6d5 | 81 | %{_libdir}/cmake/glm |