summaryrefslogtreecommitdiffstats
path: root/tools/install-deps
blob: 1b7b43330784ff5ee3bd798bd54f4a1f0bee9a6b (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash

set -xue

if [[ "$OSTYPE" =~ "linux" ]]; then
    if which apt-get && which dpkg; then
        # Debian or Ubuntu
        apt-get --yes install \
            autoconf automake autopoint bash bison bzip2 flex gettext\
            git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev \
            libtool libltdl-dev libssl-dev libxml-parser-perl make \
            openssl p7zip-full patch perl pkg-config python ruby scons \
            sed unzip wget xz-utils
        if ! [[ `uname -m` =~ "i686" ]]; then
            apt-get --yes install g++-multilib libc6-dev-i386
        fi
        # install bc to compare Debian releases
        apt-get --yes install bc
        DIST=`lsb_release -si`
        REL=`lsb_release -sr`
        if ( [[ $DIST =~ "Debian" ]] && (( `echo "$REL > 8" | bc -l` )) ) || \
            ( [[ $DIST =~ "Ubuntu" ]] && (( `echo "$REL > 14.10" | bc -l` )) ); then
            apt-get --yes install libtool-bin
        fi
        # install Lua for build-pkg
        apt-get --yes install lua5.1
    elif which yum; then
        # Fedora
        yum install \
            autoconf automake bash bison bzip2 flex gcc-c++ \
            gdk-pixbuf2-devel gettext git gperf intltool make \
            sed libffi-devel libtool openssl-devel p7zip patch \
            perl pkgconfig python ruby scons unzip wget xz
    elif which pacman-g2; then
        # Frugalware
        pacman-g2 -S \
            autoconf automake bash bzip2 bison flex gcc gdk-pixbuf2\
            gettext git gperf intltool make sed libffi libtool \
            openssl patch perl perl-xml-parser pkgconfig python \
            ruby scons unzip wget xz xz-lzma
    elif which emerge; then
        # Gentoo
        emerge \
            sys-devel/autoconf sys-devel/automake app-shells/bash \
            sys-devel/bison app-arch/bzip2 \
            sys-devel/flex sys-devel/gcc sys-devel/gettext \
            dev-vcs/git dev-util/gperf dev-util/intltool \
            sys-devel/make sys-apps/sed dev-libs/libffi \
            sys-devel/libtool dev-libs/openssl app-arch/p7zip \
            sys-devel/patch dev-lang/perl dev-perl/XML-Parser \
            dev-util/pkgconfig dev-lang/python dev-lang/ruby \
            dev-util/scons app-arch/unzip net-misc/wget \
            app-arch/xz-utils x11-libs/gdk-pixbuf
    elif which zypper; then
        # openSUSE
        zypper install -R \
            autoconf automake bash bison bzip2 flex gcc-c++ \
            gdk-pixbuf-devel gettext-tools git gperf intltool \
            libffi-devel libtool make openssl libopenssl-devel \
            p7zip patch perl perl-XML-Parser pkg-config python \
            ruby scons sed unzip wget xz
        if ! [[ `uname -m` =~ i686 ]]; then
            zypper install -R \
                gcc-32bit glibc-devel-32bit libgcc46-32bit \
                libgomp46-32bit libstdc++46-devel-32bit
        fi
    fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
    port install \
        autoconf automake bison coreutils flex gettext \
        gdk-pixbuf2 glib2 gnutar gsed intltool libffi libtool \
        openssl p5-xml-parser p7zip pkgconfig scons wget xz
elif [[ "$OSTYPE" == "freebsd"* ]]; then
    pkg install \
        automake autoconf bash bison coreutils flex \
        gcc gdk-pixbuf2 gettext git glib gmake gperf gsed intltool libffi \
        libtool openssl p5-XML-Parser p7zip patch perl5 \
        pkgconf python ruby scons unzip wget
    pkg install file
else
    echo "unknown: $OSTYPE"
    exit 1
fi