forked from WasmEdge/WasmEdge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwasmedge.spec.in
81 lines (71 loc) · 2.53 KB
/
wasmedge.spec.in
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
%global gittag @WASMEDGE_GIT_VERSION@
%global srpm_version @WASMEDGE_SRPM_VERSION@
%global reponame WasmEdge
%global capi_soname @WASMEDGE_CAPI_SOVERSION@
%global capi_version @WASMEDGE_CAPI_VERSION@
Name: wasmedge
Version: %{srpm_version}
Release: %autorelease
Summary: High performance WebAssembly Virtual Machine
#The entire source code is ASL 2.0 except LICENSE.spdx which is CC0
License: ASL 2.0 and CC0
URL: https://github.com/%{reponame}/%{reponame}
Source0: %{url}/releases/download/%{gittag}/%{reponame}-%{gittag}-src.tar.gz
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: lld-devel
BuildRequires: llvm-devel
BuildRequires: ninja-build
BuildRequires: spdlog-devel
Requires: llvm
#Currently wasmedge could only be built on specific arches
ExclusiveArch: x86_64 aarch64
Provides: %{reponame} = %{version}-%{release}
Provides: bundled(blake3) = 1.2.0
Provides: bundled(wasi-cpp-header) = 0.0.1
%description
High performance WebAssembly Virtual Machine
%package devel
Summary: %{reponame} development files
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: %{reponame}-devel = %{version}-%{release}
%description devel
This package contains necessary header files for %{reponame} development.
%prep
%autosetup -n %{name}
[ -f VERSION ] || echo -n %{gittag} > VERSION
%build
%cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DWASMEDGE_BUILD_TESTS=OFF
%cmake_build
%install
%cmake_install
mv %{buildroot}%{_libdir}/%{name}/lib%{name}Plugin%{reponame}Process.so %{buildroot}%{_libdir}/%{name}/lib%{name}Plugin%{reponame}Process.so.%{gittag}
ln -s lib%{name}Plugin%{reponame}Process.so.%{gittag} %{buildroot}%{_libdir}/%{name}/lib%{name}Plugin%{reponame}Process.so
%files
%license LICENSE LICENSE.spdx
%doc Changelog.md README.md SECURITY.md
%{_bindir}/wasmedge
%{_bindir}/wasmedgec
%{_libdir}/lib%{name}.so.%{capi_version}
%{_libdir}/lib%{name}.so.%{capi_soname}
%{_libdir}/lib%{name}.so
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/lib%{name}Plugin%{reponame}Process.so.%{gittag}
%files devel
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/enum.inc
%{_includedir}/%{name}/enum_configure.h
%{_includedir}/%{name}/enum_errcode.h
%{_includedir}/%{name}/enum_types.h
%{_includedir}/%{name}/int128.h
%{_includedir}/%{name}/version.h
%{_includedir}/%{name}/wasmedge.h
%{_libdir}/lib%{name}.so.%{capi_version}
%{_libdir}/lib%{name}.so.%{capi_soname}
%{_libdir}/lib%{name}.so
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/lib%{name}Plugin%{reponame}Process.so
%changelog
%autochangelog