You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
898 B

  1. #!/usr/bin/bash
  2. function build_libarchive() {
  3. tag=$1
  4. dd=$PWD
  5. cd /tmp
  6. git clone https://github.com/libarchive/libarchive.git libarchive-src
  7. cd libarchive-src; git checkout $tag
  8. cd /tmp
  9. mkdir build-libarchive; cd build-libarchive
  10. cmake ../libarchive-src
  11. make -j$(nproc); make install
  12. cd $dd
  13. }
  14. function install_deps_centos() {
  15. yum install -y epel-release libxml2-devel libzstd-devel xz-devel bzip2-devel
  16. yum install -y libacl-devel lz4-devel e2fsprogs-devel libb2-devel lzo-devel openssl-devel
  17. yum install -y librichacl-devel swig strace cmake
  18. }
  19. function install_deps_ubuntu() {
  20. apt-get install -y libxml2-dev libzstd-dev xz-dev bzip2-dev
  21. apt-get install -y libacl1-dev liblz4-dev libext2fs-dev libb2-dev lzo-dev libssl-dev
  22. apt-get install -y swig strace cmake
  23. }
  24. os=$1
  25. tag=$2
  26. install_deps_$os
  27. build_libarchive $tag