diff --git a/llvm-compat.spec b/llvm-compat.spec index b8b1bb877102af044c568511979dc0dbb942f0fc..ff9ea10dd850d457e686b77f2af1b0f7086b8597 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