1
0
Fork 0
fgmeta/build_release_linux.sh
James Turner b350cd9827 Adjust build scripts to set FG_BUILD_TYPE
Cmake now has a standard variable to indicate the build type we are
creating. Map the existing settings on each platform to that value
(with varying degrees of nice-ness, further clean-up possible)
2017-02-28 16:25:58 +00:00

62 lines
1.4 KiB
Bash
Executable file

#!/bin/sh
if [ "$WORKSPACE" == "" ]; then
echo "ERROR: Missing WORKSPACE environment variable."
exit 1
fi
VERSION=`cat flightgear/version`
#####################################################################################
# remove old and create fresh build directories
cd $WORKSPACE
mkdir -p sgBuild
mkdir -p fgBuild
mkdir -p output
rm -rf output/*
rm -rf dist/*
#####################################################################################
echo "Starting on SimGear"
cd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_DNS:BOOL="ON" -DSIMGEAR_SHARED:BOOL="ON" ../simgear
# compile
make
if [ $? -ne '0' ]; then
echo "make simgear failed"
exit 1
fi
make install
# build source package and copy to output
make package_source
cp simgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Starting on FlightGear"
cd ../fgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" -DFG_BUILD_TYPE=Release ../flightgear
# compile
make
if [ $? -ne '0' ]; then
echo "make flightgear failed"
exit 1
fi
make install
# build source package and copy to output
make package_source
cp flightgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Assembling base package"
cd $WORKSPACE
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/