Add devel package

Resolves: RHEL-51801
This commit is contained in:
Tom Stellard 2024-07-30 13:27:33 -07:00
parent 6c220cb51b
commit f44a518aeb

View File

@ -1,7 +1,7 @@
%global maj_ver 17
%global min_ver 0
%global patch_ver 6
%global baserelease 1
%global baserelease 2
# Limit build jobs on ppc64 systems to avoid running out of memory.
%global _smp_mflags -j8
@ -67,6 +67,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 ..
@ -108,6 +119,7 @@ pushd llvm-build
%endif
\
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly" \
-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 \
@ -121,15 +133,14 @@ pushd llvm-build
-DCMAKE_INSTALL_PREFIX=%{install_prefix}
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts distribution
popd
%install
cd ..
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 -C llvm-build \
install-LLVM install-libclang install-clang-cpp
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 -C llvm-build install-distribution
# Create ld.so.conf.d entry
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
@ -137,10 +148,6 @@ cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
%{pkg_libdir}
EOF
# Remove unversioned symlinks
rm -Rf %{buildroot}%{pkg_libdir}/libclang.so
rm -Rf %{buildroot}%{pkg_libdir}/libclang-cpp.so
%check
%post libs -p /sbin/ldconfig
@ -151,9 +158,24 @@ rm -Rf %{buildroot}%{pkg_libdir}/libclang-cpp.so
%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}/
%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
* Tue Jul 30 2024 Tom Stellard <tstellar@redhat.com> - 17.0.6-2
- Add devel package
* Fri Apr 19 2024 Tom Stellard <tstellar@redhat.com> - 17.0.6-1
- 17.0.6 Release