2011-09-10 00:19:06 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-11-19 21:44:13 +00:00
|
|
|
[ -z "${PREFIX}" ] && PREFIX=/usr
|
|
|
|
|
2011-09-10 00:19:06 +00:00
|
|
|
# find root
|
2015-06-17 02:19:48 +00:00
|
|
|
cd "$(dirname "$PWD/$0")"
|
2014-11-20 09:06:09 +00:00
|
|
|
. ./CONFIG
|
2011-09-10 00:19:06 +00:00
|
|
|
|
|
|
|
mkdir -p _work
|
|
|
|
cd _work
|
|
|
|
|
2015-04-17 19:56:01 +00:00
|
|
|
ccache --help > /dev/null 2>&1
|
2011-09-12 01:01:07 +00:00
|
|
|
if [ $? = 0 ]; then
|
|
|
|
[ -z "${CC}" ] && CC=gcc
|
|
|
|
CC="ccache ${CC}"
|
|
|
|
export CC
|
|
|
|
fi
|
|
|
|
|
2016-05-19 02:11:10 +00:00
|
|
|
#valac --help > /dev/null 2>&1
|
|
|
|
#if [ ! $? = 0 ]; then
|
2011-09-10 00:19:06 +00:00
|
|
|
# must install from tarball
|
2016-05-19 02:12:19 +00:00
|
|
|
VV=0.32.0
|
2011-09-10 00:19:06 +00:00
|
|
|
SV=$(echo ${VV}|cut -d . -f 1,2)
|
|
|
|
if [ ! -d vala-${VV} ]; then
|
2016-05-19 02:12:19 +00:00
|
|
|
wget "http://download.gnome.org/sources/vala/${SV}/vala-${VV}.tar.xz"
|
|
|
|
tar xJvf vala-${VV}.tar.xz
|
2011-09-10 00:19:06 +00:00
|
|
|
fi
|
2015-06-17 02:19:48 +00:00
|
|
|
cd vala-${VV} || exit 1
|
2016-05-19 02:11:10 +00:00
|
|
|
./configure --prefix="${PREFIX}" || exit 1
|
|
|
|
make || exit 1
|
|
|
|
sudo make install || exit 1
|
2011-09-10 00:19:06 +00:00
|
|
|
cd ..
|
2016-05-19 02:11:10 +00:00
|
|
|
#fi
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
# git install
|
2011-09-10 00:19:06 +00:00
|
|
|
|
|
|
|
if [ -d vala ]; then
|
|
|
|
cd vala
|
2011-09-12 01:01:07 +00:00
|
|
|
#sudo make uninstall
|
2011-09-10 00:19:06 +00:00
|
|
|
git pull
|
|
|
|
else
|
|
|
|
git clone git://git.gnome.org/vala
|
2011-09-12 01:01:07 +00:00
|
|
|
cd vala
|
2011-09-10 00:19:06 +00:00
|
|
|
fi
|
2014-11-19 21:44:13 +00:00
|
|
|
sh autogen.sh --prefix="${PREFIX}" && \
|
2011-09-10 00:32:48 +00:00
|
|
|
make -j 4 && \
|
2011-09-10 00:19:06 +00:00
|
|
|
sudo make install
|
|
|
|
cd ..
|