5 # Install build dependencies; TODO: Support systems that do not use apt-get (Pull Requests welcome!)
8 if [ "$ARCH" == "i686" ]; then
13 # Install dependencies for openSUSE
14 if [ -e /usr
/bin
/zypper
] ; then
16 sudo zypper
in -y build git-core gcc g
++ wget
make glibc-devel glib2-devel libarchive-devel \
17 fuse fuse-devel zlib-devel
patch cairo-devel zsync desktop-file-utils cmake
18 #for some reason openSUSE Tumbleweed have apt-get.
22 if [ -e /usr
/bin
/apt-get
] ; then
24 sudo apt-get
-y install zsync git libarchive-dev autoconf libtool
make gcc g
++ libtool libfuse-dev \
25 liblzma-dev libglib2.0
-dev libssl-dev libinotifytools0-dev liblz4-dev libcairo-dev desktop-file-utils cmake
26 # libtool-bin might be required in newer distributions but is not available in precise
27 test -e /usr
/lib
/$ARCH-linux-gnu/pkgconfig
/liblz4.pc ||
28 sudo
cp -v resources
/liblz4.pc
/usr
/lib
/$ARCH-linux-gnu/pkgconfig
/
29 if cat /etc
/lsb-release |
grep 14.04 2>&1 >/dev
/null
; then
30 export CMAKE_VERSION
=3.10.0
31 # sometimes, using a crowbar is easier than fiddling with PPAs
32 wget https
://cmake.org
/files
/v3.10
/cmake-
"$CMAKE_VERSION"-Linux-x86_64.
tar.gz
-O- |
tar xz
--strip-components=1 -C /usr
/local
36 if [ -e /usr
/bin
/yum
] ; then
37 # Install and enable EPEL and Devtoolset-4 by Software Collections
38 # https://www.softwarecollections.org/en/scls/rhscl/devtoolset-4/
39 if [ "$ARCH" == "x86_64" ]; then
40 yum
-y install centos-release-scl-rh epel-release
41 yum
-y install devtoolset-4-gcc.
$ARCH devtoolset-4-gcc-c
++.
$ARCH
44 # Install and enable Autotools by Pavel Raiskup
45 # https://www.softwarecollections.org/en/scls/praiskup/autotools/
46 rpm
-ivh https
://www.softwarecollections.org
/en
/scls
/praiskup
/autotools
/epel-6-
$ARCH/download
/praiskup-autotools-epel-6-
$ARCH.noarch.rpm
47 yum
-y install autotools-latest
# 19 MB
49 if [ "$ARCH" == "x86_64" ]; then
50 rpm
-ivh https
://github.com
/kikitux
/blog
/raw
/master
/zsync
/zsync-0.6
.2-1.el6.rf.x86_64.rpm
52 if [ "$ARCH" == "i386" ]; then
53 rpm
-ivh https
://github.com
/kikitux
/blog
/raw
/master
/zsync
/zsync-0.6
.2-1.el6.rf.i686.rpm
56 yum
-y install epel-release
57 yum
-y install git wget
make binutils fuse glibc-devel glib2-devel libarchive3-devel fuse-devel zlib-devel
patch openssl-static openssl-devel vim-common cairo-devel desktop-file-utils libtool
# inotify-tools-devel lz4-devel
59 export AUTOMAKE_VERSION
=1.15 AUTOCONF_VERSION
=2.69 CMAKE_VERSION
=3.10.0
60 wget https
://raw.githubusercontent.com
/AppImage
/AppImageBuild
/master
/build-automake.sh
-O- | bash
61 wget https
://raw.githubusercontent.com
/AppImage
/AppImageBuild
/master
/build-autoconf.sh
-O- | bash
62 wget https
://cmake.org
/files
/v3.10
/cmake-
"$CMAKE_VERSION"-Linux-x86_64.
tar.gz
-O- |
tar xz
--strip-components=1 -C /usr
65 # Install dependencies for Arch Linux
66 if [ -e /usr
/bin
/pacman
] ; then
67 echo "Checking arch package provides and installed packages"
68 declare -a arr
=("zsync" "git" "libarchive" "autoconf" "libtool" "fuse2" "xz" "glib2" "openssl"
69 "inotify-tools" "lz4" "gcc" "cmake" "wget" "vim" "desktop-file-utils" "cairo")
72 if [ ! "$(package-query -Q $i || package-query --qprovides $i -Q)" ]; then
73 TO_INSTALL
="$TO_INSTALL $i"
76 if [ "$TO_INSTALL" ]; then
77 echo "Found the following missing packages:$TO_INSTALL, installing now"
78 sudo pacman
-S --needed $TO_INSTALL