2022-07-07 02:37:44 +02:00
|
|
|
#
|
|
|
|
# spec file for package wasi-libc
|
|
|
|
#
|
2024-02-23 08:27:47 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2022-07-07 02:37:44 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: wasi-libc
|
2024-02-23 08:27:47 +01:00
|
|
|
Version: 21
|
2022-07-07 02:37:44 +02:00
|
|
|
Release: 0
|
2023-03-27 15:33:38 +02:00
|
|
|
Summary: WASI libc implementation for WebAssembly
|
2022-07-07 02:37:44 +02:00
|
|
|
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
|
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/WebAssembly/wasi-libc
|
2023-03-27 15:33:38 +02:00
|
|
|
Source: https://github.com/WebAssembly/wasi-libc/archive/refs/tags/wasi-sdk-%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2022-07-07 02:37:44 +02:00
|
|
|
Source1: wasi-libc-rpmlintrc
|
|
|
|
Patch1: workaround-broken-makefile.patch
|
2022-07-26 03:10:12 +02:00
|
|
|
BuildRequires: clang > 10
|
|
|
|
BuildRequires: llvm > 10
|
2023-03-27 15:33:38 +02:00
|
|
|
BuildArch: noarch
|
2022-07-07 02:37:44 +02:00
|
|
|
|
|
|
|
%description
|
2022-07-29 05:15:51 +02:00
|
|
|
WASI libc allows cross platform binaries to be created and executed on a variety of platforms
|
2022-07-07 02:37:44 +02:00
|
|
|
|
|
|
|
%prep
|
2024-02-21 08:24:07 +01:00
|
|
|
%autosetup -p1 -n wasi-libc-wasi-sdk-%{version}
|
2022-07-07 02:37:44 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CC=clang
|
2022-07-26 03:10:12 +02:00
|
|
|
export AR=llvm-ar
|
|
|
|
export NM=llvm-nm
|
2022-07-07 02:37:44 +02:00
|
|
|
%make_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
export CC=clang
|
2022-07-26 03:10:12 +02:00
|
|
|
export AR=llvm-ar
|
|
|
|
export NM=llvm-nm
|
2023-03-27 15:33:38 +02:00
|
|
|
# The makefile is stupid and compiles everything again if we do `make install`, so we
|
2022-07-07 02:37:44 +02:00
|
|
|
# do it only once
|
|
|
|
%make_install INSTALL_DIR="%{buildroot}/%{_datadir}/wasi-sysroot"
|
2022-07-26 03:10:12 +02:00
|
|
|
# brp-15-strip-debug and -ar call system-strip and ar, which are not wasm-aware, so they will break wasm-files
|
|
|
|
export NO_BRP_AR=true
|
|
|
|
export NO_BRP_STRIP_DEBUG=true
|
2022-07-07 02:37:44 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%{_datadir}/wasi-sysroot/
|
|
|
|
|
|
|
|
%changelog
|