Added buildbot-raspberrypi.sh and fixed some other buildbot script things.
This commit is contained in:
parent
bbd1fd4b38
commit
3e5f92d756
|
@ -60,10 +60,15 @@ emcmake cmake -G "Unix Makefiles" -DPHYSFS_BUILD_SHARED=False -DCMAKE_BUILD_TYPE
|
||||||
echo "Building..."
|
echo "Building..."
|
||||||
emmake $MAKE || exit $?
|
emmake $MAKE || exit $?
|
||||||
|
|
||||||
|
set -e
|
||||||
rm -rf "$TARBALL" physfs-emscripten
|
rm -rf "$TARBALL" physfs-emscripten
|
||||||
mkdir -p physfs-emscripten
|
mkdir -p physfs-emscripten
|
||||||
echo "Archiving to '$TARBALL' ..."
|
echo "Archiving to '$TARBALL' ..."
|
||||||
( cp ../src/physfs.h libphysfs.a physfs-emscripten && tar -cJvvf "$TARBALL" physfs-emscripten ) || exit 1
|
cp ../src/physfs.h libphysfs.a physfs-emscripten
|
||||||
|
chmod -R a+r physfs-emscripten
|
||||||
|
chmod a+x physfs-emscripten
|
||||||
|
chmod -R go-w physfs-emscripten
|
||||||
|
tar -cJvvf "$TARBALL" physfs-emscripten
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -69,10 +69,15 @@ fi
|
||||||
|
|
||||||
if [ "$OKAY" == "1" ]; then
|
if [ "$OKAY" == "1" ]; then
|
||||||
echo 1>&2 "Build succeeded."
|
echo 1>&2 "Build succeeded."
|
||||||
|
set -e
|
||||||
rm -rf "$ZIPFILE" physfs-os2
|
rm -rf "$ZIPFILE" physfs-os2
|
||||||
mkdir -p physfs-os2
|
mkdir -p physfs-os2
|
||||||
echo "Zipping to '$ZIPFILE' ..."
|
echo "Zipping to '$ZIPFILE' ..."
|
||||||
( cp ../src/physfs.h physfs.lib physfs-os2 && zip -9r "$ZIPFILE" physfs-os2 ) || exit 1
|
cp ../src/physfs.h physfs.lib physfs-os2
|
||||||
|
chmod -R a+r physfs-os2
|
||||||
|
chmod a+x physfs-os2
|
||||||
|
chmod -R go-w physfs-os2
|
||||||
|
zip -9r "$ZIPFILE" physfs-os2
|
||||||
echo "Done."
|
echo "Done."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This is the script physfs-buildbot.icculus.org uses to cross-compile
|
||||||
|
# PhysicsFS from x86 Linux to Raspberry Pi. This script was originally from
|
||||||
|
# Simple Directmedia Layer ( https://www.libsdl.org/ ).
|
||||||
|
|
||||||
|
# The final tarball can be unpacked in the root directory of a RPi,
|
||||||
|
# so the PhysicsFS install lands in /usr/local. Run ldconfig, and then
|
||||||
|
# you should be able to build and run PhysicsFS-based software on your
|
||||||
|
# Pi. Standard configure scripts should be able to find PhysicsFS and
|
||||||
|
# build against it.
|
||||||
|
|
||||||
|
TARBALL="$1"
|
||||||
|
if [ -z $1 ]; then
|
||||||
|
TARBALL=physfs-raspberrypi.tar.xz
|
||||||
|
fi
|
||||||
|
|
||||||
|
OSTYPE=`uname -s`
|
||||||
|
if [ "$OSTYPE" != "Linux" ]; then
|
||||||
|
# !!! FIXME
|
||||||
|
echo "This only works on x86 or x64-64 Linux at the moment." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "x$MAKE" == "x" ]; then
|
||||||
|
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
|
||||||
|
let NCPU=$NCPU+1
|
||||||
|
MAKE="make -j$NCPU"
|
||||||
|
fi
|
||||||
|
|
||||||
|
BUILDBOTDIR="raspberrypi-buildbot"
|
||||||
|
PARENTDIR="$PWD"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
rm -f $TARBALL
|
||||||
|
rm -rf $BUILDBOTDIR
|
||||||
|
mkdir -p $BUILDBOTDIR
|
||||||
|
pushd $BUILDBOTDIR
|
||||||
|
|
||||||
|
SYSROOT="/opt/rpi-sysroot"
|
||||||
|
cmake -G "Unix Makefiles" \
|
||||||
|
-DCMAKE_C_COMPILER="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc" \
|
||||||
|
-DCMAKE_BUILD_TYPE=MinSizeRel \
|
||||||
|
-DCMAKE_SYSROOT="$SYSROOT" \
|
||||||
|
-DCMAKE_FIND_ROOT_PATH="$SYSROOT" \
|
||||||
|
-DCMAKE_SYSTEM_NAME="Linux" \
|
||||||
|
-DCMAKE_SYSTEM_VERSION=1 \
|
||||||
|
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
|
||||||
|
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
|
||||||
|
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
|
||||||
|
..
|
||||||
|
|
||||||
|
$MAKE
|
||||||
|
|
||||||
|
rm -rf "$TARBALL" physfs-raspberrypi
|
||||||
|
mkdir -p physfs-raspberrypi
|
||||||
|
echo "Archiving to '$TARBALL' ..."
|
||||||
|
cp -a ../src/physfs.h libphysfs.a libphysfs.so* physfs-raspberrypi
|
||||||
|
chmod -R a+r physfs-raspberrypi
|
||||||
|
chmod a+x physfs-raspberrypi physfs-raspberrypi/*.so*
|
||||||
|
chmod -R go-w physfs-raspberrypi
|
||||||
|
tar -cJvvf "$TARBALL" physfs-raspberrypi
|
||||||
|
|
||||||
|
set +x
|
||||||
|
echo "Done."
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue