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
|
|
|
|
|
2020-07-03 08:27:07 +00:00
|
|
|
VERSION=`cat flightgear/flightgear-version`
|
2013-02-09 10:34:26 +00:00
|
|
|
|
2017-12-25 17:04:47 +00:00
|
|
|
#####################################################################################
|
|
|
|
# ensure fgrcc can run when linked against libSimGearCore, for example
|
|
|
|
export LD_LIBRARY_PATH=$WORKSPACE/dist/lib64:$WORKSPACE/dist/lib:$LD_LIBRARY_PATH
|
|
|
|
|
2012-01-18 19:45:21 +00:00
|
|
|
#####################################################################################
|
2012-01-17 23:32:16 +00:00
|
|
|
# remove old and create fresh build directories
|
2015-03-14 21:43:18 +00:00
|
|
|
cd $WORKSPACE
|
2012-01-17 23:32:16 +00:00
|
|
|
mkdir -p sgBuild
|
|
|
|
mkdir -p fgBuild
|
|
|
|
mkdir -p output
|
|
|
|
rm -rf output/*
|
|
|
|
|
2012-01-18 19:45:21 +00:00
|
|
|
#####################################################################################
|
2012-01-17 23:32:16 +00:00
|
|
|
echo "Starting on SimGear"
|
|
|
|
cd sgBuild
|
2021-05-20 08:31:45 +00:00
|
|
|
cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_DNS:BOOL="ON" -DSIMGEAR_SHARED:BOOL="ON" -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
|
2012-01-17 23:32:16 +00:00
|
|
|
|
|
|
|
# compile
|
2021-05-20 08:31:45 +00:00
|
|
|
ninja
|
2011-01-09 22:49:52 +00:00
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make simgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-05-20 08:31:45 +00:00
|
|
|
ninja install
|
2011-01-09 22:49:52 +00:00
|
|
|
|
2012-01-17 23:32:16 +00:00
|
|
|
# build source package and copy to output
|
2021-05-20 08:31:45 +00:00
|
|
|
ninja package_source
|
2012-01-17 23:32:16 +00:00
|
|
|
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
|
2021-05-20 08:31:45 +00:00
|
|
|
cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" -DENABLE_SWIFT:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFG_BUILD_TYPE=Release ../flightgear
|
2012-01-17 22:43:12 +00:00
|
|
|
|
2012-01-17 23:32:16 +00:00
|
|
|
# compile
|
2021-05-20 08:31:45 +00:00
|
|
|
ninja
|
2011-01-09 22:49:52 +00:00
|
|
|
|
|
|
|
if [ $? -ne '0' ]; then
|
|
|
|
echo "make flightgear failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-05-20 08:31:45 +00:00
|
|
|
ninja install
|
2012-01-17 22:43:12 +00:00
|
|
|
|
2012-01-17 23:32:16 +00:00
|
|
|
# build source package and copy to output
|
2021-05-20 08:31:45 +00:00
|
|
|
ninja package_source
|
2012-01-18 00:08:33 +00:00
|
|
|
cp flightgear-*.tar.bz2 ../output/.
|
2012-01-17 23:32:16 +00:00
|
|
|
|