forked from travcunn/python-libarchive
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathbuild-libarchive-lib.sh
More file actions
36 lines (27 loc) · 898 Bytes
/
build-libarchive-lib.sh
File metadata and controls
36 lines (27 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/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