2022-02-03 03:27:17 -05:00
|
|
|
.PHONY : help check all clean veryclean bootstrap build package run update
|
2021-11-19 12:41:54 -05:00
|
|
|
|
2021-12-29 00:05:25 -05:00
|
|
|
version:=$(shell cat ./version)
|
|
|
|
release:=$(shell cat ./release)
|
2021-11-19 12:41:54 -05:00
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
## simplistic archive format selection
|
2021-12-29 00:05:25 -05:00
|
|
|
|
|
|
|
#archive_create=tar cfJ
|
|
|
|
#ext=.tar.xz
|
2022-02-05 10:13:32 -05:00
|
|
|
archive_create:=tar cfz
|
|
|
|
ext:=.tar.gz
|
2021-11-19 14:46:23 -05:00
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
ff_source_dir:=firefox-$(version)
|
|
|
|
ff_source_tarball:=firefox-$(version).source.tar.xz
|
2021-11-19 14:46:23 -05:00
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
lw_source_dir:=librewolf-$(version)-$(release)
|
|
|
|
lw_source_tarball:=librewolf-$(version)-$(release).source$(ext)
|
2022-02-03 03:27:17 -05:00
|
|
|
|
|
|
|
help :
|
2021-12-27 18:55:58 -05:00
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
@echo "use: $(MAKE) [all] [check] [clean] [veryclean] [bootstrap] [build] [package] [run]"
|
2021-11-19 12:41:54 -05:00
|
|
|
@echo ""
|
2022-01-13 14:34:48 -05:00
|
|
|
@echo " all - Make LibreWolf source archive ${version}-${release}."
|
2021-11-20 05:07:22 -05:00
|
|
|
@echo " check - Check if there is a new version of Firefox."
|
2022-02-03 03:27:17 -05:00
|
|
|
@echo " update - Update the git submodules and README.md."
|
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."
|
2022-02-03 03:27:17 -05:00
|
|
|
@echo " veryclean - Clean everything including the firefox tarball."
|
|
|
|
@echo ""
|
2022-02-05 10:13:32 -05:00
|
|
|
@echo " bootstrap - Bootstrap the build environment."
|
2022-01-13 14:34:48 -05:00
|
|
|
@echo ""
|
2022-02-05 10:13:32 -05:00
|
|
|
@echo " build - Build LibreWolf (requires bootstraped build environment)."
|
|
|
|
@echo " package - Package LibreWolf (requires build)."
|
|
|
|
@echo " run - Run LibreWolf (requires build)."
|
2021-12-29 00:05:25 -05:00
|
|
|
@echo ""
|
2021-11-19 12:41:54 -05:00
|
|
|
|
|
|
|
|
2022-02-03 03:27:17 -05:00
|
|
|
check :
|
2022-01-24 07:06:08 -05:00
|
|
|
python3 scripts/update-version.py
|
2021-12-29 00:31:33 -05:00
|
|
|
@echo "Current release:" $$(cat ./release)
|
2021-11-19 12:41:54 -05:00
|
|
|
|
2022-01-08 16:07:06 -05:00
|
|
|
|
2022-02-03 03:27:17 -05:00
|
|
|
update : README.md
|
|
|
|
git submodule update --recursive --remote
|
|
|
|
|
|
|
|
README.md : README.md.in ./version ./release
|
|
|
|
@sed "s/__VERSION__/$(version)/g" < $< > tmp
|
|
|
|
@sed "s/__RELEASE__/$(release)/g" < tmp > $@
|
|
|
|
@rm -f tmp
|
2022-01-08 16:07:06 -05:00
|
|
|
|
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
all : $(lw_source_tarball)
|
2021-11-19 14:46:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
clean :
|
2022-02-05 10:13:32 -05:00
|
|
|
rm -rf *~ $(ff_source_dir) $(lw_source_dir) $(lw_source_tarball)
|
2021-11-19 14:46:23 -05:00
|
|
|
|
|
|
|
veryclean : clean
|
2022-02-05 10:33:13 -05:00
|
|
|
rm -rf $(ff_source_tarball)
|
2022-02-03 03:27:17 -05:00
|
|
|
|
|
|
|
#
|
|
|
|
# The actual build stuff
|
|
|
|
#
|
|
|
|
|
2021-11-19 14:46:23 -05:00
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
$(ff_source_tarball) :
|
|
|
|
wget -q "https://archive.mozilla.org/pub/firefox/releases/$(version)/source/firefox-$(version).source.tar.xz" -O $(ff_source_tarball)
|
2022-02-03 03:27:17 -05:00
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
$(lw_source_dir) : $(ff_source_tarball) ./version ./release scripts/librewolf-patches.py assets/mozconfig assets/patches.txt
|
|
|
|
rm -rf $(ff_source_dir) $(lw_source_dir)
|
|
|
|
tar xf $(ff_source_tarball)
|
|
|
|
mv $(ff_source_dir) $(lw_source_dir)
|
2022-01-23 13:50:03 -05:00
|
|
|
python3 scripts/librewolf-patches.py $(version) $(release)
|
2021-12-29 00:05:25 -05:00
|
|
|
rm -f librewolf-$(version)-$(release).source$(ext)
|
|
|
|
$(archive_create) librewolf-$(version)-$(release).source$(ext) librewolf-$(version)
|
2022-01-24 06:49:36 -05:00
|
|
|
touch librewolf-$(version)
|
2022-02-05 14:41:17 -05:00
|
|
|
sha256sum librewolf-$(version)-$(release).source$(ext) > librewolf-$(version)-$(release).source$(ext).sha256sum
|
|
|
|
cat librewolf-$(version)-$(release).source$(ext).sha256sum
|
2021-11-21 04:23:21 -05:00
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
$(lw_source_tarball) : $(lw_source_dir)
|
|
|
|
rm -f $(lw_source_tarball)
|
|
|
|
$(archive_create) $(lw_source_tarball) $(lw_source_dir)
|
2021-11-25 10:24:55 -05:00
|
|
|
|
2022-02-03 05:20:10 -05:00
|
|
|
debs=python3 python3-dev python3-pip
|
|
|
|
rpms=python3 python3-devel
|
2022-02-05 10:13:32 -05:00
|
|
|
bootstrap : $(lw_source_dir)
|
2022-02-03 05:20:10 -05:00
|
|
|
(sudo apt -y install $(debs); true)
|
|
|
|
(sudo rpm -y install $(rpms); true)
|
2022-02-05 10:13:32 -05:00
|
|
|
(cd $(lw_source_dir) && MOZBUILD_STATE_PATH=$$HOME/.mozbuild ./mach --no-interactive bootstrap --application-choice=browser)
|
2022-02-03 03:27:17 -05:00
|
|
|
|
2022-02-05 10:13:32 -05:00
|
|
|
build : $(lw_source_dir)
|
|
|
|
(cd $(lw_source_dir) && ./mach build)
|
2022-01-13 14:34:48 -05:00
|
|
|
|
2022-02-03 03:27:17 -05:00
|
|
|
package :
|
2022-02-05 10:13:32 -05:00
|
|
|
(cd $(lw_source_dir) && ./mach package)
|
|
|
|
cp -v $(lw_source_dir)/obj-*/dist/librewolf-$(version)-$(release).en-US.*.tar.bz2 .
|
2022-01-13 14:34:48 -05:00
|
|
|
|
2022-02-03 03:27:17 -05:00
|
|
|
run :
|
2022-02-05 10:13:32 -05:00
|
|
|
(cd $(lw_source_dir) && ./mach run)
|