Added c2048 overlay bundle

This commit is contained in:
bauen1 2017-12-23 10:26:51 +01:00
parent 41f7110d7a
commit ab38245d3e
No known key found for this signature in database
GPG Key ID: FF0AAF5E0812BA9C
7 changed files with 73 additions and 0 deletions

View File

@ -125,6 +125,7 @@ OVERLAY_TYPE=folder
#
# glibc_full - all core GNU C libraries.
# bosh_cli - BOSH CLI (command line interface).
# c2048 - console version of the game 2048
# cf_cli - Cloud Foundry CLI (command line interface).
# cf_tools - all BOSH and Cloud Foundry tools.
# coreutils - set of commonly used GNU executable utilities.

View File

@ -29,6 +29,8 @@ Currently available overlay bundles:
case for this tool is to create and manage Cloud Foundry
infrastructures.
c2048 - console version of the game 2048
cf_cli - Cloud Foundry command line tool. It can be used to manage all
aspects of already existing Cloud Foundry installation,
including the full software development lifecycle in cloud

View File

@ -0,0 +1,5 @@
# You can find the latest c2048 source bundles here:
#
# https://github.com/mevdschee/2048.c
#
C2048_SOURCE_URL=https://raw.githubusercontent.com/mevdschee/2048.c/master/2048.c

View File

@ -0,0 +1,36 @@
#!/bin/sh
set -e
. ../../common.sh
# Read the common configuration properties.
DOWNLOAD_URL=`read_property C2048_SOURCE_URL`
USE_LOCAL_SOURCE=`read_property USE_LOCAL_SOURCE`
# Grab everything after the last '/' character.
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
USE_LOCAL_SOURCE="false"
fi
cd $MAIN_SRC_DIR/source/overlay
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
# Downloading c2048 source bundle file. The '-c' option allows the download to resume.
echo "Downloading c2048 source bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local c2048 source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted 2048.
echo "Removing c2048 work area. This may take a while."
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/$BUNDLE_NAME
cp $ARCHIVE_FILE $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR

View File

@ -0,0 +1,20 @@
#!/bin/sh
set -e
. ../../common.sh
cd $WORK_DIR/overlay/$BUNDLE_NAME
rm -f 2048
gcc $CFLAGS -Os -o 2048 2048.c
strip -g 2048
mkdir -p $OVERLAY_ROOTFS/usr/bin
cp --remove-destination $PWD/2048 $OVERLAY_ROOTFS/usr/bin/
echo "Bundle 'c2048' has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,8 @@
#!/bin/sh
set -e
./01_get.sh
./02_build.sh
cd $SRC_DIR

View File

@ -0,0 +1 @@
glibc_libc