diff --git a/Makefile b/Makefile index 9548bba..094adfc 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,23 @@ -.PHONY : all help clean veryclean check init +.PHONY : all help clean veryclean fetch extract librewolf-patches check init version_file=./version version:=$(shell cat $(version_file)) -include assets/Makefile.includes + +## simplistic archive format selection +archive_create=tar cfJ +ext=.tar.xz +#archive_create=tar cfz +#ext=.tar.gz +#archive_create=zip -r9 +#ext=.zip + + help : - @echo "use: make [all] [clean] [veryclean] [check] [source] [init]" + @echo "use: make [all] [check] [clean] [veryclean] [init]" @echo "" - @echo " all - make librewolf tarball ${version} in source/ folder." + @echo " all - make librewolf source archive ${version}." @echo " check - check if there is a new version of Firefox." @echo "" @echo " clean - clean everything except the upstream firefox tarball." @@ -16,20 +25,8 @@ help : @echo "" @echo " init - set up local build environment, takes a long time." -clean : - make -C source clean - -veryclean : # deliberately not depending on 'clean' in this case. - make -C source veryclean -# -# The 'all' target builds everything while trying to minimize -# disk space. -# - -all : - make -C source all # # Keeping ./version up to date. @@ -39,11 +36,58 @@ check : @python3 assets/update-version.py + + # -# init: run bootstrap on local machine +# init: run 'bootstrap.py' build environment setup tool on local machine # init : wget -q "https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py" python3 bootstrap.py --no-interactive --application-choice=browser rm -rf bootstrap.py mozilla-unified + + + + + + + + + + + + + + + +all : librewolf-$(version).source$(ext) + + +clean : + rm -rf *~ firefox-$(version) librewolf-$(version) librewolf-$(version).source$(ext) work + +veryclean : clean + rm -f firefox-$(version).source.tar.xz + +fetch : + rm -f firefox-$(version).source.tar.xz + make firefox-$(version).source.tar.xz + +firefox-$(version).source.tar.xz : + wget -q https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz + +# we take this extra step seperatly because it's so important. +librewolf-patches : + rm -rf work && mkdir -p work + python3 assets/librewolf-patches.py $(version) + rm -rf work + +librewolf-$(version).source$(ext) : firefox-$(version).source.tar.xz $(version_file) assets/librewolf-patches.py assets/build-librewolf.py assets/mozconfig assets/patches.txt + rm -rf firefox-$(version) librewolf-$(version) + tar xf firefox-$(version).source.tar.xz + mv firefox-$(version) librewolf-$(version) + make librewolf-patches + rm -f librewolf-$(version).source$(ext) + $(archive_create) librewolf-$(version).source$(ext) librewolf-$(version) + rm -rf librewolf-$(version) diff --git a/assets/Makefile.includes b/assets/Makefile.includes deleted file mode 100644 index 8d1b345..0000000 --- a/assets/Makefile.includes +++ /dev/null @@ -1,6 +0,0 @@ -docker=sudo docker -rm=sudo rm -mkdir=sudo mkdir -tar=sudo tar -cp=sudo cp -v -chown=sudo chown diff --git a/assets/librewolf-patches.py b/assets/librewolf-patches.py index 575865d..a7b6bf6 100755 --- a/assets/librewolf-patches.py +++ b/assets/librewolf-patches.py @@ -76,14 +76,14 @@ def librewolf_patches(): enter_srcdir() # create the right mozconfig file.. - exec('cp -v ../../assets/mozconfig .') + exec('cp -v ../assets/mozconfig .') # copy branding files.. exec("cp -vr ../work/common/source_files/browser .") exec("cp -v ../work/windows/files/configure.sh browser/branding/librewolf") # read lines of .txt file into 'patches' - f = open('../../assets/patches-{}.txt'.format(version), "r") + f = open('../assets/patches.txt'.format(version), "r") lines = f.readlines() f.close() patches = [] @@ -107,7 +107,7 @@ def librewolf_patches(): # copy the build-librewolf.py script into the source folder - exec('cp -v ../../assets/build-librewolf.py .') + exec('cp -v ../assets/build-librewolf.py .') leave_srcdir() diff --git a/assets/patches-94.0.2.txt b/assets/patches-94.0.2.txt deleted file mode 100644 index 7ad6270..0000000 --- a/assets/patches-94.0.2.txt +++ /dev/null @@ -1,21 +0,0 @@ -patches/about-dialog.patch -patches/allow-ubo-private-mode.patch -patches/allow_dark_preference_with_rfp.patch -patches/context-menu.patch -patches/megabar.patch -patches/mozilla-vpn-ad.patch -patches/mozilla_dirs.patch -patches/remove_addons.patch -patches/search-config.patch -patches/sed-patches/allow-searchengines-non-esr.patch -patches/sed-patches/disable-pocket.patch -patches/sed-patches/remove-internal-plugin-certs.patch -patches/sed-patches/stop-undesired-requests.patch -patches/ui-patches/add-language-warning.patch -patches/ui-patches/pref-naming.patch -patches/ui-patches/remove-branding-urlbar.patch -patches/ui-patches/remove-cfrprefs.patch -patches/ui-patches/remove-organization-policy-banner.patch -patches/ui-patches/remove-snippets-from-home.patch -patches/ui-patches/sanitizing-description.patch -patches/urlbarprovider-interventions.patch diff --git a/assets/patches-94.0.txt b/assets/patches-94.0.txt deleted file mode 100644 index 7ad6270..0000000 --- a/assets/patches-94.0.txt +++ /dev/null @@ -1,21 +0,0 @@ -patches/about-dialog.patch -patches/allow-ubo-private-mode.patch -patches/allow_dark_preference_with_rfp.patch -patches/context-menu.patch -patches/megabar.patch -patches/mozilla-vpn-ad.patch -patches/mozilla_dirs.patch -patches/remove_addons.patch -patches/search-config.patch -patches/sed-patches/allow-searchengines-non-esr.patch -patches/sed-patches/disable-pocket.patch -patches/sed-patches/remove-internal-plugin-certs.patch -patches/sed-patches/stop-undesired-requests.patch -patches/ui-patches/add-language-warning.patch -patches/ui-patches/pref-naming.patch -patches/ui-patches/remove-branding-urlbar.patch -patches/ui-patches/remove-cfrprefs.patch -patches/ui-patches/remove-organization-policy-banner.patch -patches/ui-patches/remove-snippets-from-home.patch -patches/ui-patches/sanitizing-description.patch -patches/urlbarprovider-interventions.patch diff --git a/assets/patches-94.0.1.txt b/assets/patches.txt similarity index 100% rename from assets/patches-94.0.1.txt rename to assets/patches.txt diff --git a/source/Makefile b/source/Makefile deleted file mode 100644 index b92b998..0000000 --- a/source/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -.PHONY : all help clean veryclean fetch extract librewolf-patches pub -version_file=../version -version:=$(shell cat $(version_file)) - -all : librewolf-$(version).source.tar.gz - -help : - @echo "Use: make [all] [clean] [veryclean]" - @echo "" - @echo " all - build librewolf-$(version).source.tar.gz" - @echo " clean - remove all source trees and other cruft" - @echo " veryclean - same as clean, but also remove source archives" - -clean : - rm -rf *~ firefox-$(version) librewolf-$(version) librewolf-$(version).source.tar.gz work - -veryclean : clean - rm -f firefox-$(version).source.tar.xz - -fetch : - rm -f firefox-$(version).source.tar.xz - make firefox-$(version).source.tar.xz - -firefox-$(version).source.tar.xz : - wget -q https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz - -# we take this extra step seperatly because it's so important. -librewolf-patches : - rm -rf work && mkdir -p work - python3 ../assets/librewolf-patches.py $(version) - rm -rf work - -librewolf-$(version).source.tar.gz : firefox-$(version).source.tar.xz $(version_file) ../assets/librewolf-patches.py ../assets/build-librewolf.py ../assets/mozconfig ../assets/patches-$(version).txt - rm -rf firefox-$(version) librewolf-$(version) - tar xf firefox-$(version).source.tar.xz - mv firefox-$(version) librewolf-$(version) - make librewolf-patches - rm -f librewolf-$(version).source.tar.gz - tar cfz librewolf-$(version).source.tar.gz librewolf-$(version) - rm -rf librewolf-$(version)