diff options
author | CoprDistGit <infra@openeuler.org> | 2025-01-16 11:19:16 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-01-16 11:19:16 +0000 |
commit | 733185827b2b265818cf850bd1db0f8607a18982 (patch) | |
tree | 65540a56bda91dbd58432a615927a637ea34e979 /tbb.spec | |
parent | 3c1b1965decd85591d7ee5b3fea67422a285f6be (diff) |
automatic import of Ros-jazzy-tbbopeneuler24.03_LTS
Diffstat (limited to 'tbb.spec')
-rw-r--r-- | tbb.spec | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/tbb.spec b/tbb.spec new file mode 100644 index 0000000..857c2b8 --- /dev/null +++ b/tbb.spec @@ -0,0 +1,84 @@ +%global debug_package %{nil} + +Name: tbb +Version: 2021.11.0 +Release: 1%{?dist} +Summary: Intel oneAPI Threading Building Blocks (oneTBB) +License: Apache License 2.0 +URL: https://github.com/oneapi-src/oneTBB +Source0: %{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: hwloc-devel + +Requires: glibc +Requires: libstdc++-devel + +%description +Intel oneAPI Threading Building Blocks (oneTBB) is a library for parallel programming and concurrency in C++. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +Development files for Intel oneAPI Threading Building Blocks (oneTBB), including header files, CMake configuration, and pkg-config files. + +%prep +%autosetup -p1 -n oneTBB-%{version} + +%build +mkdir -p build +cd build +%cmake .. \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DTBB_TEST=OFF \ + -DTBB_STRICT=OFF \ + -DTBB_GENERATE_CONFIG=ON \ + -DTBB_INSTALL_CMAKE_DIR=%{_libdir}/cmake/TBB + +make -j$(nproc) + +%install +cd build +make install DESTDIR=%{buildroot} + +# 手动确保 CMake 配置文件正确安装 +if [ -f "TBBConfig.cmake" ] && [ -f "TBBConfigVersion.cmake" ]; then + mkdir -p %{buildroot}%{_libdir}/cmake/TBB + cp TBBConfig.cmake TBBConfigVersion.cmake %{buildroot}%{_libdir}/cmake/TBB/ +fi + +# 清理不需要的文件 +find %{buildroot} -name '*.la' -delete +find %{buildroot} -name '*.a' -delete +find %{buildroot} -name 'debugsourcefiles.list' -delete || true + +%files +%{_libdir}/libtbb.so.* +%{_libdir}/libtbbmalloc.so.* +%{_libdir}/libtbbmalloc_proxy.so.* +%{_libdir}/libtbbbind_2_5.so.* +%{_libdir}/libtbbmalloc.so +%{_libdir}/libtbbmalloc_proxy.so +%{_libdir}/libtbbbind_2_5.so + +%files devel +%{_libdir}/libtbb.so +%{_includedir}/tbb/ +%{_includedir}/oneapi/tbb.h +%{_includedir}/oneapi/tbb/ +%{_libdir}/cmake/TBB/ +%{_libdir}/pkgconfig/tbb.pc +%doc %{_datadir}/doc/TBB/README.md + +%changelog +* Fri Jan 5 2024 Sebastian <microseyuyu@gmail.com> - 2021.11.0-1 +- Explicitly included /usr/include/oneapi/tbb.h in files section. +- Fixed unpackaged file error for oneapi headers. +- Ensured proper CMake and pkg-config configurations. |