From 72c394864e3c62f13580b237b44bc85461e9fdc9 Mon Sep 17 00:00:00 2001 From: yuanhui Date: Sat, 15 Apr 2023 16:31:34 +0800 Subject: [PATCH] Optimize the spec file Signed-off-by: yuanhui --- lldb.spec | 75 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/lldb.spec b/lldb.spec index 7ed1569..e72ee67 100644 --- a/lldb.spec +++ b/lldb.spec @@ -1,45 +1,34 @@ -%define anolis_release 1 -%global toolchain clang +%define anolis_release 2 +%global toolchain clang %undefine _include_frame_pointers -%global lldb_version 16.0.1 -%global lldb_srcdir %{name}-%{lldb_version}.src -%global cmake_srcdir cmake-%{lldb_version}.src - Name: lldb -Version: %{lldb_version} +Version: 16.0.1 Release: %{anolis_release}%{?dist} Summary: Next generation high-performance debugger License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{lldb_version}/%{lldb_srcdir}.tar.xz -Patch0: 0001-lldb-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch - -BuildRequires: clang -BuildRequires: cmake -BuildRequires: ninja-build -BuildRequires: llvm-devel = %{version} -BuildRequires: llvm-test = %{version} -BuildRequires: clang-devel = %{version} -BuildRequires: ncurses-devel -BuildRequires: swig -BuildRequires: llvm-static = %{version} -BuildRequires: libffi-devel -BuildRequires: zlib-devel -BuildRequires: libxml2-devel -BuildRequires: libedit-devel -BuildRequires: python3-lit -BuildRequires: doxygen +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz + +Patch0: 0001-lldb-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch + +BuildRequires: ninja-build clang cmake +BuildRequires: llvm-static = %{version} llvm-devel = %{version} llvm-test = %{version} +BuildRequires: clang-devel = %{version} swig +BuildRequires: libffi-devel libxml2-devel libedit-devel +BuildRequires: zlib-devel python3-lit ncurses-devel doxygen Requires: python3-lldb = %{version} %description -LLDB is a next generation, high-performance debugger. It is built as a set -of reusable components which highly leverage existing libraries in the -larger LLVM Project, such as the Clang expression parser and LLVM -disassembler. +LLDB is a next generation, high-performance debugger. It is built as a set of reusable components +which highly leverage existing libraries in the larger LLVM Project, such as the Clang expression +parser and LLVM disassembler. + +LLDB is the default debugger in Xcode on macOS and supports debugging C, Objective-C and C++ on +the desktop and iOS devices and simulator. %package devel Summary: Development header files for LLDB @@ -51,16 +40,23 @@ The package contains header files for the LLDB debugger. %package -n python3-lldb %{?python_provide:%python_provide python3-lldb} Summary: Python module for LLDB -BuildRequires: python3-devel -BuildRequires: python3-setuptools -Requires: python3-six +BuildRequires: python3-devel python3-setuptools Requires: %{name} = %{version}-%{release} +Requires: python3-six %description -n python3-lldb The package contains the LLDB Python module. +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + %prep -%autosetup -n %{lldb_srcdir} -p2 +%autosetup -n %{name}-%{version}.src -p2 %build %global _lto_cflags -flto=thin @@ -92,7 +88,6 @@ The package contains the LLDB Python module. # remove static libraries rm -fv %{buildroot}%{_libdir}/*.a - # python: fix binary libraries location liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so @@ -101,11 +96,17 @@ ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so # remove bundled six.py rm -f %{buildroot}%{python3_sitearch}/six.* +%generate_compatibility_deps + %files %license LICENSE.TXT +%dir %{abidir} %{_bindir}/lldb* +%{abidir}/lldb*-option.list %{_libdir}/liblldb.so.* +%{abidir}/liblldb.dump %{_libdir}/liblldbIntelFeatures.so.* +%{abidir}/liblldbIntelFeatures.dump %files devel %{_includedir}/lldb @@ -114,7 +115,13 @@ rm -f %{buildroot}%{python3_sitearch}/six.* %files -n python3-lldb %{python3_sitearch}/lldb +%files doc +%doc CODE_OWNERS.txt + %changelog +* Sat Apr 15 2023 yuanhui - 16.0.1-2 +- Optimize the spec file + * Fri Apr 14 2023 Funda Wang - 16.0.1-1 - New version 16.0.1 -- Gitee