-
Notifications
You must be signed in to change notification settings - Fork 201
/
gramine.spec
141 lines (113 loc) · 3.5 KB
/
gramine.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Copyright (c) 2021-2022 Wojtek Porczyk <woju@invisiblethingslab.com>
# .el8 has sphinx 1.8 which is too old
%global has_supported_sphinx 0%{?rhel} >= 9
Name: gramine
Version: 1.8post~UNRELEASED
Release: 1%{?dist}
Group: Development Tools
Summary: A lightweight usermode guest OS designed to run a single Linux application
License: LGPLv3+
URL: https://gramineproject.io
BuildArch: x86_64
Source0: %{name}-%{version}.tar.gz
BuildRequires: bison
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: jq
BuildRequires: make
BuildRequires: meson >= 0.56
BuildRequires: ninja-build >= 1.8
BuildRequires: nasm
BuildRequires: patch
BuildRequires: perl
BuildRequires: protobuf-c-compiler
BuildRequires: protobuf-c-devel
BuildRequires: python3-devel
%if %{has_supported_sphinx}
BuildRequires: python3-sphinx >= 3.4
BuildRequires: python3-sphinx_rtd_theme
%endif
Requires: python3-click >= 6.7
Requires: python3-cryptography >= 3.1
Requires: python3-jinja2
Requires: python3-protobuf
Requires: python3-pyelftools
Requires: python3-tomli >= 1.1.0
Requires: python3-tomli-w >= 0.4.0
Requires: python3-voluptuous
%global debug_package %{nil}
%global __meson_auto_features disabled
# clear the environment; see https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/macros
%define build_cflags %{nil}
%define build_cxxflags %{nil}
%define build_fflags %{nil}
%define build_ldflags %{nil}
%description
A lightweight usermode guest OS designed to run a single Linux application
%prep
%setup -q
%build
unset PKG_CONFIG_PATH
%meson \
--buildtype=release \
-Ddirect=enabled \
-Dsgx=enabled \
-Dsgx_driver=upstream
# assert correct version
if ! test "$(meson introspect --projectinfo "%{_vpath_builddir}" | jq -r .version)" = %{version}
then
echo mismatched version: make sure that version in gramine.spec matches meson.build >&2
exit 1
fi
%meson_build
%if %{has_supported_sphinx}
%__make -C Documentation SPHINXOPTS=-tpkg_only man
%endif
%install
%meson_install
%if %{has_supported_sphinx}
install -d %{buildroot}/%{_mandir}/man1
install -t %{buildroot}/%{_mandir}/man1 Documentation/_build/man/*.1
%endif
install -d %{buildroot}/%{_licensedir}/%{name}
install -t %{buildroot}/%{_licensedir}/%{name} LICENSE*.txt
%files
%{_bindir}/%{name}-*
%{_bindir}/is-sgx-available
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/direct
%{_libdir}/%{name}/direct/libpal.so
%{_libdir}/%{name}/direct/loader
%dir %{_libdir}/%{name}/sgx
%{_libdir}/%{name}/sgx/libpal.so
%{_libdir}/%{name}/sgx/loader
%{_libdir}/%{name}/libsysdb.so
%dir %{_libdir}/%{name}/runtime
%{_libdir}/%{name}/runtime/glibc
%{_libdir}/pkgconfig/mbedtls_%{name}.pc
%{_libdir}/pkgconfig/ra_tls_%{name}.pc
%{_libdir}/pkgconfig/secret_prov_%{name}.pc
%{_libdir}/libmbed{crypto,tls,x509}_%{name}.{so*,a}
%{_libdir}/libcbor.a
%{_libdir}/libra_tls*.so*
%{_libdir}/libra_tls_verify.a
%{_libdir}/libsecret_prov*.so*
%{_libdir}/libsecret_prov_verify.a
%{_libdir}/libsgx_util.a
%dir %{python3_sitearch}/%{name}libos
%{python3_sitearch}/%{name}libos/*.py
%{python3_sitearch}/%{name}libos/__pycache__
%dir %{python3_sitearch}/%{name}libos.dist-info
%{python3_sitearch}/%{name}libos.dist-info/METADATA
%{python3_sitearch}/%{name}libos.dist-info/entry_points.txt
%{python3_sitearch}/_%{name}libos_offsets.py
%{python3_sitearch}/__pycache__
%{_includedir}/gramine/*.h
%{_includedir}/gramine/mbedtls/*.h
%{_includedir}/gramine/psa/*.h
%if %{has_supported_sphinx}
%{_mandir}/man1/%{name}-*.1*
%{_mandir}/man1/is-sgx-available.1*
%endif
%doc %{_licensedir}/%{name}/LICENSE*.txt