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