summaryrefslogtreecommitdiffstats
path: root/graphene.spec
blob: 1324b07aeef4397f2a6f801652e78c4e1224139d (plain)
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
%global nsver 1.0

%global commit 8a7a4a39c63000ca5f41ddfce8ce80d792f6b9cc
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           graphene
Version:        1.5.1~git.7.%{shortcommit}
Release:        1%{?dist}
Summary:        A thin layer of types for graphic libraries

License:        MIT
URL:            https://github.com/ebassi/graphene
Source0:        %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
# https://github.com/ebassi/graphene/pull/78
Patch0001:      0001-build-install-tests-into-libexecdir.patch

BuildRequires:  gcc
BuildRequires:  meson
BuildRequires:  pkgconfig(gobject-2.0)

%description
Graphene provides a small set of mathematical types needed to implement
graphic libraries that deal with 2D and 3D transformations and projections.

%package devel
Summary:        Development libraries and header files for %{name}
Requires:       %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description devel
%{summary}.

%package tests
Summary:        Tests for %{name}
Requires:       %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description tests
The %{name}-tests package contains tests that can be used to verify
the functionality of the installed %{name} package.

%prep
%autosetup -n %{name}-%{commit} -p1

%build
# https://github.com/mesonbuild/meson/issues/1085
export LC_ALL=C.UTF-8
%meson
%meson_build

%install
%meson_install

%check
%meson_test

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%license LICENSE
%doc README.md CONTRIBUTING.md
%{_libdir}/libgraphene-%{nsver}.so.*
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Graphene-1.0.typelib

%files devel
%{_libdir}/libgraphene-%{nsver}.so
%{_libdir}/graphene-1.0/
%{_includedir}/graphene-%{nsver}/
%{_libdir}/pkgconfig/graphene-%{nsver}.pc
%{_libdir}/pkgconfig/graphene-gobject-%{nsver}.pc
%dir %{_datadir}/gir-1.0
%{_datadir}/gir-1.0/Graphene-%{nsver}.gir

%files tests
%dir %{_libexecdir}/installed-tests
%{_libexecdir}/installed-tests/graphene-%{nsver}/

%changelog