2021-11-21 04:23:21 -05:00
|
|
|
.PHONY : all help clean veryclean librewolf-patches check librewolf
|
2021-11-19 12:41:54 -05:00
|
|
|
|
2021-11-20 04:51:32 -05:00
|
|
|
|
2021-11-19 12:41:54 -05:00
|
|
|
version_file=./version
|
|
|
|
version:=$(shell cat $(version_file))
|
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
|
|
|
|
## simplistic archive format selection
|
|
|
|
archive_create=tar cfJ
|
|
|
|
ext=.tar.xz
|
2021-11-20 05:07:22 -05:00
|
|
|
archive_create=tar cfz
|
|
|
|
ext=.tar.gz
|
2021-11-19 14:46:23 -05:00
|
|
|
#archive_create=zip -r9
|
|
|
|
#ext=.zip
|
|
|
|
|
|
|
|
|
2021-11-19 12:41:54 -05:00
|
|
|
help :
|
2021-12-27 18:55:58 -05:00
|
|
|
|
2021-11-20 05:07:22 -05:00
|
|
|
@echo "use: make [all] [check] [clean] [veryclean]"
|
2021-11-19 12:41:54 -05:00
|
|
|
@echo ""
|
2021-11-20 05:07:22 -05:00
|
|
|
@echo " all - Make librewolf source archive ${version}."
|
|
|
|
@echo " check - Check if there is a new version of Firefox."
|
2021-11-19 12:41:54 -05:00
|
|
|
@echo ""
|
2021-11-20 05:07:22 -05:00
|
|
|
@echo " clean - Clean everything except the upstream firefox tarball."
|
|
|
|
@echo " veryclean - Clean everything and the firefox tarball."
|
2021-11-21 04:23:21 -05:00
|
|
|
@echo " librewolf - like 'make all' but after that extract and build it."
|
2021-11-19 12:41:54 -05:00
|
|
|
|
|
|
|
|
|
|
|
check :
|
2021-12-27 18:55:58 -05:00
|
|
|
@python3 scripts/update-version.py
|
2021-11-19 12:41:54 -05:00
|
|
|
|
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
all : librewolf-$(version).source$(ext)
|
|
|
|
|
|
|
|
|
|
|
|
clean :
|
|
|
|
rm -rf *~ firefox-$(version) librewolf-$(version) librewolf-$(version).source$(ext) work
|
|
|
|
|
2021-11-20 04:51:32 -05:00
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
veryclean : clean
|
|
|
|
rm -f firefox-$(version).source.tar.xz
|
2021-11-25 10:21:29 -05:00
|
|
|
rm -rf librewolf-$(version)
|
2021-11-19 14:46:23 -05:00
|
|
|
|
2021-11-20 04:51:32 -05:00
|
|
|
|
2021-11-20 05:07:22 -05:00
|
|
|
firefox-$(version).source.tar.xz :
|
2021-11-19 14:46:23 -05:00
|
|
|
wget -q https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz
|
|
|
|
|
2021-11-20 04:51:32 -05:00
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
# we take this extra step seperatly because it's so important.
|
|
|
|
librewolf-patches :
|
2021-12-27 18:55:58 -05:00
|
|
|
rm -rf work && mkdir work
|
|
|
|
python3 scripts/librewolf-patches.py $(version)
|
2021-11-19 14:46:23 -05:00
|
|
|
rm -rf work
|
|
|
|
|
2021-11-20 04:51:32 -05:00
|
|
|
|
2021-12-27 18:55:58 -05:00
|
|
|
librewolf-$(version).source$(ext) : firefox-$(version).source.tar.xz $(version_file) scripts/librewolf-patches.py scripts/build-librewolf.py assets/mozconfig assets/patches.txt
|
2021-11-19 14:46:23 -05:00
|
|
|
rm -rf firefox-$(version) librewolf-$(version)
|
|
|
|
tar xf firefox-$(version).source.tar.xz
|
|
|
|
mv firefox-$(version) librewolf-$(version)
|
2021-12-27 18:55:58 -05:00
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
make librewolf-patches
|
2021-12-27 18:55:58 -05:00
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
rm -f librewolf-$(version).source$(ext)
|
|
|
|
$(archive_create) librewolf-$(version).source$(ext) librewolf-$(version)
|
|
|
|
rm -rf librewolf-$(version)
|
2021-11-21 04:23:21 -05:00
|
|
|
|
2021-11-25 10:32:03 -05:00
|
|
|
librewolf-$(version) : librewolf-$(version).source$(ext)
|
2021-11-21 04:23:21 -05:00
|
|
|
tar xf librewolf-$(version).source$(ext)
|
2021-11-25 10:24:55 -05:00
|
|
|
|
2021-11-25 10:32:03 -05:00
|
|
|
librewolf : librewolf-$(version)
|
2021-12-27 18:55:58 -05:00
|
|
|
(cd librewolf-$(version) && ./mach build && ./mach package)
|