-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglm.spec
92 lines (66 loc) · 2.79 KB
/
glm.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# The library consists of headers only
%global debug_package %{nil}
Name: glm
Version: 0.9.9.8
Release: 1%{?dist}
Summary: C++ mathematics library for graphics programming
License: MIT
URL: http://glm.g-truc.net/
Source0: https://github.com/g-truc/glm/releases/download/%{version}/%{name}-%{version}.zip
Source1: glm.pc.in
Source2: glmConfigVersion.cmake.in
Source3: glmConfig.cmake.in
Source4: glmTargets.cmake
%description
GLM is a C++ library for doing mathematics operations
required in many OpenGL based applications. Its interface
has been designed to resemble the built-in matrix and vector
types of the OpenGL shading language.
%package devel
Summary: C++ mathematics library for graphics programming
BuildArch: noarch
# As required in
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2
Provides: %{name}-static = %{version}-%{release}
%description devel
GLM is a C++ library for doing mathematics operations
required in many OpenGL based applications. Its interface
has been designed to resemble the built-in matrix and vector
types of the OpenGL shading language.
%{name}-devel is only required for building software that uses
the GLM library. Because GLM currently is a header-only library,
there is no matching run time package.
%package doc
Summary: Documentation for %{name}-devel
BuildArch: noarch
%description doc
The %{name}-doc package contains reference documentation and
a programming manual for the %{name}-devel package.
%prep
%autosetup -n glm
sed -i 's|/usr/lib/cmake|/usr/share/cmake|g' %{S:4}
%build
%install
mkdir -p %{buildroot}/usr/include/
cp -r glm %{buildroot}/usr/include/
# For some stupid reason, glm upstream removed the CMake install target here:
# https://github.com/g-truc/glm/commit/5f352ecce21bb1ab37fa56fac0f383c779b351a3
# There is no reasoning for it. Discussion here: https://github.com/g-truc/glm/issues/947
mkdir -p %{buildroot}/%{_libdir}/pkgconfig/
sed "s/@VERSION@/%{version}/" %{S:1} > %{buildroot}/%{_libdir}/pkgconfig/glm.pc
mkdir -p %{buildroot}/%{_datadir}/cmake/glm/
sed "s/@VERSION@/%{version}/" %{S:2} > %{buildroot}/%{_datadir}/cmake/glm/glmConfigVersion.cmake
sed "s/@VERSION@/%{version}/" %{S:3} > %{buildroot}/%{_datadir}/cmake/glm/glmConfig.cmake
install -Dm644 %{S:4} %{buildroot}/%{_datadir}/cmake/glm/glmTargets.cmake
%files devel
%doc readme.md
%{_includedir}/%{name}
%{_datadir}/cmake
%{_libdir}/pkgconfig/
%files doc
%doc doc
%changelog
* Wed May 25 2022 Unitedrpms Project <unitedrpms AT protonmail DOT com> 0.9.9.8-1
- Updated to 0.9.9.8
* Sat May 02 2020 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.6-3
- Remove arch check from glmConfigVersion.cmake, fix #1758009