]> git.armaanb.net Git - asd-repo.git/blobdiff - extra/ccache/build
zstd: move to junk
[asd-repo.git] / extra / ccache / build
index 638ebef026c0e17e6e6e699eddb0cd5c6e1ec489..9718a4b42cc7ddcaecf11549e4c528182f6a3455 100755 (executable)
@@ -1,5 +1,20 @@
 #!/bin/sh -e
 
+(
+    cd zstd
+    sed -i 's/^FLAGS.*=/FLAGS = -static /' programs/Makefile
+    
+    gmake \
+        HAVE_LZMA=0 \
+        HAVE_ZLIB=0 \
+        HAVE_LZ4=0
+    
+    gmake \
+        DESTDIR="$PWD/out" \
+        PREFIX=/usr \
+        install
+)
+
 export DESTDIR="$1"
 export CFLAGS="$CFLAGS -static"
 export CXXFLAGS="$CXXFLAGS -static"
@@ -9,7 +24,8 @@ cmake -B build \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DCMAKE_BUILD_TYPE=Release \
     -DENABLE_TESTING=OFF \
-    -DZSTD_LIBRARY=/usr/lib/libzstd.a
+    -DZSTD_INCLUDE_DIR="$PWD/zstd/out/usr/include/" \
+    -DZSTD_LIBRARY="$PWD/zstd/out/usr/lib/libzstd.a"
 
 cmake --build   build
 cmake --install build