From 1501493ca6e1dff4c77ff8919da7e89fb05f29a8 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sat, 29 Oct 2022 09:11:07 +0200 Subject: [PATCH] finished with Linux repo scripts --- lw-linux-base/Makefile | 29 ++++++------ lw-linux-base/assets/mozconfig.aarch64 | 2 +- lw-linux-base/assets/mozconfig.x86_64 | 2 +- .../assets/post_package_distini_etc.sh | 46 +++++++++++-------- 4 files changed, 44 insertions(+), 35 deletions(-) diff --git a/lw-linux-base/Makefile b/lw-linux-base/Makefile index b2d9530..db645bc 100644 --- a/lw-linux-base/Makefile +++ b/lw-linux-base/Makefile @@ -22,18 +22,21 @@ help : @echo "use: make [help] [all] [clean] [build] [package] [artifacts]" @echo "" - @echo " fetch - get the latest tarball. must be done first, at least once." - @echo " update - Only fetch the LibreWolf version-release files. used by 'fetch'" + @echo " fetch - get the latest tarball. must be done first, at least once." + @echo " update - Only fetch the LibreWolf version-release files. used by 'fetch'" @echo "" - @echo " all - Build librewolf and it's artifacts." - @echo " build - Perform './mach build' on the extracted tarball." - @echo " package - multilocale package." - @echo " artifacts - Build the artifacts" + @echo " all - Build librewolf and it's artifacts." @echo "" - @echo " clean - Remove output files and temporary files." - @echo " veryclean - Remove even more stuff." - @echo " dir - just extract and patch the LW tarball." - @echo " bootstrap - try to set up the build environment." + @echo " dir - just extract and patch the LW tarball." + @echo " pre-build - Perform 'target_type' specific pre-build tasks." + @echo " build - Perform './mach build' on the extracted tarball." + @echo " package - Build symbols, and multilocale package." + @echo " post-package - Perform 'target_type' specific post-package tasks." + @echo " artifacts - Build the artifacts" + @echo "" + @echo " clean - Remove output files and temporary files." + @echo " veryclean - Remove even more stuff." + @echo " bootstrap - try to set up the build environment." @echo " setup-debian, setup-fedora - needed packages." @echo "" @echo " docker-build - Run 'docker build' for " $(docker_image_name) " image." @@ -79,8 +82,8 @@ veryclean : clean # this is the place to apply patches and create a custom mozconfig pre-build : mv -v librewolf-$(full_version)/mozconfig librewolf-$(full_version)/mozconfig.std - cp -v $(assets)/mozconfig.$(arch) librewolf-$(full_version)/mozconfig - ./$(assets)/pre_build_patches_mozconfig.sh + cp -v assets/mozconfig.$(arch) librewolf-$(full_version)/mozconfig + ./assets/pre_build_patches_mozconfig.sh build : dir (cd librewolf-$(full_version) && ./mach build) @@ -93,7 +96,7 @@ package : dir post-package : cp -v librewolf-$(full_version)/obj-$(arch)-pc-linux-gnu/dist/librewolf-$(full_version).en-US.linux-$(arch).tar.bz2 . - ./$(assets)/post_package_distini_etc.sh + ./assets/post_package_distini_etc.sh artifacts : ${MAKE} -f assets/$(target_type)/artifacts.mk artifacts diff --git a/lw-linux-base/assets/mozconfig.aarch64 b/lw-linux-base/assets/mozconfig.aarch64 index ca2f9e5..6284d88 100644 --- a/lw-linux-base/assets/mozconfig.aarch64 +++ b/lw-linux-base/assets/mozconfig.aarch64 @@ -1,4 +1,4 @@ -. mozconfig.std +. "$topsrcdir/mozconfig.std" ac_add_options --target=aarch64-pc-linux-gnu ac_add_options --enable-linker=lld diff --git a/lw-linux-base/assets/mozconfig.x86_64 b/lw-linux-base/assets/mozconfig.x86_64 index 8f0e012..7647283 100644 --- a/lw-linux-base/assets/mozconfig.x86_64 +++ b/lw-linux-base/assets/mozconfig.x86_64 @@ -1,4 +1,4 @@ -. mozconfig.std +. "$topsrcdir/mozconfig.std" ac_add_options --target=x86_64-pc-linux-gnu ac_add_options --enable-bootstrap diff --git a/lw-linux-base/assets/post_package_distini_etc.sh b/lw-linux-base/assets/post_package_distini_etc.sh index ff021a5..7b77e84 100755 --- a/lw-linux-base/assets/post_package_distini_etc.sh +++ b/lw-linux-base/assets/post_package_distini_etc.sh @@ -15,25 +15,31 @@ echo assets/post_package_distini_etc.sh: Starting Post-package script for versio # See: https://gitlab.com/librewolf-community/browser/linux/-/blob/master/scripts/5_Configure_Binary_Tarball.sh -# -# 1) Script settings -# +binary_tarball=librewolf-$full_version.en-US.linux-$arch.tar.bz2 -# Setup Script Variables -BINARY_TARBALL=$1; -TOGGLE_SETTINGS_SCRIPT=$2; -LAUNCHER_SCRIPT=$3; -CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../)} -_SCRIPT_FOLDER=$(realpath $(dirname $0)); -_EXTRACTED_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf; -_SETTINGS_TAG=${SETTINGS_TAG:-'7.2-hotfix'} -_SETTINGS_REPO='https://gitlab.com/librewolf-community/settings.git'; -echo "BINARY_TARBALL: $BINARY_TARBALL" -echo "TOGGLE_SETTINGS_SCRIPT: $TOGGLE_SETTINGS_SCRIPT" -echo "LAUNCHER_SCRIPT: $LAUNCHER_SCRIPT" -echo "CI_PROJECT_DIR: $CI_PROJECT_DIR" -echo "_SCRIPT_FOLDER: $_SCRIPT_FOLDER" -echo "_EXTRACTED_TARBALL_FOLDER: $_EXTRACTED_TARBALL_FOLDER" -echo "_SETTINGS_TAG: $_SETTINGS_TAG" -echo "_SETTINGS_REPO: $_SETTINGS_REPO" +# Extract tarball +mkdir -p work +tar --strip-components=1 -xf $binary_tarball -C work + +# Add distribution.ini +distini="work/distribution/distribution.ini" +install -Dvm644 /dev/stdin $distini < work/io.gitlab.librewolf-community.appdata.xml + +# Recompress tarball +rm -f $binary_tarball +tar -jvcf $binary_tarball -C work .