From 51445b7f152cfebdf0028477d4b74b32d0d81c9c Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Fri, 28 Oct 2022 03:19:35 +0200 Subject: [PATCH] Fri 28 Oct 2022 03:19:35 AM CEST --- flatpak/Makefile | 27 ++++++++++++----------- flatpak/assets/fix-l10n-package-cmd.patch | 20 ----------------- flatpak/assets/flatpak/_created | 0 flatpak/assets/{ => flatpak}/artifacts.mk | 0 flatpak/assets/tryfix-reslink-fail.patch | 13 ----------- 5 files changed, 14 insertions(+), 46 deletions(-) delete mode 100644 flatpak/assets/fix-l10n-package-cmd.patch create mode 100644 flatpak/assets/flatpak/_created rename flatpak/assets/{ => flatpak}/artifacts.mk (100%) delete mode 100644 flatpak/assets/tryfix-reslink-fail.patch diff --git a/flatpak/Makefile b/flatpak/Makefile index 3d107bc..14804ad 100644 --- a/flatpak/Makefile +++ b/flatpak/Makefile @@ -6,25 +6,20 @@ source_release:=$(shell cat source_release) full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)") mozbuild=~/.mozbuild -# if arch not passed on commandline, default to x86_64 -ifneq ($(arch),x86_64) -ifneq ($(arch),aarch64) -arch=x86_64 -endif -endif - docker_image_name=lw-linux-base-$(arch) + + 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 "" - @echo " all - Build librewolf and it's flatpak artifacts." + @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 flatpak artifacts" + @echo " artifacts - Build the artifacts" @echo "" @echo " clean - Remove output files and temporary files." @echo " veryclean - Remove even more stuff." @@ -39,8 +34,12 @@ help : @echo "" @echo "Use arch=x86_64 (the default) or arch=aarch64 to specify the target architecture." + + all : dir pre-build build package post-package artifacts + + fetch : wget -q -O version "https://gitlab.com/librewolf-community/browser/source/-/raw/main/version" wget -q -O source_release "https://gitlab.com/librewolf-community/browser/source/-/raw/main/release" @@ -49,6 +48,8 @@ fetch : cat "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" sha256sum -c "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" + + clean : rm -rf librewolf-$(full_version) work @@ -60,6 +61,7 @@ veryclean : clean + pre-build : ./assets/pre_build_patches_mozconfig.sh @@ -68,7 +70,6 @@ build : dir package : dir -# (cd librewolf-$(full_version) && ./mach package) ( cd librewolf-$(full_version) && echo 'Packaging... (output hidden)' && \ cat browser/locales/shipped-locales | xargs ./mach package-multi-locale --locales >/dev/null ) @@ -77,7 +78,7 @@ post-package : ./assets/post_package_distini_etc.sh artifacts : - ${MAKE} -f assets/artifacts.mk artifacts + ${MAKE} -f assets/flatpak/artifacts.mk artifacts @@ -91,8 +92,6 @@ librewolf-$(full_version) : librewolf-$(full_version).source.tar.gz touch $@ # this is the place to apply patches and create a custom mozconfig cp -v assets/mozconfig.$(arch) librewolf-$(full_version)/mozconfig -# (cd librewolf-$(full_version) && patch -p1 -i ../assets/tryfix-reslink-fail.patch) -# (cd librewolf-$(full_version) && patch -p1 -i ../assets/fix-l10n-package-cmd.patch) @@ -126,6 +125,8 @@ bootstrap : dir + + setup-debian : apt-get -y install mercurial python3 python3-dev python3-pip curl wget dpkg-sig libssl-dev zstd diff --git a/flatpak/assets/fix-l10n-package-cmd.patch b/flatpak/assets/fix-l10n-package-cmd.patch deleted file mode 100644 index b6b66ec..0000000 --- a/flatpak/assets/fix-l10n-package-cmd.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py -index 10d7a8f..610a4fa 100644 ---- a/python/mozbuild/mozbuild/mach_commands.py -+++ b/python/mozbuild/mozbuild/mach_commands.py -@@ -2457,6 +2457,7 @@ def package_l10n(command_context, verbose=False, locales=[]): - ) - command_context.run_process( - [ -+ "python3", - mozpath.join(command_context.topsrcdir, "mach"), - "build", - "chrome-{}".format(locale), -@@ -2476,6 +2477,7 @@ def package_l10n(command_context, verbose=False, locales=[]): - ) - command_context.run_process( - [ -+ "python3", - mozpath.join(command_context.topsrcdir, "mach"), - "android", - "assemble-app", diff --git a/flatpak/assets/flatpak/_created b/flatpak/assets/flatpak/_created new file mode 100644 index 0000000..e69de29 diff --git a/flatpak/assets/artifacts.mk b/flatpak/assets/flatpak/artifacts.mk similarity index 100% rename from flatpak/assets/artifacts.mk rename to flatpak/assets/flatpak/artifacts.mk diff --git a/flatpak/assets/tryfix-reslink-fail.patch b/flatpak/assets/tryfix-reslink-fail.patch deleted file mode 100644 index c8a4270..0000000 --- a/flatpak/assets/tryfix-reslink-fail.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/browser/app/splash.rc b/browser/app/splash.rc -index 259a806..78cd58e 100644 ---- a/browser/app/splash.rc -+++ b/browser/app/splash.rc -@@ -12,7 +12,7 @@ IDI_APPLICATION ICON FIREFOX_ICO - IDI_NEWWINDOW ICON NEWWINDOW_ICO - IDI_NEWTAB ICON NEWTAB_ICO - IDI_PBMODE ICON PBMODE_ICO --IDI_DOCUMENT_PDF ICON DOCUMENT_PDF_ICO -+IDI_DOCUMENT_PDF ICON DOCUMENT_ICO - - STRINGTABLE DISCARDABLE - BEGIN