repo/extra/ccache/build

28 lines
543 B
Plaintext
Raw Normal View History

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