llvm-libunwind/libunwind.spec
2023-02-20 09:53:37 +08:00

81 lines
1.9 KiB
RPMSpec

%global maj_ver 12
%global min_ver 0
%global patch_ver 1
%global debug_package %{nil}
Name: llvm-libunwind
Version: 12.0.1
Release: 1
Summary: LLVM "libunwind" runtime libraries
License: BSD
URL: http://llvm.org
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/libunwind-%{version}.src.tar.xz
Patch0: 0001-libunwind-standalone-build.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: python3
BuildRequires: llvm-devel
%description
The libunwind-devel package includes the libraries and header files for
libunwind.
%package devel
Summary: LLVM libunwind development files
Provides: libunwind(major) = %{maj_ver}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Static and unversioned shared libraries for LLVM libunwind
%prep
%autosetup -n libunwind-%{version}.src -p2
%build
mkdir -p _build
cd _build
cmake \
-DLLVM_CMAKE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLIBUNWIND_ENABLE_STATIC=OFF \
%if 0%{?__isa_bits} == 64
-DLLVM_LIBDIR_SUFFIX=64 \
%else
-DLLVM_LIBDIR_SUFFIX= \
%endif
..
%make_build
%install
cd _build
%make_install
# We can't install on default location because that would conflict with
# https://gitee.com/src-openeuler/libunwind
# ABI wise, even though llvm-libunwind's library is named libunwind, it doesn't
# have the exact same ABI has gcc's libunwind (it actually provides a subset).
mkdir -p %{buildroot}/%{_libdir}/llvm-unwind/
mv %{buildroot}%{_libdir}/libunwind* %{buildroot}/%{_libdir}/llvm-unwind/
%files
%license LICENSE.TXT
%dir %{_libdir}/llvm-unwind
%{_libdir}/llvm-unwind/libunwind.so.*
%files devel
%{_libdir}/llvm-unwind/libunwind.so
%changelog
* Tue Feb 7 2023 Wang Zehong <wangzehong2@huawei.com> - 12.0.1-1
- update to 12.0.1-1