Skip to content
Snippets Groups Projects
Commit 933df730 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add files needed for building to flatpak

parent 38e4e1ea
Branches
No related tags found
No related merge requests found
/build /build
/.flatpak-builder /.flatpak-builder
/auto-*.json /auto-*.json
/build-files.tar
...@@ -10,6 +10,8 @@ build: auto-ignore-installed.json\ ...@@ -10,6 +10,8 @@ build: auto-ignore-installed.json\
manual-arm-none-eabi-bootstrap-gcc.json \ manual-arm-none-eabi-bootstrap-gcc.json \
manual-arm-none-eabi-newlib.json \ manual-arm-none-eabi-newlib.json \
manual-arm-none-eabi-gcc.json \ manual-arm-none-eabi-gcc.json \
manual-git.json \
manual-build-files.json \
manual-mbed-cli-wrap.json manual-mbed-cli-wrap.json
flatpak-builder --force-clean build $(TARGET).json flatpak-builder --force-clean build $(TARGET).json
flatpak-builder --user --install --force-clean build/ $(TARGET).json flatpak-builder --user --install --force-clean build/ $(TARGET).json
...@@ -22,6 +24,11 @@ setup: ...@@ -22,6 +24,11 @@ setup:
manual-%.json: manual-%.install manual-%.json: manual-%.install
manual-build-files.json: build-files.tar
build-files.tar:
git ls-files | tar -cf $@ --files-from=-
auto-ignore-installed.json: pip-ignore-installed.txt auto-ignore-installed.json: pip-ignore-installed.txt
cat $< | xargs flatpak run se.lth.control.pip-install-to-json \ cat $< | xargs flatpak run se.lth.control.pip-install-to-json \
--name $@ --extra-flag --ignore-installed > $@.tmp --name $@ --extra-flag --ignore-installed > $@.tmp
...@@ -36,10 +43,11 @@ auto-simple.json: pip-simple.txt ...@@ -36,10 +43,11 @@ auto-simple.json: pip-simple.txt
clean: clean:
rm -f auto-*.json rm -f auto-*.json
rm -rf .flatpak-builder/build rm -rf .flatpak-builder/build
rm -rf build
rm -f build-files.tar
rm -f *~
.PHONY: distclean .PHONY: distclean
clean: clean distclean: clean
rm -rf build
rm -rf .flatpak-builder rm -rf .flatpak-builder
rm -f *~
#!/bin/sh
set -e
mkdir /app/build-files
cat build-files.tar | tar --directory /app/build-files -x
{
"name": "manual-build-files.json",
"buildsystem": "simple",
"build-commands": [
"./manual-build-files.install"
],
"sources": [
{
"type": "file",
"path": "manual-build-files.install"
},
{
"type": "file",
"path": "build-files.tar"
}
]
}
#!/bin/bash
RUN_ARGS=()
RUN_CWD="--cwd=$(pwd)"
# Handle case when running from within hidden directory
if [[ "$(pwd)" =~ ^(/var/tmp) ]] ; then
RUN_ARGS+=( --filesystem=${BASH_REMATCH[1]} )
elif [[ "$(pwd)" =~ ^(/tmp) ]] ; then
RUN_ARGS+=( --filesystem=${BASH_REMATCH[1]} )
elif [[ "$(pwd)" =~ ^(/usr) ]] ; then
RUN_CWD="--cwd=/run/host/$(pwd)"
fi
# Handle special trampoline directory (used at control.lth.se)
if [ -d "${XDG_RUNTIME_DIR}/trampoline" ] ; then
RUN_ARGS+=( --filesystem=xdg-run/trampoline )
fi
flatpak "${RUN_CWD}" "${RUN_ARGS[@]}" run se.lth.control.mbed-cli $@
...@@ -17,16 +17,12 @@ ...@@ -17,16 +17,12 @@
"manual-arm-none-eabi-newlib.json", "manual-arm-none-eabi-newlib.json",
"manual-arm-none-eabi-gcc.json", "manual-arm-none-eabi-gcc.json",
"manual-git.json", "manual-git.json",
"manual-build-files.json",
"manual-mbed-cli-wrap.json" "manual-mbed-cli-wrap.json"
], ],
"finish-args" : [ "finish-args" : [
"--filesystem=host", "--filesystem=host",
"--filesystem=xdg-run/trampoline",
"--share=network", "--share=network",
// "--share=ipc",
"--talk-name=org.freedesktop.Flatpak",
// "--socket=x11",
// "--device=dri",
"--device=all" "--device=all"
] ]
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment