2005-12-20 18:17:30 -05:00
|
|
|
#!/bin/bash
|
2005-12-21 11:24:37 -05:00
|
|
|
|
2005-12-21 12:22:38 -05:00
|
|
|
if [ -f .nodepends ] ; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
root=$1
|
2005-12-21 11:24:37 -05:00
|
|
|
shift
|
|
|
|
|
2005-12-21 12:22:38 -05:00
|
|
|
|
|
|
|
install=
|
|
|
|
base=http://www.sofaswitch.com/mikej
|
|
|
|
|
2005-12-21 11:24:37 -05:00
|
|
|
if [ ! -z $1 ] && [ $1 = install ] ; then
|
|
|
|
install=1
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2005-12-21 12:22:38 -05:00
|
|
|
tar=$1
|
|
|
|
shift
|
|
|
|
|
|
|
|
cd $root/libs/.
|
|
|
|
CFLAGS=
|
|
|
|
LDFLAGS=
|
|
|
|
MAKEFLAGS=
|
2005-12-21 11:24:37 -05:00
|
|
|
|
|
|
|
if [ -d $tar ] ; then
|
|
|
|
uncompressed=$tar
|
|
|
|
tar=
|
|
|
|
else
|
|
|
|
uncompressed=`echo $tar | sed "s/\.tar\.gz//g"`
|
|
|
|
if [ ! -f $tar ] ; then
|
|
|
|
rm -fr $uncompressed
|
|
|
|
wget $base/$tar
|
|
|
|
if [ ! -f $tar ] ; then
|
|
|
|
echo cannot find $tar
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
tar -zxvf $tar
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2005-12-21 12:22:38 -05:00
|
|
|
if [ -f $uncompressed/.complete ] ; then
|
2005-12-20 18:17:30 -05:00
|
|
|
echo $uncompressed already installed
|
2005-12-22 17:17:25 -05:00
|
|
|
exit 0
|
2005-12-20 18:17:30 -05:00
|
|
|
fi
|
2005-12-21 11:24:37 -05:00
|
|
|
|
2005-12-20 18:17:30 -05:00
|
|
|
cd $uncompressed
|
2005-12-21 12:22:38 -05:00
|
|
|
make clean 2>&1
|
2005-12-21 17:25:22 -05:00
|
|
|
sh ./configure --prefix=/usr/local $@
|
2005-12-20 18:17:30 -05:00
|
|
|
|
2005-12-21 11:24:37 -05:00
|
|
|
if [ $? == 0 ] ; then
|
|
|
|
make
|
|
|
|
else
|
|
|
|
echo ERROR
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z $install ] ; then
|
|
|
|
make install
|
2005-12-21 12:22:38 -05:00
|
|
|
ldconfig 2>&1
|
2005-12-21 11:24:37 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $? == 0 ] ; then
|
|
|
|
touch .complete
|
|
|
|
else
|
|
|
|
echo ERROR
|
|
|
|
exit 1
|
|
|
|
fi
|
2005-12-20 18:17:30 -05:00
|
|
|
|
2005-12-21 11:24:37 -05:00
|
|
|
exit 0
|