From 7a3cfc965fd79783fbbf7e12fa7e998c8151ac7a Mon Sep 17 00:00:00 2001 From: Vadim Lebedev Date: Mon, 22 Aug 2022 14:42:45 +0200 Subject: [PATCH] Add shell script to build libarchive.so --- build-libarchive-lib.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 build-libarchive-lib.sh diff --git a/build-libarchive-lib.sh b/build-libarchive-lib.sh new file mode 100644 index 0000000..6965d5f --- /dev/null +++ b/build-libarchive-lib.sh @@ -0,0 +1,36 @@ +#!/usr/bin/bash + +function build_libarchive() { + tag=$1 + + dd=$PWD + cd /tmp + git clone https://github.com/libarchive/libarchive.git libarchive-src + cd libarchive-src; git checkout $tag + cd /tmp + mkdir build-libarchive; cd build-libarchive + cmake ../libarchive-src + make -j$(nproc); make install + cd $dd + +} + +function install_deps_centos() { + + yum install -y epel-release libxml2-devel libzstd-devel xz-devel bzip2-devel + yum install -y libacl-devel lz4-devel e2fsprogs-devel libb2-devel lzo-devel openssl-devel + yum install -y librichacl-devel swig strace cmake +} + +function install_deps_ubuntu() { + + apt-get install -y libxml2-dev libzstd-dev xz-dev bzip2-dev + apt-get install -y libacl1-dev liblz4-dev libext2fs-dev libb2-dev lzo-dev libssl-dev + apt-get install -y swig strace cmake +} + +os=$1 +tag=$2 +install_deps_$os +build_libarchive $tag +