diff --git a/dmlc-core-v0.5.tar.gz b/dmlc-core-v0.5.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4ae14b2d186bef195e0c7162d0ac0ffd24da029a Binary files /dev/null and b/dmlc-core-v0.5.tar.gz differ diff --git a/xgboost-v1.4.1.tar.gz b/xgboost-v1.4.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..12a8bef753ff766112a6fe7aee96d87b2bf40fcb Binary files /dev/null and b/xgboost-v1.4.1.tar.gz differ diff --git a/xgboost.spec b/xgboost.spec new file mode 100644 index 0000000000000000000000000000000000000000..ec03fa656dcb48f9c0c8a064792a9405d9c0b013 --- /dev/null +++ b/xgboost.spec @@ -0,0 +1,72 @@ +%define dmlc_name dmlc-core +%define dmlc_version v0.5 +%define xgboost_name xgboost +%define xgboost_version v1.4.1 + +%define _debugsource_template %{nil} + +Name: xgboost +Version: 1.4.1 +Release: 1 +Summary: Scalable, Portable and Distributed Gradient Boosting Library +License: Apache-2.0 +URL: https://github.com/dmlc/xgboost +Source0: %{xgboost_name}-%{xgboost_version}.tar.gz +Source1: %{dmlc_name}-%{dmlc_version}.tar.gz + + +BuildRequires: cmake gcc gcc-c++ openssl-devel python tar +BuildRequires: cjson lz4-devel zstd-devel boost-devel cjson-devel +BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel krb5-devel + + +Patch01: disable-sse-for-riscv.patch +Patch02: disable-sse-for-loongarch64.patch + +%global _description \ +XGBoost is an optimized distributed gradient boosting library designed to be \ +highly efficient, flexible and portable. It implements machine learning \ +algorithms under the Gradient Boosting framework. XGBoost provides a parallel \ +tree boosting (also known as GBDT, GBM) that solve many data science problems \ +in a fast and accurate way. The same code runs on major distributed environment \ +(Kubernetes, Hadoop, SGE, MPI, Dask) and can solve problems beyond billions of \ +examples. + +%description %{_description} + +%prep +%setup -q -c -n %{name}-%{version} +%setup -q -D -T -a 1 + +%build +pushd %{xgboost_name}-%{version} + +sed -i '9a set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-z,now -fPIE -fPIC -fstack-protector-strong")' ./CMakeLists.txt +sed -i '10a set (CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -Wl,-z,now -fPIE -fPIC -fstack-protector-strong")' ./CMakeLists.txt +sed -i '11a set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,now -fPIE -fPIC -fstack-protector-strong")' ./CMakeLists.txt + +rm -rf dmlc-core +cp -r ../dmlc-core-0.5/ ./dmlc-core + +rm -rf build_install +mkdir build_install && cd build_install +cmake .. -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr +make -j8 +make install + +rm -rf %{buildroot}/usr/bin +popd + +%check + +%files +%doc +%defattr(644,root,root,-) +%{_prefix}/include/* + +%defattr(755,root,root,-) +%{_prefix}/lib64/* + +%changelog +* Thu Nov 7 2019 mengxian - 1.4.1-1 +- Init package