-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa5b0c2
commit b4aba31
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
CUR_DIR=$(dirname $(readlink -f "$0")) | ||
ROOT_DIR=$CUR_DIR/.. | ||
PROJECT_DIR=${1:-"$ROOT_DIR"} | ||
PROJECT_NAME=${2:-"devdeps-roaringbitmap-croaring"} | ||
VERSION=${3:-"3.0.0"} | ||
RELEASE=${4:-"0"} | ||
|
||
# check source code | ||
if [[ -z `find $ROOT_DIR -maxdepth 1 -regex ".*/CRoaring-3.0.0.*[tar|gz|bz2|xz|zip]$"` ]]; then | ||
echo "Download source code" | ||
wget https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/v3.0.0.tar.gz -O $ROOT_DIR/CRoaring-3.0.0.tar.gz | ||
fi | ||
|
||
# prepare building environment | ||
OS_RELEASE=$(grep -Po '(?<=release )\d' /etc/redhat-release) | ||
if [ "$(uname -m)" == "ppc64le" ];then | ||
echo "Now install obdevtools-cmake and obdevtools-gcc manually!" | ||
else | ||
wget http://mirrors.aliyun.com/oceanbase/OceanBase.repo -P /etc/yum.repos.d/ | ||
yum install obdevtools-cmake-3.22.1 -y | ||
yum install obdevtools-gcc9-9.3.0 -y | ||
fi | ||
|
||
export PATH=/usr/local/oceanbase/devtools/bin:$PATH | ||
|
||
ln -sf /usr/local/oceanbase/devtools/bin/g++ /usr/bin/c++ | ||
ln -sf /usr/local/oceanbase/devtools/bin/gcc /usr/bin/cc | ||
|
||
cd $CUR_DIR | ||
bash $CUR_DIR/rpmbuild.sh $PROJECT_DIR $PROJECT_NAME $VERSION $RELEASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Name: devdeps-roaringbitmap-croaring | ||
Version: 3.0.0 | ||
Release: %(echo $RELEASE)%{?dist} | ||
|
||
Summary: Roaring bitmaps are compressed bitmaps which tend to outperform conventional compressed bitmaps. | ||
|
||
License: Apache License 2.0 | ||
Url: https://github.com/RoaringBitmap/CRoaring/releases/tag/v3.0.0 | ||
AutoReqProv:no | ||
|
||
%undefine _missing_build_ids_terminate_build | ||
# disable check-buildroot | ||
%define __arch_install_post %{nil} | ||
%define _buliddir %{_topdir}/BUILD | ||
%define _tmppath %{_buliddir}/_tmp | ||
%define _prefix /usr/local/oceanbase/deps/devel | ||
%define _RoaringBitmap CRoaring-3.0.0 | ||
%define debug_package %{nil} | ||
|
||
%description | ||
Roaring bitmaps are compressed bitmaps which tend to outperform conventional compressed bitmaps. | ||
|
||
%install | ||
mkdir -p %{buildroot}/%{_prefix}/lib/ | ||
mkdir -p %{buildroot}/%{_prefix}/include/ | ||
cd $OLDPWD/../ | ||
rm -rf %{_RoaringBitmap} | ||
tar -zxf %{_RoaringBitmap}.tar.gz | ||
cd %{_RoaringBitmap} | ||
mkdir -p build | ||
cd build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=%{_tmppath} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=%{_tmppath} -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DROARING_DISABLE_AVX512=ON -DENABLE_ROARING_TESTS=OFF -DROARING_USE_CPM=OFF | ||
cmake --build . | ||
|
||
cp -r ../include/roaring/ %{buildroot}/%{_prefix}/include/ | ||
cp -r ../cpp/* %{buildroot}/%{_prefix}/include/roaring/ | ||
cp src/*.a %{buildroot}/%{_prefix}/lib/ | ||
|
||
%files | ||
|
||
%defattr(-,root,root) | ||
|
||
%{_prefix} | ||
|
||
%post -p /sbin/ldconfig | ||
%postun -p /sbin/ldconfig | ||
|
||
%changelog | ||
* Mon Mar 25 2024 oceanbase | ||
- roaringbitmap-croaring 3.0.0 | ||
|