From e8d7b61ce7e3b602e30af529f0d6b8dc10ab17e3 Mon Sep 17 00:00:00 2001 From: Bo Ren Date: Wed, 30 Apr 2025 14:54:53 +0800 Subject: [PATCH] [BUG] Add devel package to #IC565O Add devel package Signed-off-by: Bo Ren --- llvm-compat.spec | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/llvm-compat.spec b/llvm-compat.spec index b8b1bb8..ff9ea10 100644 --- a/llvm-compat.spec +++ b/llvm-compat.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %global maj_ver 15 %global min_ver 0 %global patch_ver 7 @@ -73,6 +73,17 @@ Obsoletes: llvm-libs = %{version} %description libs Shared libraries for the LLVM compiler infrastructure. +%package devel +Summary: Libraries and header files for LLVM + +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description devel +This package contains library and header files needed to develop new native +programs that use the LLVM infrastructure. + + %prep %setup -T -q -b 2 -n cmake-%{version}.src cd .. @@ -113,6 +124,7 @@ pushd llvm-build %endif \ -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly;LoongArch" \ + -DLLVM_DISTRIBUTION_COMPONENTS="LLVM;libclang;llvm-config;llvm-headers;libclang-headers;cmake-exports;clang-cmake-exports;clang-headers;clang-cpp;clang-resource-headers" \ -DLLVM_ENABLE_LIBCXX:BOOL=OFF \ -DLLVM_ENABLE_ZLIB:BOOL=ON \ -DLLVM_ENABLE_FFI:BOOL=ON \ @@ -126,7 +138,7 @@ pushd llvm-build -DCMAKE_INSTALL_PREFIX=%{install_prefix} -DESTDIR=%{buildroot} %__ninja %__ninja_common_opts +DESTDIR=%{buildroot} %__ninja %__ninja_common_opts distribution popd @@ -136,7 +148,7 @@ find . -iname '*.a' -delete %install cd .. -DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 install-LLVM -C llvm-build +DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 install-LLVM -C llvm-build install-distribution mkdir -p %{buildroot}%{pkg_libdir} install llvm-build/lib/*.so.* %{buildroot}%{pkg_libdir} @@ -161,12 +173,28 @@ done %files libs %config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %{pkg_libdir}/libLLVM-%{maj_ver}.so +%{pkg_libdir}/libLLVM-%{version}.so %{pkg_libdir}/libclang*.so.* +%{pkg_libdir}/clang/%{maj_ver}/ %ifnarch %ix86 %{pkg_libdir}/libclang-cpp*.so.%{maj_ver} %endif +%files devel +%dir %{install_prefix}/bin/ +%{install_prefix}/include/ +%{install_prefix}/bin/llvm-config +%{pkg_libdir}/cmake/llvm/ +%{pkg_libdir}/cmake/clang/ +%{pkg_libdir}/libLLVM.so +%{pkg_libdir}/libclang-cpp.so +%{pkg_libdir}/libclang.so + + %changelog +* Wed Apr 30 2025 Bo Ren - 15.0.7-1.0.2 +- Add devel package + * Mon Dec 23 2024 Chen Li - 15.0.7-1.0.1 - Add support for LoongArch -- Gitee