aboutsummaryrefslogtreecommitdiff
path: root/flatpak
diff options
context:
space:
mode:
authorohfp <1813007-ohfp@users.noreply.gitlab.com>2020-03-06 21:17:06 +0100
committerohfp <1813007-ohfp@users.noreply.gitlab.com>2020-03-06 21:17:06 +0100
commit8378fcc076b44e46203e9fc1a50d57bac73a1d8c (patch)
treebe90108b8eb3c255a161ab7b06e4f2d1b79c6a6f /flatpak
parentfix appimage build (diff)
downloadlibrewolf-linux-8378fcc076b44e46203e9fc1a50d57bac73a1d8c.tar.gz
librewolf-linux-8378fcc076b44e46203e9fc1a50d57bac73a1d8c.tar.bz2
librewolf-linux-8378fcc076b44e46203e9fc1a50d57bac73a1d8c.zip
Partial rewrite of build process
Switching to an Arch based build process for easier maintenance and using specific runners for tasks where that might be necessary. Right now, parent/child pipelines for somewhat parallel builds for different architectures / semi-independent pak-builds don't seem to properly work yet due to `trigger:` not being recognized when it should, so that's not yet implemented.
Diffstat (limited to 'flatpak')
-rwxr-xr-xflatpak/build_flatpak.sh15
-rw-r--r--flatpak/content/io.gitlab.LibreWolf.json37
2 files changed, 32 insertions, 20 deletions
diff --git a/flatpak/build_flatpak.sh b/flatpak/build_flatpak.sh
index 999c710..36eff24 100755
--- a/flatpak/build_flatpak.sh
+++ b/flatpak/build_flatpak.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
printf "\n\n---------------------------------------- FLATPAK BUILD --------------------------------------------\n";
# Aborts the script upon any faliure
@@ -10,7 +10,7 @@ FLATPAK_REPO=$2;
FLATPAK_BUNDLE=$3;
_SCRIPT_FOLDER=$(realpath $(dirname $0));
_FLATHUB_REPO="flathub https://flathub.org/repo/flathub.flatpakrepo";
-_FLATHUB_PACKAGES_TO_INSTALL="org.gnome.Platform/x86_64/3.32 org.gnome.Sdk/x86_64/3.32";
+_FLATHUB_PACKAGES_TO_INSTALL="org.gnome.Platform/${CARCH}/3.32 org.gnome.Sdk/${CARCH}/3.32";
_EXTRACTED_BINARY_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf
_FLATPAK_JSON_FILE=$_SCRIPT_FOLDER/content/io.gitlab.LibreWolf.json;
_FLATPAK_BUILD_SOURCE_FOLDER=$_SCRIPT_FOLDER/source;
@@ -18,21 +18,28 @@ _FLATPAK_BUILD_FOLDER=build-dir;
# Install build dependencies
printf "\nInstalling flatpak build dependencies\n";
+
+# we're using a pre-prepared flatpak-image witch aarch64
+apt update && apt install -y software-properties-common
+add-apt-repository -y ppa:alexlarsson/flatpak
+apt update && apt install -y flatpak-builder
flatpak remote-add --if-not-exists $_FLATHUB_REPO;
flatpak install -y flathub $_FLATHUB_PACKAGES_TO_INSTALL;
# Extracts the binary tarball
printf "\nExtracting librewolf binary tarball\n";
+mkdir -p $_EXTRACTED_BINARY_TARBALL_FOLDER;
tar -xvf $BINARY_TARBALL -C $_EXTRACTED_BINARY_TARBALL_FOLDER;
# Prepare for flatpak build
printf "\nPreparing files for flatpak build\n";
-mkdir $_FLATPAK_BUILD_SOURCE_FOLDER && mv $_EXTRACTED_BINARY_TARBALL_FOLDER $_FLATPAK_BUILD_SOURCE_FOLDER/librewolf;
+mkdir -p $_FLATPAK_BUILD_SOURCE_FOLDER;
+mv $_EXTRACTED_BINARY_TARBALL_FOLDER $_FLATPAK_BUILD_SOURCE_FOLDER;
# Build Repo
printf "\nBuilding flatpak repository\n";
cp "$_FLATPAK_JSON_FILE" ./;
-flatpak-builder --repo="$FLATPAK_REPO" "$_FLATPAK_BUILD_FOLDER" io.gitlab.LibreWolf.json;
+flatpak-builder --disable-rofiles-fuse --repo="$FLATPAK_REPO" "$_FLATPAK_BUILD_FOLDER" io.gitlab.LibreWolf.json;
# Build bundle
printf "\nBuilding flatpak bundle\n";
diff --git a/flatpak/content/io.gitlab.LibreWolf.json b/flatpak/content/io.gitlab.LibreWolf.json
index 0e2b549..8feb9d6 100644
--- a/flatpak/content/io.gitlab.LibreWolf.json
+++ b/flatpak/content/io.gitlab.LibreWolf.json
@@ -4,22 +4,27 @@
"runtime-version": "3.32",
"sdk": "org.gnome.Sdk",
"command": "librewolf",
- "modules": [{
- "name": "librewolf",
- "buildsystem": "simple",
- "build-commands": [
- "mkdir -p /app/share && mv librewolf -t /app/share",
- "mkdir -p /app/bin && ln -s /app/share/librewolf/librewolf /app/bin/"
- ],
- "sources": [{
- "type": "dir",
- "path": "source"
- }]
- }],
+ "modules": [
+ {
+ "name": "librewolf",
+ "buildsystem": "simple",
+ "build-commands": [
+ "mkdir -p /app/share && mv librewolf -t /app/share",
+ "mkdir -p /app/bin && ln -s /app/share/librewolf/librewolf /app/bin/"
+ ],
+ "sources": [
+ {
+ "type": "dir",
+ "path": "flatpak/source"
+ }
+ ]
+ }
+ ],
"finish-args": [
- "--share=ipc", "--socket=x11", /* X11 + XShm access */
- "--socket=wayland", /* Wayland access */
- "--filesystem=home:rw", /* We want full fs access so we can read the files */
- "--share=network" /* Needs to talk to the network: */
+ "--share=ipc",
+ "--socket=x11",
+ "--socket=wayland",
+ "--filesystem=home:rw",
+ "--share=network"
]
}
bgstack15