X11rdp: update buildx.sh to pull files from server1.xrdp.org

This commit is contained in:
Jay Sorg 2014-09-04 06:32:42 -07:00
parent 64e2291274
commit 4fe4b436d7

View File

@ -1,7 +1,8 @@
#!/bin/sh #!/bin/sh
# build.sh: a script for building X11R7.6 X server for use with xrdp # # buildx.sh: a script for building X11R7.6 X server for use with xrdp
# Copyright 2011-2012 Jay Sorg Jay.Sorg@gmail.com #
# Copyright 2011-2013 Jay Sorg Jay.Sorg@gmail.com
# #
# Authors # Authors
# Jay Sorg Jay.Sorg@gmail.com # Jay Sorg Jay.Sorg@gmail.com
@ -24,107 +25,27 @@
download_file() download_file()
{ {
local file url status
file=$1 file=$1
# if we already have the file, don't re-download it # if we already have the file, don't download it
if [ -r downloads/$file ]; then if [ -r downloads/$file ]; then
return 0 return 0
fi fi
echo "downloading file $download_url/$file"
cd downloads cd downloads
echo "downloading file $file"
if [ "$file" = "pixman-0.15.20.tar.bz2" ]; then
wget -cq http://ftp.x.org/pub/individual/lib/$file
status=$?
cd ..
return $status
elif [ "$file" = "libdrm-2.4.26.tar.bz2" ]; then
wget -cq http://dri.freedesktop.org/libdrm/$file
status=$?
cd ..
return $status
elif [ "$file" = "MesaLib-7.10.3.tar.bz2" ]; then
wget -cq ftp://ftp.freedesktop.org/pub/mesa/7.10.3/$file
status=$?
cd ..
return $status
elif [ "$file" = "expat-2.0.1.tar.gz" ]; then
wget -cq http://server1.xrdp.org/xrdp/expat-2.0.1.tar.gz
status=$?
cd ..
return $status
elif [ "$file" = "freetype-2.4.6.tar.bz2" ]; then
wget -cq http://download.savannah.gnu.org/releases/freetype/freetype-2.4.6.tar.bz2
status=$?
cd ..
return $status
elif [ "$file" = "xkeyboard-config-2.0.tar.bz2" ]; then
wget -cq http://www.x.org/releases/individual/data/xkeyboard-config/xkeyboard-config-2.0.tar.bz2
status=$?
cd ..
return $status
elif [ "$file" = "makedepend-1.0.3.tar.bz2" ]; then
wget -cq http://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.3.tar.bz2
status=$?
cd ..
return $status
elif [ "$file" = "libxml2-sources-2.7.8.tar.gz" ]; then
wget -cq ftp://ftp.xmlsoft.org/libxml2/libxml2-sources-2.7.8.tar.gz
status=$?
cd ..
return $status
elif [ "$file" = "Python-2.5.tar.bz2" ]; then
wget -cq http://www.python.org/ftp/python/2.5/Python-2.5.tar.bz2
status=$?
cd ..
return $status
elif [ "$file" = "Python-2.7.tar.bz2" ]; then
wget -cq http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2
status=$?
cd ..
return $status
elif [ "$file" = "expat-2.0.1.tar.gz" ]; then
wget -cq http://server1.xrdp.org/xrdp/expat-2.0.1.tar.gz
status=$?
cd ..
return $status
elif [ "$file" = "cairo-1.8.8.tar.gz" ]; then
wget -cq http://server1.xrdp.org/xrdp/cairo-1.8.8.tar.gz
status=$?
cd ..
return $status
elif [ "$file" = "libpng-1.2.46.tar.gz" ]; then
wget -cq http://server1.xrdp.org/xrdp/libpng-1.2.46.tar.gz
status=$?
cd ..
return $status
elif [ "$file" = "intltool-0.41.1.tar.gz" ]; then
wget -cq http://launchpad.net/intltool/trunk/0.41.1/+download/intltool-0.41.1.tar.gz
status=$?
cd ..
return $status
elif [ "$file" = "libxslt-1.1.26.tar.gz" ]; then
wget -cq ftp://xmlsoft.org/libxslt/libxslt-1.1.26.tar.gz
status=$?
cd ..
return $status
elif [ "$file" = "fontconfig-2.8.0.tar.gz" ]; then
wget -cq http://server1.xrdp.org/xrdp/fontconfig-2.8.0.tar.gz
status=$?
cd ..
return $status
else
wget -cq $download_url/$file wget -cq $download_url/$file
status=$? status=$?
cd .. cd ..
return $status return $status
fi
} }
remove_modules() remove_modules()
{ {
local mod_file mod_dir mod_args
if [ -d cookies ]; then if [ -d cookies ]; then
rm cookies/* rm cookies/*
fi fi
@ -136,21 +57,15 @@ remove_modules()
exit 0 exit 0
fi fi
cd build_dir while IFS=: read mod_file mod_dir mod_args
while read line
do do
mod_dir=`echo $line | cut -d':' -f2` (cd build_dir; [ -d $mod_dir ] && rm -rf $mod_dir)
if [ -d $mod_dir ]; then done < $data_file
rm -rf $mod_dir
fi
done < ../$data_file
cd ..
} }
extract_it() extract_it()
{ {
local mod_file mod_name mod_args comp
mod_file=$1 mod_file=$1
mod_name=$2 mod_name=$2
mod_args=$3 mod_args=$3
@ -160,8 +75,8 @@ extract_it()
fi fi
# download file # download file
download_file $mod_file if ! download_file $mod_file
if [ $? -ne 0 ]; then then
echo "" echo ""
echo "failed to download $mod_file - aborting build" echo "failed to download $mod_file - aborting build"
echo "" echo ""
@ -172,13 +87,15 @@ extract_it()
# if pkg has not yet been extracted, do so now # if pkg has not yet been extracted, do so now
if [ ! -d $mod_name ]; then if [ ! -d $mod_name ]; then
echo $mod_file | grep -q tar.bz2 case "$mod_file" in
if [ $? -eq 0 ]; then *.tar.bz2) comp=j ;;
tar xjf ../downloads/$mod_file > /dev/null 2>&1 *.tar.gz) comp=z ;;
else *.tar.xz) comp=J ;;
tar xzf ../downloads/$mod_file > /dev/null 2>&1 *.tar) comp= ;;
fi *) echo "unknown compressed module $mod_name" ; exit 1 ;;
if [ $? -ne 0 ]; then esac
if ! tar x${comp}f ../downloads/$mod_file > /dev/null
then
echo "error extracting module $mod_name" echo "error extracting module $mod_name"
exit 1 exit 1
fi fi
@ -192,9 +109,9 @@ extract_it()
fi fi
# now configure # now configure
echo "executing ./configure --prefix=$PREFIX_DIR $mod_args" echo "executing ./configure --prefix=$PREFIX_DIR $mod_args"
./configure --prefix=$PREFIX_DIR $mod_args if ! ./configure --prefix=$PREFIX_DIR $mod_args
if [ $? -ne 0 ]; then then
echo "configuration failed for module $mn" echo "configuration failed for module $mod_name"
exit 1 exit 1
fi fi
@ -205,6 +122,7 @@ extract_it()
make_it() make_it()
{ {
local mod_file mod_name mod_args
mod_file=$1 mod_file=$1
mod_name=$2 mod_name=$2
mod_args=$3 mod_args=$3
@ -221,8 +139,8 @@ make_it()
echo "*** processing module $mod_name ($count of $num_modules) ***" echo "*** processing module $mod_name ($count of $num_modules) ***"
echo "" echo ""
extract_it $mod_file $mod_name "$mod_args" if ! extract_it $mod_file $mod_name "$mod_args"
if [ $? -ne 0 ]; then then
echo "" echo ""
echo "extract failed for module $mod_name" echo "extract failed for module $mod_name"
echo "" echo ""
@ -231,8 +149,8 @@ make_it()
# make module # make module
if [ ! -e cookies/$mod_name.made ]; then if [ ! -e cookies/$mod_name.made ]; then
(cd build_dir/$mod_name ; make) if ! make -C build_dir/$mod_name
if [ $? -ne 0 ]; then then
echo "" echo ""
echo "make failed for module $mod_name" echo "make failed for module $mod_name"
echo "" echo ""
@ -242,8 +160,8 @@ make_it()
fi fi
# install module # install module
(cd build_dir/$mod_name ; make install) if ! make -C build_dir/$mod_name install
if [ $? -ne 0 ]; then then
echo "" echo ""
echo "make install failed for module $mod_name" echo "make install failed for module $mod_name"
echo "" echo ""
@ -254,7 +172,7 @@ make_it()
# so Mesa builds using this python version # so Mesa builds using this python version
case "$mod_name" in case "$mod_name" in
*Python-2*) *Python-2*)
(cd build_dir/$mod_name ; ln -s python $PREFIX_DIR/bin/python2) ln -s python build_dir/$mod_name/$PREFIX_DIR/bin/python2
;; ;;
esac esac
@ -266,7 +184,9 @@ make_it()
data_file=x11_file_list.txt data_file=x11_file_list.txt
# this is the default download location for most modules # this is the default download location for most modules
download_url=http://www.x.org/releases/X11R7.6/src/everything # changed now to server1.xrdp.org
# was www.x.org/releases/X11R7.6/src/everything
download_url=http://server1.xrdp.org/xrdp/X11R7.6
num_modules=`cat $data_file | wc -l` num_modules=`cat $data_file | wc -l`
count=0 count=0
@ -277,10 +197,10 @@ count=0
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo "" echo ""
echo "usage: build.sh <installation dir>" echo "usage: buildx.sh <installation dir>"
echo "usage: build.sh <clean>" echo "usage: buildx.sh <clean>"
echo "usage: build.sh default" echo "usage: buildx.sh default"
echo "usage: build.sh <installation dir> drop - set env and run bash in rdp dir" echo "usage: buildx.sh <installation dir> drop - set env and run bash in rdp dir"
echo "" echo ""
exit 1 exit 1
fi fi
@ -299,9 +219,9 @@ else
fi fi
if ! test -d $PREFIX_DIR; then if ! test -d $PREFIX_DIR; then
echo "dir does not exit, creating [$PREFIX_DIR]" echo "dir does not exist, creating [$PREFIX_DIR]"
mkdir $PREFIX_DIR if ! mkdir $PREFIX_DIR
if ! test $? -eq 0; then then
echo "mkdir failed [$PREFIX_DIR]" echo "mkdir failed [$PREFIX_DIR]"
exit 0 exit 0
fi fi
@ -316,8 +236,8 @@ export CFLAGS="-I$PREFIX_DIR/include -fPIC -O2"
# prefix dir must exist... # prefix dir must exist...
if [ ! -d $PREFIX_DIR ]; then if [ ! -d $PREFIX_DIR ]; then
mkdir -p $PREFIX_DIR if ! mkdir -p $PREFIX_DIR
if [ $? -ne 0 ]; then then
echo "$PREFIX_DIR does not exist; failed to create it - cannot continue" echo "$PREFIX_DIR does not exist; failed to create it - cannot continue"
exit 1 exit 1
fi fi
@ -331,8 +251,8 @@ fi
# create a downloads dir # create a downloads dir
if [ ! -d downloads ]; then if [ ! -d downloads ]; then
mkdir downloads if ! mkdir downloads
if [ $? -ne 0 ]; then then
echo "error creating downloads directory" echo "error creating downloads directory"
exit 1 exit 1
fi fi
@ -340,8 +260,8 @@ fi
# this is where we do the actual build # this is where we do the actual build
if [ ! -d build_dir ]; then if [ ! -d build_dir ]; then
mkdir build_dir if ! mkdir build_dir
if [ $? -ne 0 ]; then then
echo "error creating build_dir directory" echo "error creating build_dir directory"
exit 1 exit 1
fi fi
@ -349,22 +269,18 @@ fi
# this is where we store cookie files # this is where we store cookie files
if [ ! -d cookies ]; then if [ ! -d cookies ]; then
mkdir cookies if ! mkdir cookies
if [ $? -ne 0 ]; then then
echo "error creating cookies directory" echo "error creating cookies directory"
exit 1 exit 1
fi fi
fi fi
while read line while IFS=: read mod_file mod_dir mod_args
do do
mod_file=`echo $line | cut -d':' -f1`
mod_dir=`echo $line | cut -d':' -f2`
mod_args=`echo $line | cut -d':' -f3`
mod_args=`eval echo $mod_args` mod_args=`eval echo $mod_args`
make_it $mod_file $mod_dir "$mod_args" make_it $mod_file $mod_dir "$mod_args"
done < $data_file done < $data_file
echo "build for X OK" echo "build for X OK"
@ -372,14 +288,14 @@ echo "build for X OK"
X11RDPBASE=$PREFIX_DIR X11RDPBASE=$PREFIX_DIR
export X11RDPBASE export X11RDPBASE
cd rdp if ! make -C rdp
make then
if [ $? -ne 0 ]; then
echo "error building rdp" echo "error building rdp"
exit 1 exit 1
fi fi
# this will copy the build X server with the other X server binaries # this will copy the build X server with the other X server binaries
cd rdp
strip X11rdp strip X11rdp
cp X11rdp $X11RDPBASE/bin cp X11rdp $X11RDPBASE/bin