From b0676ebd2cc1d29c12146fc90103ecdc36b629d4 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sat, 8 Jan 2022 21:57:39 +0100 Subject: [PATCH] bugfixes --- Makefile | 15 ++++++--------- assets/upstream.nighly.mk | 14 ++++++++++++++ assets/upstream.std.mk | 14 ++++++++++++++ upstream.mk | 8 ++++++++ 4 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 assets/upstream.nighly.mk create mode 100644 assets/upstream.std.mk diff --git a/Makefile b/Makefile index 1d17ec3..dbce878 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,9 @@ .PHONY : all help clean veryclean librewolf-patches check librewolf - version:=$(shell cat ./version) release:=$(shell cat ./release) -include upstream.mk +include assets/upstream.nightly.mk ## simplistic archive format selection @@ -17,7 +16,6 @@ ext=.tar.gz - help : README.md @echo "use: make [all] [check] [clean] [veryclean]" @@ -42,15 +40,14 @@ all : librewolf-$(version)-$(release).source$(ext) README.md clean : rm -rf *~ firefox-$(version) librewolf-$(version) librewolf-$(version)-$(release).source$(ext) - veryclean : clean - rm -f $(upstream_filename) + make clean_upstream_file rm -rf librewolf-$(version) -librewolf-$(version)-$(release).source$(ext) : $(upstream_filename) ./version ./release scripts/librewolf-patches.py assets/mozconfig assets/patches.txt - rm -rf $(upstream_dirname) librewolf-$(version) - tar xf $(upstream_filename) - mv $(upstream_dirname) librewolf-$(version) +librewolf-$(version)-$(release).source$(ext) : $(upstream_filename) ./version ./release scripts/librewolf-patches.py assets/mozconfig assets/patches.txt README.md + make clean_upstream_dir + rm -rf librewolf-$(version) + make create_lw_from_upstream_dir python3 scripts/librewolf-patches.py $(version) rm -f librewolf-$(version)-$(release).source$(ext) $(archive_create) librewolf-$(version)-$(release).source$(ext) librewolf-$(version) diff --git a/assets/upstream.nighly.mk b/assets/upstream.nighly.mk new file mode 100644 index 0000000..ee63265 --- /dev/null +++ b/assets/upstream.nighly.mk @@ -0,0 +1,14 @@ +## handle different upstreams, like developer,nightly, or distro specific upstream cases +upstream_filename=bootstrap.py +upstream_dirname=mozilla-nightly +$(upstream_filename) : + wget -q https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py +## +clean_upstream_file : + rm -f $(upstream_filename) +clean_upstream_dir : + rm -rf $(upstream_dirname) +create_lw_from_upstream_dir : + python3 bootstrap.py --no-interactive --application-choice=browser + mv $(upstream_dirname) librewolf-$(version) + diff --git a/assets/upstream.std.mk b/assets/upstream.std.mk new file mode 100644 index 0000000..cb37428 --- /dev/null +++ b/assets/upstream.std.mk @@ -0,0 +1,14 @@ +## handle different upstreams, like developer,nightly, or distro specific upstream cases +upstream_filename=firefox-$(version).source.tar.xz +upstream_dirname=firefox-$(version) +$(upstream_filename) : + wget -q https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz +## +clean_upstream_file : + rm -f $(upstream_filename) +clean_upstream_dir : + rm -rf $(upstream_dirname) +create_lw_from_upstream_dir : + tar xf $(upstream_filename) + mv $(upstream_dirname) librewolf-$(version) + diff --git a/upstream.mk b/upstream.mk index ec503e4..cb37428 100644 --- a/upstream.mk +++ b/upstream.mk @@ -4,3 +4,11 @@ upstream_dirname=firefox-$(version) $(upstream_filename) : wget -q https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz ## +clean_upstream_file : + rm -f $(upstream_filename) +clean_upstream_dir : + rm -rf $(upstream_dirname) +create_lw_from_upstream_dir : + tar xf $(upstream_filename) + mv $(upstream_dirname) librewolf-$(version) +