2019-08-20 05:20:16 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2020-10-18 22:57:38 -06:00
|
|
|
export CFLAGS="$CFLAGS -static"
|
|
|
|
export CXXFLAGS="$CXXFLAGS -static"
|
2019-08-20 05:20:16 -06:00
|
|
|
|
2020-10-18 22:57:38 -06:00
|
|
|
cmake -B build \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2021-08-19 21:29:37 -06:00
|
|
|
-DREDIS_STORAGE_BACKEND=OFF \
|
2020-10-18 22:57:38 -06:00
|
|
|
-DENABLE_TESTING=OFF \
|
|
|
|
-DZSTD_LIBRARY=/usr/lib/libzstd.a
|
2019-08-20 05:20:16 -06:00
|
|
|
|
2020-10-18 22:57:38 -06:00
|
|
|
cmake --build build
|
|
|
|
cmake --install build
|
2019-08-20 05:20:16 -06:00
|
|
|
|
|
|
|
mkdir -p "$1/usr/lib/ccache/bin"
|
2020-03-08 15:05:16 -06:00
|
|
|
host=$(cc -dumpmachine)
|
2019-08-20 05:20:16 -06:00
|
|
|
|
2020-10-18 22:57:38 -06:00
|
|
|
for link in \
|
|
|
|
cc "$host-cc" \
|
|
|
|
gcc "$host-gcc" \
|
|
|
|
g++ "$host-g++" \
|
|
|
|
cpp "$host-cpp" \
|
|
|
|
c++ "$host-c++"
|
|
|
|
do
|
2019-08-20 05:20:16 -06:00
|
|
|
ln -sf /usr/bin/ccache "$1/usr/lib/ccache/bin/$link"
|
|
|
|
done
|