From d8ef87ec045c113226fbb815bfb8bf5f389b4752 Mon Sep 17 00:00:00 2001 From: Bastien Nocera <hadess@hadess.net> Date: Mon, 8 Aug 2016 13:10:22 +0200 Subject: [PATCH] Add build script and manifest for GNU Hello https://www.gnu.org/software/hello/ --- build.sh | 23 +++++++++++++++++++++++ org.gnu.hello.json | 25 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 build.sh create mode 100644 org.gnu.hello.json diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..8ba62ae --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +FILE=org.gnu.hello.json +VERSION=2.10 + +APPID=`basename $FILE .json` + +if [ x$TARGET != x`uname -p` -a ! -z "$TARGET" ]; then + if [ ! -x qemu-static ]; then + echo "QEmu static emulator missing as 'qemu-static' executable" + exit 1 + fi + + ARCH_OPT="--arch=$TARGET" + ARCH_EMU_OPT="--arch-emulator=`pwd`/qemu-static" +else + TARGET=`uname -p` +fi + +echo ========== Building $APPID ================ +rm -rf app +flatpak-builder $ARCH_OPT $ARCH_EMU_OPT --ccache --require-changes --repo=hello-repo --subject="${APPID} ${VERSION}" ${EXPORT_ARGS-} app $FILE && \ +flatpak build-bundle $ARCH_OPT hello-repo/ $APPID.$TARGET.xdgapp $APPID master diff --git a/org.gnu.hello.json b/org.gnu.hello.json new file mode 100644 index 0000000..7a2ac0a --- /dev/null +++ b/org.gnu.hello.json @@ -0,0 +1,25 @@ +{ + "app-id": "org.gnu.hello", + "runtime": "org.freedesktop.Platform", + "runtime-version": "1.4", + "sdk": "org.freedesktop.Sdk", + "command": "hello", + "separate-locales": false, + "build-options" : { + "cflags": "-O2 -g", + "cxxflags": "-O2 -g" + }, + "cleanup": [ "/bin/flatpak-arch-emulator" ], + "modules": [ + { + "name": "gnu-hello", + "sources": [ + { + "type": "archive", + "url": "http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz", + "sha256": "31e066137a962676e89f69d1b65382de95a7ef7d914b8cb956f41ea72e0f516b" + } + ] + } + ] +} -- GitLab