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