2011-01-07 22:38:39 +00:00
|
|
|
#!/bin/sh
|
2011-01-09 22:49:52 +00:00
|
|
|
|
2012-01-18 19:45:21 +00:00
|
|
|
if [ "$WORKSPACE" == "" ]; then
|
|
|
|
echo "ERROR: Missing WORKSPACE environment variable."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-02-09 10:34:26 +00:00
|
|
|
VERSION=`cat flightgear/version`
|
|
|
|
|
2012-01-18 19:45:21 +00:00
|
|
|
#####################################################################################
|
2012-01-17 23:32:16 +00:00
|
|
|
# remove old and create fresh build directories
|
|
|
|
rm -rf sgBuild
|
|
|
|
rm -rf fgBuild
|
|
|
|
mkdir -p sgBuild
|
|
|
|
mkdir -p fgBuild
|
|
|
|
mkdir -p output
|
|
|
|
rm -rf output/*
|
2012-01-18 21:40:04 +00:00
|
|
|
rm -rf $WORKSPACE/dist/include/simgear $WORKSPACE/dist/libSim* $WORKSPACE/dist/libsg*.a
|
2012-01-17 23:32:16 +00:00
|
|
|
|
2012-01-18 19:45:21 +00:00
|
|
|
#####################################################################################
|
2012-01-17 23:32:16 +00:00
|
|
|
echo "Starting on SimGear"
|
|
|
|
cd sgBuild
|
2012-01-18 19:45:21 +00:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../simgear
|
2012-01-17 23:32:16 +00:00
|
|
|
|
|
|
|
# compile
|
2011-01-09 22:49:52 +00:00
|
|
|
make
|
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make simgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
make install
|
|
|
|
|
2012-01-17 23:32:16 +00:00
|
|
|
# build source package and copy to output
|
|
|
|
make package_source
|
|
|
|
cp simgear-*.tar.bz2 ../output/.
|
|
|
|
|
2012-01-18 19:45:21 +00:00
|
|
|
#####################################################################################
|
2011-01-09 22:49:52 +00:00
|
|
|
echo "Starting on FlightGear"
|
2012-01-17 23:32:16 +00:00
|
|
|
cd ../fgBuild
|
2012-01-18 19:45:21 +00:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../flightgear
|
2012-01-17 22:43:12 +00:00
|
|
|
|
2012-01-17 23:32:16 +00:00
|
|
|
# compile
|
2011-01-09 22:49:52 +00:00
|
|
|
make
|
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make flightgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
make install
|
2012-01-17 22:43:12 +00:00
|
|
|
|
2012-01-17 23:32:16 +00:00
|
|
|
# build source package and copy to output
|
|
|
|
make package_source
|
2012-01-18 00:08:33 +00:00
|
|
|
cp flightgear-*.tar.bz2 ../output/.
|
2012-01-17 23:32:16 +00:00
|
|
|
|
2013-02-09 10:34:26 +00:00
|
|
|
#####################################################################################
|
|
|
|
|
|
|
|
echo "Assembling base package"
|
|
|
|
cd $WORKSPACE
|
|
|
|
|
|
|
|
echo "Syncing base packages files from sphere.telascience.org"
|
|
|
|
rsync -avz --filter 'merge base-package.rules' \
|
|
|
|
-e ssh jturner@sphere.telascience.org:/home/jturner/fgdata .
|
|
|
|
|
2013-10-23 20:17:28 +00:00
|
|
|
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/
|
2013-02-09 10:34:26 +00:00
|
|
|
|