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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
|
#!/bin/bash
# This script needs to be run with root rights.
if [ $UID -ne 0 ]; then
sudo $0
exit 0
fi
function printNotSupportedMessageAndExit() {
echo
echo "Currently this script only works for distributions supporting apt-get and yum."
echo "Please add support for your distribution: http://webkit.org/b/110693"
echo
exit 1
}
function checkInstaller {
# apt-get - Debian based distributions
apt-get --version &> /dev/null
if [ $? -eq 0 ]; then
installDependenciesWithApt
exit 0
fi
# yum - Fedora
yum --version &> /dev/null
if [ $? -eq 0 ]; then
installDependenciesWithYum
exit 0
fi
printNotSupportedMessageAndExit
}
function installDependenciesWithApt {
# These are dependencies necessary for building WebKitGTK+.
apt-get install \
autoconf \
automake \
autopoint \
autotools-dev \
bison \
flex \
gail-3.0 \
gawk \
gnome-common \
gperf \
gtk-doc-tools \
intltool \
libatk1.0-dev \
libenchant-dev \
libfaad-dev \
libgail-3-dev \
libgail-dev \
libgeoclue-dev \
libgirepository1.0-dev \
libgl1-mesa-dev \
libgl1-mesa-glx \
libgnutls-dev \
libgudev-1.0-dev \
libicu-dev \
libjpeg62-dev \
libmpg123-dev \
libopus-dev \
libpango1.0-dev \
libpng12-dev \
libpulse-dev \
librsvg2-dev \
libsecret-1-dev \
libsqlite3-dev \
libtheora-dev \
libtool \
libvorbis-dev \
libwebp-dev \
libxslt1-dev \
libxt-dev \
libxtst-dev \
ruby
# These are dependencies necessary for running tests.
apt-get install \
apache2 \
curl \
libapache2-mod-bw \
libapache2-mod-php5 \
libgpg-error-dev \
pulseaudio-utils \
python-gi \
ruby
# These are dependencies necessary for building the jhbuild.
apt-get install \
gobject-introspection \
icon-naming-utils \
libegl1-mesa-dev \
libgcrypt11-dev \
libgpg-error-dev \
libp11-kit-dev \
libtiff4-dev \
libcroco3-dev \
ragel \
xutils-dev \
xtrans-dev \
libxfont-dev \
libpciaccess-dev \
x11proto-bigreqs-dev \
x11proto-gl-dev \
x11proto-input-dev \
x11proto-video-dev \
x11proto-scrnsaver-dev \
x11proto-resource-dev \
x11proto-xcmisc-dev \
x11proto-xf86dri-dev \
libxkbfile-dev
}
function installDependenciesWithYum {
# These are dependencies necessary for building WebKitGTK+.
yum install \
autoconf \
automake \
bison \
atk-devel \
cairo-devel \
enchant-devel \
flex \
fontconfig-devel \
freetype-devel \
gcc-c++ \
geoclue-devel \
gettext-devel \
gobject-introspection-devel \
gperf \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
gtk2-devel \
gtk3-devel \
gtk-doc \
harfbuzz-devel \
libsoup-devel \
libicu-devel \
libjpeg-turbo-devel \
libpng-devel \
libsecret-devel \
libwebp-devel \
libxslt-devel \
libXt-devel \
libXtst-devel \
libgudev1-devel \
mesa-libGL-devel \
pcre-devel \
ruby \
sqlite-devel \
perl-Switch \
perl-version \
python-devel
# These are dependencies necessary for running tests.
yum install \
httpd \
curl \
mod_bw \
libgpg-error-devel \
pulseaudio-utils \
pygobject3-base \
ruby
# These are dependencies necessary for building the jhbuild.
yum install \
gobject-introspection \
icon-naming-utils \
libgcrypt-devel \
libgpg-error-devel \
libp11-devel \
libtiff-devel \
libcroco-devel \
mesa-libEGL-devel \
ragel \
xorg-x11-util-macros \
xorg-x11-xtrans-devel \
xorg-x11-proto-devel \
libXfont-devel \
libxkbfile-devel \
libpciaccess-devel
}
checkInstaller
|