]> git.pld-linux.org Git - packages/GLM.git/blob - GLM.spec
O: GLM < 1.0.1 in -devel
[packages/GLM.git] / GLM.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4 #
5 Summary:        OpenGL Mathematics (GLM) - C++ mathematics library for GLSL
6 Summary(pl.UTF-8):      OpenGL Mathematics (GLM) - biblioteka matematyczna C++ dla GLSL
7 Name:           GLM
8 Version:        1.0.1
9 Release:        1
10 License:        MIT
11 Group:          Libraries
12 #Source0Download: https://github.com/g-truc/glm/releases
13 Source0:        https://github.com/g-truc/glm/archive/%{version}/glm-%{version}.tar.gz
14 # Source0-md5:  f824ac50e16310a95279032f82cbd341
15 Patch0:         x32.patch
16 URL:            https://glm.g-truc.net/
17 BuildRequires:  cmake >= 3.6
18 %{?with_tests:BuildRequires:    libstdc++-devel}
19 BuildRequires:  rpmbuild(macros) >= 1.605
20 Requires:       libstdc++-devel
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 OpenGL Mathematics (GLM) is a C++ mathematics library for graphics
25 software based on the OpenGL Shading Language (GLSL) specification.
26
27 %description -l pl.UTF-8
28 OpenGL Mathematics (GLM) to biblioteka matematyczna C++ dla programów
29 graficznych opartych na specyfikacji OpenGL Shading Language (GLSL).
30
31 %package devel
32 Summary:        OpenGL Mathematics (GLM) - C++ mathematics library for GLSL (header files)
33 Summary(pl.UTF-8):      OpenGL Mathematics (GLM) - biblioteka matematyczna C++ dla GLSL (pliki nagłówkowe)
34 Group:          Development/Libraries
35 Requires:       libstdc++-devel
36 # no base dependency - can be used as header-only library
37 # not noarch due to paths in cmake configs
38
39 %description devel
40 OpenGL Mathematics (GLM) is a C++ mathematics library for graphics
41 software based on the OpenGL Shading Language (GLSL) specification.
42
43 %description devel -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
47 %prep
48 %setup -q -n glm-%{version}
49 %patch0 -p1
50
51 %build
52 mkdir build
53 cd build
54 # change CMAKE_INSTALL_DATAROOTDIR to arch-dependent (files contain arch-dependent libglm.so paths)
55 %cmake .. \
56         -DCMAKE_INSTALL_DATAROOTDIR=%{_libdir}/cmake \
57         -DGLM_TEST_ENABLE:BOOL=%{!?with_tests:OFF}%{?with_tests:ON}
58
59 %{__make}
60
61 %if %{with tests}
62 %{__make} test
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %{__make} -C build install \
69         DESTDIR=$RPM_BUILD_ROOT
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %post   -p /sbin/ldconfig
75 %postun -p /sbin/ldconfig
76
77 %files
78 %defattr(644,root,root,755)
79 %doc manual.md readme.md
80 %attr(755,root,root) %{_libdir}/libglm.so
81
82 %files devel
83 %defattr(644,root,root,755)
84 %doc manual.md readme.md
85 %{_includedir}/glm
86 %{_libdir}/cmake/glm
This page took 0.093757 seconds and 3 git commands to generate.